@inkeep/agents-ui-js-cloud 0.0.0-dev-20260508032426 → 0.0.0-dev-20260508202730
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/embed.js +1 -1
- package/package.json +3 -3
package/dist/embed.js
CHANGED
|
@@ -67,7 +67,7 @@ var pV={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
67
67
|
*
|
|
68
68
|
* This source code is licensed under the ISC license.
|
|
69
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const vG={search:"IoSearch",thumbsUp:"LuThumbsUp",thumbsDown:"LuThumbsDown",messageCopy:"LuCopy",messageCopied:"LuCheck",messageRevise:"FiEdit",codeCopy:"LuCopy",codeCopied:"LuCheck",openLinkInNewTab:"LuArrowUpRight",openLinkInSameTab:"LuCornerDownLeft",newLine:"LuCornerDownRight",breadcrumbSeparator:"FaChevronRight",switchToSearch:"IoSearch",switchToChat:"LuSparkles",chatSubmit:"LuSend",close:"IoCloseOutline",info:"IoInformationCircleOutline",command:"LuCommand",chatButtonClose:"LuChevronDown",chatHistory:"LuHistory",chatHistoryPanel:"LuPanelLeft",backToChat:"LuArrowLeft",fileUpload:"LuPaperclip",filePdf:"FaRegFilePdf",fileText:"PiFileText",fileMarkdown:"PiFileMarkdown",fileHtml:"PiFileHtml",fileCsv:"PiFileCsv",fileLog:"PiFileLog",fileJson:"PiFileJson",file:"PiFile",fileSql:"PiFileSql",filePy:"PiFilePy"};function kG({iconKey:e,...t}){var n;const r=vG[e],a=r?{builtIn:r}:{custom:""},{baseSettings:o}=oR(),i=(null==(n=o.customIcons)?void 0:n[e])||a;return og.jsx(bG,{"data-icon":e,iconSettings:i,...t})}const xG=X.createContext(void 0),wG=({children:e})=>{const[t,n]=X.useState(null),r=X.useCallback((e=>{n(e)}),[]),a=X.useCallback((()=>{n(null)}),[]),o=X.useMemo((()=>({imagePreview:t,openImagePreview:r,closeImagePreview:a})),[t,r,a]);return og.jsx(xG.Provider,{value:o,children:e})},EG=()=>{const e=X.useContext(xG);if(!e)throw new Error("useImagePreview must be used within an ImagePreviewProvider");return e},_G=X.createContext(void 0),SG=({children:e,message:t})=>og.jsx(_G.Provider,{value:{message:t},children:e}),TG=()=>{const e=X.useContext(_G);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e};var CG=(e,t=[])=>({parts:(...n)=>{if(NG(t))return CG(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>CG(e,[...t,...n]),omit:(...n)=>CG(e,t.filter((e=>!n.includes(e)))),rename:e=>CG(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${AG(e)}"][data-part="${AG(n)}"]`,`& [data-scope="${AG(e)}"][data-part="${AG(n)}"]`].join(", "),attrs:{"data-scope":AG(e),"data-part":AG(n)}}})),{})}),AG=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),NG=e=>0===e.length,IG=CG("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger").build(),OG=Object.defineProperty,RG=(e,t,n)=>((e,t,n)=>t in e?OG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),PG=e=>"object"==typeof e&&null!==e,LG=e=>e?"":void 0,DG=e=>PG(e)&&1===e.nodeType&&"string"==typeof e.nodeName,MG=e=>PG(e)&&void 0!==e.nodeType,FG=e=>MG(e)&&11===e.nodeType&&"host"in e;function jG(e,t){var n;if(!e||!t)return!1;if(!DG(e)||!MG(t))return!1;if(DG(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&FG(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function zG(e){var t;return FG(e)?zG(e.host):(e=>PG(e)&&9===e.nodeType)(e)?e.defaultView??window:DG(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function BG(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}var HG=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},UG=class e{constructor(){RG(this,"id",null),RG(this,"fn_cleanup"),RG(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};var $G={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},VG=e=>e.isDirectory,GG=e=>e.isFile,qG=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),WG=(e,t="")=>new Promise((n=>{const r=[],a=()=>{e.readEntries((e=>{if(0===e.length)return void n(Promise.all(r).then((e=>e.flat())));const o=e.map((e=>e?VG(e)?WG(e.createReader(),`${t}${e.name}`):GG(e)?new Promise((n=>{e.file((e=>{n(qG(e,t))}))})):void 0:null)).filter((e=>e));r.push(Promise.all(o)),a()}))};a()}));var YG=e=>function(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}(e)||function(e){return/^.*\.[\w]+$/.test(e)}(e);var ZG=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,KG=e=>null!=e;var XG=new Map("3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip".split("[").flatMap((e=>{const[t,n]=e.split("_");return t.split(",").map((e=>[e,n]))})));function QG(e,t){if(e&&t){const n=Array.isArray(t)?t:"string"==typeof t?t.split(","):[];if(0===n.length)return!0;const r=e.name||"",a=(e.type||function(e){const t=e.split(".").pop();return t&&XG.get(t)||null}(r)||"").toLowerCase(),o=a.replace(/\/.*$/,"");return n.some((e=>{const t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?o===t.replace(/\/.*$/,""):a===t}))}return!0}var JG=function(e){const t=new Map;return function(n,r){const a=n+(r?Object.entries(r).sort(((e,t)=>e[0]<t[0]?-1:1)).join():"");if(t.has(a))return t.get(a);let o=new e(n,r);return t.set(a,o),o}}(Intl.NumberFormat);var eq=["","kilo","mega","giga","tera"],tq=["","kilo","mega","giga","tera","peta"],nq=(e,t="en-US",n={})=>{if(Number.isNaN(e))return"";if(0===e)return"0 B";const{unitSystem:r="decimal",precision:a=3,unit:o="byte",unitDisplay:i="short"}=n,s="binary"===r?1024:1e3,l="bit"===o?eq:tq,c=e<0;let u=Math.abs(e),d=0;for(;u>=s&&d<l.length-1;)u/=s,d++;const p=parseFloat(u.toPrecision(a));return function(e,t,n={}){return JG(t,n).format(e)}(c?-p:p,t,{style:"unit",unit:l[d]+o,unitDisplay:i})};function rq(e){return e.reduce(((e,t)=>Array.isArray(t)?e.concat(rq(t)):e.concat(t)),[])}var aq=e=>String.fromCharCode(e+(e>25?39:97));var oq=e=>function(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=aq(t%52)+n;return aq(t%52)+n}(function(e,t){let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e}(5381,e)>>>0);function iq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}var sq=e=>{var t;return(null==(t=e.ids)?void 0:t.root)??`file:${e.id}`},lq=e=>{var t;return(null==(t=e.ids)?void 0:t.dropzone)??`file:${e.id}:dropzone`},cq=e=>{var t;return(null==(t=e.ids)?void 0:t.hiddenInput)??`file:${e.id}:input`},uq=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemDeleteTrigger)?void 0:r.call(n,t))??`file:${e.id}:item-delete:${t}`},dq=e=>oq(`${e.name}-${e.size}`),pq=e=>e.getById(cq(e));function fq(e){const t=BG(e);return e.dataTransfer?e.dataTransfer.types.some((e=>"Files"===e||"application/x-moz-file"===e)):!!t&&"files"in t}function hq(e,t,n=[],r=[]){const{prop:a,computed:o}=e,i=[],s=[],l={acceptedFiles:n,rejectedFiles:r};return t.forEach((e=>{var t;const[r,c]=function(e,t){const n="application/x-moz-file"===e.type||QG(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}(e,o("acceptAttr")),[u,d]=function(e,t,n){if(KG(e.size))if(KG(t)&&KG(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(KG(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(KG(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}(e,a("minFileSize"),a("maxFileSize")),p=n.some((t=>ZG(t,e)))||i.some((t=>ZG(t,e))),f=null==(t=a("validate"))?void 0:t(e,l),h=!f||0===f.length;if(r&&u&&h&&!p)i.push(e);else{const t=[c,d];p&&t.push("FILE_EXISTS"),h||t.push(...f??[]),s.push({file:e,errors:t.filter(Boolean)})}})),function(e,t,n){const{prop:r,computed:a}=e;return!(!a("multiple")&&t>1||(a("multiple")||t+n.length!==2)&&t+n.length>r("maxFiles"))}(e,i.length,n)||(i.forEach((e=>{s.push({file:e,errors:["TOO_MANY_FILES"]})})),i.splice(0)),{acceptedFiles:i,rejectedFiles:s}}var mq="accepted";function gq(e,t){if(!e||"file"===e.getAttribute("type"))return!1;const n=e.closest("button, a[href], input:not([type='file']), select, textarea, [tabindex], [contenteditable]");return n!=t&&jG(t,n)}function yq(e,t){const{state:n,send:r,prop:a,computed:o,scope:i,context:s}=e,l=!!a("disabled"),c=!!a("readOnly"),u=!!a("required"),d=a("allowDrop"),p=a("translations"),f=n.matches("dragging"),h=n.matches("focused")&&!l,m=s.get("acceptedFiles"),g=a("maxFiles");return{dragging:f,focused:h,disabled:l,readOnly:c,transforming:s.get("transforming"),maxFilesReached:m.length>=g,remainingFiles:Math.max(0,g-m.length),openFilePicker(){l||c||r({type:"OPEN"})},deleteFile(e,t=mq){l||c||r({type:"FILE.DELETE",file:e,itemType:t})},acceptedFiles:m,rejectedFiles:s.get("rejectedFiles"),setFiles(e){l||c||r({type:"FILES.SET",files:e,count:e.length})},clearRejectedFiles(){l||c||r({type:"REJECTED_FILES.CLEAR"})},clearFiles(){l||c||r({type:"FILES.CLEAR"})},getFileSize:e=>nq(e.size,a("locale")),createFileUrl(e,t){const n=i.getWin(),r=n.URL.createObjectURL(e);return t(r),()=>n.URL.revokeObjectURL(r)},setClipboardFiles(e){if(l||c)return!1;const t=Array.from((null==e?void 0:e.items)??[]).reduce(((e,t)=>{if("file"!==t.kind)return e;const n=t.getAsFile();return n?[...e,n]:e}),[]);return!!t.length&&(r({type:"FILE.SELECT",files:t}),!0)},getRootProps:()=>t.element({...IG.root.attrs,dir:a("dir"),id:sq(i),"data-disabled":LG(l),"data-readonly":LG(c),"data-dragging":LG(f)}),getDropzoneProps:(e={})=>t.element({...IG.dropzone.attrs,dir:a("dir"),id:lq(i),tabIndex:l||c||e.disableClick?void 0:0,role:e.disableClick?"application":"button","aria-label":p.dropzone,"aria-disabled":l||c||void 0,"data-invalid":LG(a("invalid")),"data-disabled":LG(l),"data-readonly":LG(c),"data-dragging":LG(f),onKeyDown(t){if(l||c)return;if(t.defaultPrevented)return;const n=BG(t);jG(t.currentTarget,n)&&(gq(n,t.currentTarget)||e.disableClick||"Enter"!==t.key&&" "!==t.key||r({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(t){if(l||c)return;if(t.defaultPrevented)return;if(e.disableClick)return;const n=BG(t);jG(t.currentTarget,n)&&(gq(n,t.currentTarget)||("label"===t.currentTarget.localName&&t.preventDefault(),r({type:"DROPZONE.CLICK"})))},onDragOver(e){if(l||c)return;if(!d)return;e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect="copy"}catch{}if(!fq(e))return;const t=e.dataTransfer.items.length;r({type:"DROPZONE.DRAG_OVER",count:t})},onDragLeave(e){l||c||d&&(jG(e.currentTarget,e.relatedTarget)||r({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(e){if(l||c)return;d&&(e.preventDefault(),e.stopPropagation());var t,n;fq(e)&&(t=e.dataTransfer.items,n=a("directory"),Promise.all(Array.from(t).filter((e=>"file"===e.kind)).map((e=>{const t=(e=>"function"==typeof e.getAsEntry?e.getAsEntry():"function"==typeof e.webkitGetAsEntry?e.webkitGetAsEntry():null)(e);if(!t)return null;if(VG(t)&&n)return WG(t.createReader(),`${t.name}`);if(GG(t)&&"function"==typeof e.getAsFile){const t=e.getAsFile();return Promise.resolve(t?qG(t,""):null)}return GG(t)?new Promise((e=>{t.file((t=>{e(qG(t,""))}))})):void 0})).filter((e=>e)))).then((e=>{r({type:"DROPZONE.DROP",files:rq(e)})}))},onFocus(){l||c||r({type:"DROPZONE.FOCUS"})},onBlur(){l||c||r({type:"DROPZONE.BLUR"})}}),getTriggerProps(){return t.button({...IG.trigger.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.trigger)??`file:${e.id}:trigger`),disabled:l||c,"data-disabled":LG(l),"data-readonly":LG(c),"data-invalid":LG(a("invalid")),type:"button",onClick(e){l||c||(jG((e=>e.getById(lq(e)))(i),e.currentTarget)&&e.stopPropagation(),r({type:"OPEN"}))}});var e,n},getHiddenInputProps:()=>t.input({id:cq(i),tabIndex:-1,disabled:l||c,type:"file",required:a("required"),capture:a("capture"),name:a("name"),accept:o("acceptAttr"),webkitdirectory:a("directory")?"":void 0,multiple:o("multiple")||a("maxFiles")>1,"aria-hidden":!0,onClick(e){e.stopPropagation(),e.currentTarget.value=""},onInput(e){if(l||c)return;const{files:t}=e.currentTarget;r({type:"FILE.SELECT",files:t?Array.from(t):[]})},style:$G}),getItemGroupProps(e={}){const{type:n=mq}=e;return t.element({...IG.itemGroup.attrs,dir:a("dir"),"data-disabled":LG(l),"data-type":n})},getItemProps(e){const{file:n,type:r=mq}=e;return t.element({...IG.item.attrs,dir:a("dir"),id:(o=i,s=dq(n),(null==(u=null==(c=o.ids)?void 0:c.item)?void 0:u.call(c,s))??`file:${o.id}:item:${s}`),"data-disabled":LG(l),"data-type":r});var o,s,c,u},getItemNameProps(e){const{file:n,type:r=mq}=e;return t.element({...IG.itemName.attrs,dir:a("dir"),id:(o=i,s=dq(n),(null==(u=null==(c=o.ids)?void 0:c.itemName)?void 0:u.call(c,s))??`file:${o.id}:item-name:${s}`),"data-disabled":LG(l),"data-type":r});var o,s,c,u},getItemSizeTextProps(e){const{file:n,type:r=mq}=e;return t.element({...IG.itemSizeText.attrs,dir:a("dir"),id:(o=i,s=dq(n),(null==(u=null==(c=o.ids)?void 0:c.itemSizeText)?void 0:u.call(c,s))??`file:${o.id}:item-size:${s}`),"data-disabled":LG(l),"data-type":r});var o,s,c,u},getItemPreviewProps(e){const{file:n,type:r=mq}=e;return t.element({...IG.itemPreview.attrs,dir:a("dir"),id:(o=i,s=dq(n),(null==(u=null==(c=o.ids)?void 0:c.itemPreview)?void 0:u.call(c,s))??`file:${o.id}:item-preview:${s}`),"data-disabled":LG(l),"data-type":r});var o,s,c,u},getItemPreviewImageProps(e){var n;const{file:r,url:a,type:o=mq}=e;if(!r.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...IG.itemPreviewImage.attrs,alt:null==(n=p.itemPreview)?void 0:n.call(p,r),src:a,"data-disabled":LG(l),"data-type":o})},getItemDeleteTriggerProps(e){var n;const{file:o,type:s=mq}=e;return t.button({...IG.itemDeleteTrigger.attrs,dir:a("dir"),id:uq(i,dq(o)),type:"button",disabled:l||c,"data-disabled":LG(l),"data-readonly":LG(c),"data-type":s,"aria-label":null==(n=p.deleteFile)?void 0:n.call(p,o),onClick(){l||c||r({type:"FILE.DELETE",file:o,itemType:s})}})},getLabelProps(){return t.label({...IG.label.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.label)??`file:${e.id}:label`),htmlFor:cq(i),"data-disabled":LG(l),"data-required":LG(u)});var e,n},getClearTriggerProps:()=>t.button({...IG.clearTrigger.attrs,dir:a("dir"),type:"button",disabled:l||c,hidden:0===m.length,"data-disabled":LG(l),"data-readonly":LG(c),onClick(e){e.defaultPrevented||l||c||r({type:"FILES.CLEAR"})}})}}var bq=new WeakMap,vq=new WeakMap;function kq(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&iq(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){!function(e,t){if(null==e)throw new Error(t())}(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||iq(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=(l=t,(s=e)?`${s}.${l}`:l);r(a,n)}var s,l}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}var xq,wq=(xq={props:({props:e})=>({minFileSize:0,maxFileSize:Number.POSITIVE_INFINITY,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:e=>`preview of ${e.name}`,deleteFile:e=>`delete file ${e.name}`,...e.translations}}),initialState:()=>"idle",context:({prop:e,bindable:t,getContext:n})=>({acceptedFiles:t((()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>ZG(e,t[n]))),hash:e=>e.map((e=>`${e.name}-${e.size}`)).join(","),onChange(t){var r,a;const o=n();null==(r=e("onFileAccept"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:t,rejectedFiles:o.get("rejectedFiles")})}}))),rejectedFiles:t((()=>({defaultValue:[],isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>ZG(e.file,t[n].file))),onChange(t){var r,a;const o=n();null==(r=e("onFileReject"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:o.get("acceptedFiles"),rejectedFiles:t})}}))),transforming:t((()=>({defaultValue:!1})))}),computed:{acceptAttr:({prop:e})=>function(e){if(null!=e)return"string"==typeof e?e:Array.isArray(e)?e.filter(YG).join(","):Object.entries(e).reduce(((e,[t,n])=>[...e,t,...n]),[]).filter(YG).join(",")}(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:n}){e([()=>t.hash("acceptedFiles")],(()=>{n(["syncInputElement"])}))},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop"))return;if(!e("allowDrop"))return;if(e("disabled"))return;const n=t.getDoc();return((...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))})(HG(n,"dragover",(e=>{null==e||e.preventDefault()}),!1),HG(n,"drop",(e=>{var n;jG((n=t).getById(sq(n)),BG(e))||e.preventDefault()}),!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask((()=>{const n=pq(e);if(!n)return;!function(e,t){const n=zG(e);try{if("DataTransfer"in n){const r=new n.DataTransfer;t.forEach((e=>{r.items.add(e)})),e.files=r.files}}catch{}}(n,t.get("acceptedFiles"));const r=e.getWin();n.dispatchEvent(new r.Event("change",{bubbles:!0}))}))},openFilePicker({scope:e}){!function(e){const t=UG.create();t.request(e),t.cleanup}((()=>{var t;null==(t=pq(e))||t.click()}))},setFiles(e){const{computed:t,context:n,event:r}=e,{acceptedFiles:a,rejectedFiles:o}=hq(e,r.files);n.set("acceptedFiles",t("multiple")?a:a.length>0?[a[0]]:[]),n.set("rejectedFiles",o)},setEventFiles(e){const{computed:t,context:n,event:r,prop:a}=e,o=n.get("acceptedFiles"),i=n.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=hq(e,r.files,o,i),c=e=>t("multiple")?(n.set("acceptedFiles",(t=>[...t,...e])),void n.set("rejectedFiles",l)):e.length?(n.set("acceptedFiles",[e[0]]),void n.set("rejectedFiles",l)):void(l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))),u=a("transformFiles");u?(n.set("transforming",!0),u(s).then(c).catch((e=>{!function(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}(`[zag-js/file-upload] error transforming files\n${e}`)})).finally((()=>{n.set("transforming",!1)}))):c(s)},removeFile({context:e,event:t}){if("rejected"===t.itemType){const n=e.get("rejectedFiles").filter((e=>!ZG(e.file,t.file)));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter((e=>!ZG(e,t.file)));e.set("acceptedFiles",n)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}},function(e){const t=bq.get(e);if(t)return t;const{index:n,idIndex:r}=kq(e);bq.set(e,n),vq.set(e,r)}(xq),xq);var Eq=(e,...t)=>e.filter((e=>!t.includes(e))),_q=(e,t)=>((e,t)=>-1!==e.indexOf(t))(e,t)?Eq(e,t):((e,...t)=>e.concat(t))(e,t),Sq=e=>"Array"===(null==e?void 0:e.constructor.name),Tq=(e,t)=>{if(Object.is(e,t))return!0;if(null==e&&null!=t||null!=e&&null==t)return!1;if("function"==typeof(null==e?void 0:e.isEqual)&&"function"==typeof(null==t?void 0:t.isEqual))return e.isEqual(t);if("function"==typeof e&&"function"==typeof t)return e.toString()===t.toString();if(Sq(e)&&Sq(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Tq(e[n],t[n]))return!1;return!0})(Array.from(e),Array.from(t));if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(t??Object.create(null)),r=n.length;for(let a=0;a<r;a++){if(!Reflect.has(e,n[a]))return!1}for(let a=0;a<r;a++){const r=n[a];if(!Tq(e[r],t[r]))return!1}return!0},Cq=e=>null!=e&&"object"==typeof e,Aq=e=>Cq(e)&&!(e=>Array.isArray(e))(e),Nq=e=>"function"==typeof e,Iq=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Oq=Function.prototype.toString,Rq=Oq.call(Object),Pq=e=>{if(!Cq(e)||"[object Object]"!=(e=>Object.prototype.toString.call(e))(e)||Lq(e))return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;const n=Iq(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oq.call(n)==Rq},Lq=e=>(e=>"object"==typeof e&&null!==e&&"$$typeof"in e&&"props"in e)(e)||(e=>"object"==typeof e&&null!==e&&"__v_isVNode"in e)(e),Dq=e=>e(),Mq=()=>{},Fq=(...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))};function jq(e,t,...n){var r;if(e in t){const r=t[e];return Nq(r)?r(...n):r}const a=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw null==(r=Error.captureStackTrace)||r.call(Error,a,jq),a}function zq(e){if(!Pq(e)||void 0===e)return e;const t=Reflect.ownKeys(e).filter((e=>"string"==typeof e)),n={};for(const r of t){const t=e[r];void 0!==t&&(n[r]=zq(t))}return n}function Bq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function Hq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function Uq(e,t){if(null==e)throw new Error(t())}var $q=".",Vq=new WeakMap,Gq=new WeakMap;function qq(e){return e.join($q)}function Wq(e){return e.startsWith("#")}function Yq(e,t){return e?`${e}${$q}${t}`:t}function Zq(e){const t=Vq.get(e);if(t)return t;const{index:n,idIndex:r}=function(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&Hq(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){Uq(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||Hq(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=Yq(e,t);r(a,n)}}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}(e);return Vq.set(e,n),Gq.set(e,r),n}function Kq(e){return e?String(e).split($q).filter(Boolean):[]}function Xq(e,t){if(!t)return[];const n=Zq(e),r=Kq(t),a=[],o=[];for(const i of r){o.push(i);const e=qq(o),t=n.get(e);if(!t)break;a.push({path:e,state:t})}return a}function Qq(e,t){const n=Zq(e),r=Kq(t);if(!r.length)return t;const a=[];for(const s of r){a.push(s);const e=qq(a);if(!n.has(e))return t}let o=qq(a),i=n.get(o);for(;null==i?void 0:i.initial;){const e=`${o}${$q}${i.initial}`,t=n.get(e);if(!t)break;o=e,i=t}return o}function Jq(e,t){return Zq(e).has(t)}function eW(e,t,n){const r=String(t);if(Wq(r)){const t=function(e){return Wq(e)?e.slice(1):e}(r),n=function(e,t){var n;return Zq(e),null==(n=Gq.get(e))?void 0:n.get(t)}(e,t);return Uq(n,(()=>`[zag-js] Unknown state id: "${t}"`)),Qq(e,n)}if(function(e){return e.startsWith($q)}(r)&&n){return Qq(e,Yq(n,r.slice(1)))}if(!function(e){return e.includes($q)}(r)&&n){const t=Kq(n);for(let n=t.length-1;n>=1;n--){const a=Yq(t.slice(0,n).join($q),r);if(Jq(e,a))return Qq(e,a)}if(Jq(e,r))return Qq(e,r)}return Qq(e,r)}function tW(e){return Zq(e),e}var nW=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(nW||{}),rW="__init__",aW=Object.defineProperty,oW=(e,t,n)=>((e,t,n)=>t in e?aW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);function iW(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;const t=e.value.length;e.setSelectionRange(t,t)}catch{}}var sW=()=>{},lW=e=>"object"==typeof e&&null!==e,cW=e=>e?"":void 0,uW=e=>e?"true":void 0,dW=e=>lW(e)&&1===e.nodeType&&"string"==typeof e.nodeName,pW=e=>lW(e)&&9===e.nodeType,fW=e=>dW(e)?e.localName||"":"#document";var hW=e=>lW(e)&&void 0!==e.nodeType,mW=e=>hW(e)&&11===e.nodeType&&"host"in e,gW=e=>dW(e)&&"input"===e.localName;function yW(e){if(!e)return!1;return wW(e.getRootNode())===e}var bW=/(textarea|select)/;function vW(e,t){var n;if(!e||!t)return!1;if(!dW(e)||!hW(t))return!1;if(dW(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&mW(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function kW(e){return pW(e)?e:(e=>lW(e)&&e===e.window)(e)?e.document:(null==e?void 0:e.ownerDocument)??document}function xW(e){var t;return mW(e)?xW(e.host):pW(e)?e.defaultView??window:dW(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function wW(e){let t=e.activeElement;for(;null==t?void 0:t.shadowRoot;){const e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function EW(e){if("html"===fW(e))return e;const t=e.assignedSlot||e.parentNode||mW(e)&&e.host||kW(e).documentElement;return mW(t)?t.host:t}function _W(e){let t;try{if(t=e.getRootNode({composed:!0}),pW(t)||mW(t))return t}catch{}return e.ownerDocument??document}var SW=new WeakMap;function TW(e){return SW.has(e)||SW.set(e,xW(e).getComputedStyle(e)),SW.get(e)}var CW=new Set(["menu","listbox","dialog","grid","tree","region"]),AW=e=>CW.has(e),NW=e=>{var t;return(null==(t=e.getAttribute("aria-controls"))?void 0:t.split(" "))||[]};function IW(e,t){const n=new Set,r=_W(e),a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=NW(i);for(const o of e){if(!o||n.has(o))continue;n.add(o);const e=r.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");if(n&&AW(n)&&!r){if(e===t||e.contains(t))return!0;if(a(e))return!0}}}}return!1};return a(e)}function OW(e){const t=new Set;return function(e,t){const n=_W(e),r=new Set,a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=NW(i);for(const o of e){if(!o||r.has(o))continue;r.add(o);const e=n.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");n&&CW.has(n)&&!r&&(t(e),a(e))}}}};a(e)}(e,(n=>{e.contains(n)||t.add(n)})),Array.from(t)}function RW(e){if(!e.id)return!1;const t=_W(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`,a=t.querySelector(r);return Boolean(a&&function(e){const t=e.getAttribute("role");return Boolean(t&&CW.has(t))}(e))}var PW=()=>"undefined"!=typeof document;var LW=e=>PW()&&e.test(function(){const e=navigator.userAgentData;return(null==e?void 0:e.platform)??navigator.platform}()),DW=e=>PW()&&e.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((({brand:e,version:t})=>`${e}/${t}`)).join(" "):navigator.userAgent}()),MW=()=>PW()&&!!navigator.maxTouchPoints,FW=()=>LW(/^iPhone/i)||LW(/^iPad/i)||jW()&&navigator.maxTouchPoints>1,jW=()=>LW(/^Mac/i);function zW(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}function BW(e){const t=e.currentTarget;if(!t)return!1;if(!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;const n=1===e.button,r=(a=e,jW()?a.metaKey:a.ctrlKey);var a;return n||r}function HW(e){return!(""!==e.pointerType||!e.isTrusted)||(DW(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}var UW=e=>0===e.button,$W=e=>2===e.button||jW()&&e.ctrlKey&&0===e.button,VW={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},GW={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function qW(e,t={}){const{dir:n="ltr",orientation:r="horizontal"}=t;let a=e.key;a=VW[a]??a;return"rtl"===n&&"horizontal"===r&&a in GW&&(a=GW[a]),a}var WW=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},YW=e=>dW(e)&&"IFRAME"===e.tagName,ZW=/^(audio|video|details)$/;function KW(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function XW(e){if(!function(e){return gW(e)&&"radio"===e.type}(e)||!e.name)return!0;if(e.checked)return!0;const t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter((t=>t.form===e.form&&nY(t))),a=r.find((e=>e.checked));return a?a===e:r[0]===e}function QW(e,t){if(!t)return null;if(!0===t)return e.shadowRoot||null;const n=t(e);return(!0===n?e.shadowRoot:n)||null}function JW(e,t,n){const r=[...e],a=[...e],o=new Set,i=new Map;e.forEach(((e,t)=>i.set(e,t)));let s=0;for(;s<a.length;){const e=a[s++];if(!e||o.has(e))continue;o.add(e);const l=QW(e,t);if(l){const t=Array.from(l.querySelectorAll(eY)).filter(n),o=i.get(e);if(void 0!==o){const e=o+1;r.splice(e,0,...t),t.forEach(((t,n)=>{i.set(t,e+n)}));for(let n=e+t.length;n<r.length;n++)i.set(r[n],n)}else{const e=r.length;r.push(...t),t.forEach(((t,n)=>{i.set(t,e+n)}))}a.push(...t)}}return r}var eY="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",tY=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(eY));(1==n||"if-empty"==n&&0===a.length)&&dW(e)&&nY(e)&&a.unshift(e);const o=[];for(const i of a)if(nY(i))if(YW(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...tY(e,{getShadowRoot:r}))}else o.push(i);return r?JW(o,r,nY):o};function nY(e){return!(!dW(e)||e.closest("[inert]"))&&(e.matches(eY)&&(!!dW(t=e)&&(t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0)));var t}function rY(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(eY));n&&aY(e)&&a.unshift(e);const o=[];for(const i of a)if(aY(i))if(YW(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...rY(e,{getShadowRoot:r}))}else o.push(i);if(r){const e=JW(o,r,aY);return!e.length&&n?a:e}return!o.length&&n?a:o}function aY(e){return!!(dW(e)&&e.tabIndex>0)||!(!nY(e)||(e=>KW(e)<0)(e))&&XW(e)}function oY(e){return e.tabIndex<0&&(ZW.test(e.localName)||function(e){if(null==e||!dW(e))return!1;try{return gW(e)&&null!=e.selectionStart||bW.test(e.localName)||e.isContentEditable||"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")}catch{return!1}}(e))&&(t=e,Number.isNaN(KW(t)))?0:e.tabIndex;var t}var iY=class e{constructor(){oW(this,"id",null),oW(this,"fn_cleanup"),oW(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};function sY(e){const t=iY.create();return t.request(e),t.cleanup}function lY(e){const t=new Set;function n(e){const n=globalThis.requestAnimationFrame(e);t.add((()=>globalThis.cancelAnimationFrame(n)))}return n((()=>n(e))),function(){t.forEach((e=>e()))}}function cY(e,t){const{defer:n}=t,r=n?sY:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(function(e,t){if(!e)return;const{attributes:n,callback:r}=t,a=new(e.ownerDocument.defaultView||window).MutationObserver((e=>{for(const t of e)"attributes"===t.type&&t.attributeName&&n.includes(t.attributeName)&&r(t)}));return a.observe(e,{attributes:!0,attributeFilter:n}),()=>a.disconnect()}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function uY(e){const t=()=>{const t=xW(e);e.dispatchEvent(new t.MouseEvent("click"))};DW(/Firefox/i)?function(e,t,n){const r=sY((()=>{e.removeEventListener(t,a,!0),n()})),a=()=>{r(),n()};e.addEventListener(t,a,{once:!0,capture:!0})}(e,"keyup",t):queueMicrotask(t)}function dY(e){const t=EW(e);return["html","body","#document"].includes(fW(t))?kW(t).body:dW(t)&&hY(t)?t:dY(t)}var pY=/auto|scroll|overlay|hidden|clip/,fY=new Set(["inline","contents"]);function hY(e){const t=xW(e),{overflow:n,overflowX:r,overflowY:a,display:o}=t.getComputedStyle(e);return pY.test(n+a+r)&&!fY.has(o)}function mY(e,t){const{rootEl:n,...r}=t||{};e&&n&&hY(n)&&function(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}(n)&&e.scrollIntoView(r)}function gY(e,t){if(!e)return sW;const n=Object.keys(t).reduce(((t,n)=>(t[n]=e.style.getPropertyValue(n),t)),{});return r=n,a=t,Object.keys(r).every((e=>r[e]===a[e]))?sW:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),0===e.style.length&&e.removeAttribute("style")});var r,a}function yY(e,t){const{timeout:n,rootNode:r}=t,a=xW(r),o=kW(r),i=new a.AbortController;return function(e,t,n){const{signal:r}=t;return[new Promise(((t,a)=>{const o=setTimeout((()=>{a(new Error(`Timeout of ${n}ms exceeded`))}),n);r.addEventListener("abort",(()=>{clearTimeout(o),a(new DOMException("Promise aborted","AbortError"))})),e.then((e=>{r.aborted||(clearTimeout(o),t(e))})).catch((e=>{r.aborted||(clearTimeout(o),a(e))}))})),()=>t.abort()]}(new Promise((t=>{const n=e();if(n)return void t(n);const r=new a.MutationObserver((()=>{const n=e();n&&n.isConnected&&(r.disconnect(),t(n))}));r.observe(o.body,{childList:!0,subtree:!0})})),i,n)}var bY=void 0!==globalThis.document?X.useLayoutEffect:X.useEffect;function vY(e){const t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r]=X.useState(t),[a,o]=X.useState(r),i=void 0!==e().value,s=X.useRef(a);s.current=i?e().value:a;const l=X.useRef(s.current);bY((()=>{l.current=s.current}),[a,e().value]);return{initial:r,ref:s,get:function(){return i?e().value:a},set(t){(e().sync?ue.flushSync:Dq)((()=>(t=>{var r,a;const s=l.current,c=Nq(t)?t(s):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:s}),i||o(c),n(c,s)||null==(a=(r=e()).onChange)||a.call(r,c,s)})(t)))},invoke(t,n){var r,a;null==(a=(r=e()).onChange)||a.call(r,t,n)},hash(t){var n,r;return(null==(r=(n=e()).hash)?void 0:r.call(n,t))??String(t)}}}vY.cleanup=e=>{X.useEffect((()=>e),[])},vY.ref=e=>{const t=X.useRef(e);return{get:()=>t.current,set:e=>{t.current=e}}};var kY=(e,t)=>{const n=X.useRef(!1),r=X.useRef(!1);X.useEffect((()=>{if(n.current&&r.current)return t();r.current=!0}),[...(e??[]).map((e=>"function"==typeof e?e():e))]),X.useEffect((()=>(n.current=!0,()=>{n.current=!1})),[])};function xY(e,t={}){var n,r,a,o;const i=X.useMemo((()=>{const{id:e,ids:n,getRootNode:r}=t;return function(e){const t=()=>{var t;return(null==(t=e.getRootNode)?void 0:t.call(e))??document},n=()=>kW(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>wW(t()),isActiveElement:yW,getById:e=>t().getElementById(e)}}({id:e,ids:n,getRootNode:r})}),[t]),s=(...t)=>{e.debug&&console.log(...t)},l=function(e){const t=wY(e);return function(e){return t.current[e]}}((null==(n=e.props)?void 0:n.call(e,{props:zq(t),scope:i}))??t),c=wY(null==(r=e.context)?void 0:r.call(e,{prop:l,bindable:vY,scope:i,flush:EY,getContext:()=>u,getComputed:()=>E,getRefs:()=>y,getEvent:()=>m()})),u={get(e){var t;return null==(t=c.current)?void 0:t[e].ref.current},set(e,t){var n;null==(n=c.current)||n[e].set(t)},initial(e){var t;return null==(t=c.current)?void 0:t[e].initial},hash(e){var t,n;const r=null==(t=c.current)?void 0:t[e].get();return null==(n=c.current)?void 0:n[e].hash(r)}},d=X.useRef(new Map),p=X.useRef(null),f=X.useRef(null),h=X.useRef({type:""}),m=()=>({...h.current,current:()=>h.current,previous:()=>f.current}),g=()=>({..._,matches:(...e)=>e.some((e=>function(e,t){return!!e&&(e===t||e.startsWith(`${t}${$q}`))}(_.ref.current,e))),hasTag:t=>function(e,t,n){return Xq(e,t).some((e=>{var t;return null==(t=e.state.tags)?void 0:t.includes(n)}))}(e,_.ref.current,t)}),y=function(e){const t=X.useRef(e);return{get:e=>t.current[e],set(e,n){t.current[e]=n}}}((null==(a=e.refs)?void 0:a.call(e,{prop:l,context:u}))??{}),b=()=>({state:g(),context:u,event:m(),prop:l,send:A,action:v,guard:k,track:kY,refs:y,computed:E,flush:EY,scope:i,choose:w}),v=t=>{const n=Nq(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.actions)?void 0:r[t];return a||Bq(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),a}));for(const e of r)null==e||e(b())},k=t=>{var n,r;return Nq(t)?t(b()):null==(r=null==(n=e.implementations)?void 0:n.guards)?void 0:r[t](b())},x=t=>{const n=Nq(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.effects)?void 0:r[t];return a||Bq(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),a})),a=[];for(const e of r){const t=null==e?void 0:e(b());t&&a.push(t)}return()=>a.forEach((e=>null==e?void 0:e()))},w=e=>{return(t=e,null==t?[]:Array.isArray(t)?t:[t]).find((e=>{let t=!e.guard;return(e=>"string"==typeof e)(e.guard)?t=!!k(e.guard):Nq(e.guard)&&(t=e.guard(b())),t}));var t},E=t=>{Uq(e.computed,(()=>"[zag-js] No computed object found on machine"));return(0,e.computed[t])({context:u,event:m(),prop:l,refs:y,scope:i,computed:E})},_=vY((()=>({defaultValue:eW(e,e.initialState({prop:l})),onChange(t,n){var r,a;const{exiting:o,entering:i}=function(e,t,n,r){var a,o,i,s;const l=t?Xq(e,t):[],c=Xq(e,n);let u=0;for(;u<l.length&&u<c.length&&(null==(a=l[u])?void 0:a.path)===(null==(o=c[u])?void 0:o.path);)u+=1;let d=l.slice(u).reverse(),p=c.slice(u);const f=(null==(i=l.at(-1))?void 0:i.path)===(null==(s=c.at(-1))?void 0:s.path);return r&&f&&(d=l.slice().reverse(),p=c),{exiting:d,entering:p}}(e,n,t,null==(r=p.current)?void 0:r.reenter);if(o.forEach((e=>{const t=d.current.get(e.path);null==t||t(),d.current.delete(e.path)})),o.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.exit)})),v(null==(a=p.current)?void 0:a.actions),i.forEach((e=>{var t;const n=x(null==(t=e.state)?void 0:t.effects);n&&d.current.set(e.path,n)})),n===rW){v(e.entry);const t=x(e.effects);t&&d.current.set(rW,t)}i.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.entry)}))}}))),S=X.useRef(void 0),T=X.useRef(nW.NotStarted);bY((()=>{queueMicrotask((()=>{const e=T.current===nW.Started;T.current=nW.Started,s(e?"rehydrating...":"initializing...");const t=S.current??_.initial;_.invoke(t,e?_.get():rW)}));const t=d.current;return()=>{const n=C();s("unmounting..."),S.current=n,T.current=nW.Stopped,t.forEach((e=>null==e?void 0:e())),d.current=new Map,p.current=null,queueMicrotask((()=>{v(e.exit),T.current=nW.Stopped}))}}),[]);const C=()=>"ref"in _?_.ref.current:_.get(),A=t=>{queueMicrotask((()=>{if(T.current!==nW.Started)return;f.current=h.current,h.current=t;let n=C();const{transitions:r,source:a}=function(e,t,n){var r,a;const o=Xq(e,t);for(let s=o.length-1;s>=0;s--){const e=null==(r=o[s])?void 0:r.state.on,t=null==e?void 0:e[n];if(t)return{transitions:t,source:null==(a=o[s])?void 0:a.path}}const i=e.on;return{transitions:null==i?void 0:i[n],source:void 0}}(e,n,t.type),o=w(r);if(!o)return;p.current=o;const i=eW(e,o.target??n,a);s("transition",t.type,o.target||n,`(${o.actions})`);i!==n?ue.flushSync((()=>_.set(i))):o.reenter?_.invoke(n,n):v(o.actions??[])}))};return null==(o=e.watch)||o.call(e,b()),{state:g(),send:A,context:u,prop:l,scope:i,refs:y,computed:E,event:m(),getStatus:()=>T.current}}function wY(e){const t=X.useRef(e);return t.current=e,t}function EY(e){queueMicrotask((()=>{ue.flushSync((()=>e()))}))}var _Y,SY=(_Y=e=>e,new Proxy({},{get:(e,t)=>"style"===t?e=>_Y({style:e}).style:_Y}));const TY=X.createContext(null);function CY({children:e,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,onFileAccept:i,onFileChange:s,onFileReject:l}){const c=X.useId(),u=qO(),d=yq(xY(wq,{id:c,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,getRootNode:()=>{var e;return(null==(e=null==u?void 0:u.shadowHost)?void 0:e.shadowRoot)??document},onFileAccept:i,onFileChange:s,onFileReject:l}),SY);return og.jsx(TY.Provider,{value:d,children:e})}function AY(){const e=X.useContext(TY);if(!e)throw new Error("useFileUploadApi must be used within FileUploadRoot");return e}function NY(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const IY={"application/pdf":"filePdf","text/plain":"fileText","text/markdown":"fileMarkdown","text/html":"fileHtml","text/csv":"fileCsv","text/x-log":"fileLog","application/json":"fileJson","text/x-sql":"fileSql","application/x-sql":"fileSql","text/x-script.python":"filePy","text/x-python":"filePy","text/x-python-script":"filePy"};function OY(e){return e.startsWith("image/")}const RY={"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/webp":[".webp"],"application/pdf":[".pdf"],"text/plain":[".txt",".text",".bat",".cfg",".conf",".def",".dic",".in",".list"],"text/x-log":[".log"],"text/markdown":[".md",".markdown"],"text/html":[".html",".htm"],"text/csv":[".csv"],"text/xml":[".xml"],"text/css":[".css"],"application/json":[".json"],"application/yaml":[".yaml",".yml"],"application/x-yaml":[".yaml",".yml"],"text/x-yaml":[".yaml",".yml"],"application/toml":[".toml"],"application/x-toml":[".toml"],"application/graphql":[".graphql",".gql"],"application/x-graphql":[".graphql",".gql"],"text/x-graphql":[".graphql",".gql"],"application/x-ndjson":[".ndjson"],"application/json5":[".json5"],"application/x-json5":[".json5"],"application/javascript":[".js",".mjs"],"text/javascript":[".js",".mjs"],"application/typescript":[".ts"],"text/x-typescript":[".ts"],"text/jsx":[".jsx"],"text/tsx":[".tsx"],"text/x-sh":[".sh"],"text/x-bash":[".bash"],"application/x-bash":[".bash"],"text/x-zsh":[".zsh"],"text/x-shellscript":[".sh",".ksh"],"application/x-powershell":[".ps1"],"text/vbscript":[".vbs"],"text/x-awk":[".awk"],"application/x-awk":[".awk"],"text/x-c":[".c",".h"],"text/x-c++":[".cpp",".cc",".cxx",".hh"],"text/x-csharp":[".cs"],"text/x-objectivec":[".m"],"text/x-objectivec++":[".mm"],"text/x-java":[".java"],"text/x-scala":[".scala"],"application/x-scala":[".scala"],"text/x-kotlin":[".kt"],"text/x-groovy":[".groovy"],"text/x-clojure":[".clj"],"text/x-go":[".go"],"text/x-golang":[".go"],"text/x-rust":[".rs"],"application/x-rust":[".rs"],"text/x-swift":[".swift"],"text/x-dart":[".dart"],"text/x-python":[".py"],"text/x-script.python":[".py"],"text/x-python-script":[".py"],"text/x-ruby":[".rb"],"text/x-perl":[".pl"],"text/x-lua":[".lua"],"text/x-r":[".r"],"text/x-R":[".r"],"text/x-julia":[".jl"],"text/x-elixir":[".ex"],"text/x-erlang":[".erl"],"text/x-haskell":[".hs"],"text/x-lisp":[".lisp"],"text/x-php":[".php"],"application/x-php":[".php"],"application/x-httpd-php":[".php"],"application/x-httpd-php-source":[".php"],"text/x-tex":[".tex"],"text/x-rst":[".rst"],"text/x-handlebars":[".hbs"],"text/x-mustache":[".mustache"],"text/x-ejs":[".ejs"],"text/x-jinja2":[".jinja",".jinja2"],"text/x-liquid":[".liquid"],"text/x-erb":[".erb"],"text/x-twig":[".twig"],"text/x-pug":[".pug"],"text/x-jade":[".jade"],"text/x-tmpl":[".tmpl"],"text/x-astro":[".astro"],"text/x-sass":[".sass"],"text/x-scss":[".scss"],"text/x-less":[".less"],"text/x-sql":[".sql"],"application/x-sql":[".sql"],"text/x-makefile":[".makefile",".mk"],"text/x-cmake":[".cmake"],"text/x-dockerfile":[".dockerfile"],"text/x-gradle":[".gradle"],"text/x-ini":[".ini"],"text/x-properties":[".properties"],"text/x-protobuf":[".proto"],"application/x-protobuf":[".proto"],"text/x-hcl":[".hcl"],"text/x-terraform":[".tf"],"application/x-terraform":[".tf"],"text/x-diff":[".diff"],"text/x-patch":[".patch"],"application/x-patch":[".patch"],"text/x-asm":[".asm",".s"],"message/rfc822":[".eml",".mht",".mhtml",".mime",".nws"],"text/srt":[".srt"],"application/x-subrip":[".srt"],"text/x-subrip":[".srt"],"text/vtt":[".vtt"],"text/x-vcard":[".vcf"],"text/calendar":[".ics",".ifb"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"],"application/vnd.oasis.opendocument.text":[".odt"],"application/vnd.oasis.opendocument.spreadsheet":[".ods"],"application/vnd.oasis.opendocument.presentation":[".odp"],"application/vnd.apple.pages":[".pages"],"application/vnd.apple.numbers":[".numbers"],"application/vnd.apple.keynote":[".key"],"application/x-iwork-pages-sffpages":[".pages"],"application/x-iwork-numbers-sffnumbers":[".numbers"],"application/x-iwork-keynote-sffkey":[".key"]},PY=new Set(Object.keys(RY)),LY=10485760,DY=Object.entries(RY).reduce(((e,[t,n])=>{for(const r of n)e[r]=t;return e}),{});function MY(e){var t;if(e.type)return e;const n=`.${null==(t=e.name.split(".").pop())?void 0:t.toLowerCase()}`,r=DY[n];return r?new File([e],e.name,{type:r}):e}const FY=nV("div",{_id:"aiChatMessage__Files"}),jY=({children:e,...t})=>{const{message:n}=TG();if("user"!==n.role)return null;const r=(n.parts??[]).filter((e=>{if("file"!==e.type)return!1;const t=e.mediaType;return PY.has(t??"")}));return r.length?og.jsx(FY,{...t,children:e(r)}):null},zY=nV("button",{_id:"aiChatMessage__File"}),BY=({url:e,name:t,mediaType:n,onClick:r,...a})=>{const{openImagePreview:o}=EG(),[i,s]=X.useState(!0),l=X.useMemo((()=>new File([],t??"file",{type:n})),[t,n]);return og.jsx(lZ.Provider,{value:{file:l,objectUrl:e,isLoading:i,setIsLoading:s,onRemove:()=>{}},children:og.jsx(zY,{type:"button","aria-label":OY(n??"")?`Preview ${t??"file"}`:`Open ${t??"file"} in new tab`,"data-loading":H$(i),onClick:NY(r,(()=>{if(OY(n??""))o({url:e,name:t??"file"});else if(e)if(e.startsWith("data:")){const n=document.createElement("a");n.href=e,n.download=t??"file",n.click()}else window.open(e,"_blank","noopener,noreferrer")})),...a})})},HY=nV("div",{_id:"aiChatInput__Fieldset"}),UY=e=>{const t=AY();return og.jsx(HY,{...t.getDropzoneProps({disableClick:!0}),"data-drag-over":H$(t.dragging),...e})},$Y=({...e})=>{const{files:t,setFiles:n,showInputNotification:r}=xJ();return og.jsx(CY,{accept:RY,maxFiles:10,maxFileSize:LY,preventDocumentDrop:!0,acceptedFiles:t,onFileAccept:e=>n(e.files),onFileReject:e=>{const t=function(e){var t;if(!e.length)return null;const n=t=>e.some((e=>e.errors.includes(t)));if(n("TOO_MANY_FILES"))return{title:"Attachment limit reached",message:"You can only attach up to 10 files per message."};if(n("FILE_INVALID_TYPE"))return{title:"Unsupported file type",message:"Supported formats include images, PDFs, text, code, and document files."};if(n("FILE_TOO_LARGE"))return{title:"File too large",message:"Files must be smaller than 10MB."};if(n("FILE_EXISTS"))return{title:"File already exists",message:`The file "${(null==(t=e.find((e=>e.errors.includes("FILE_EXISTS"))))?void 0:t.file.name)??"file"}" is already attached to this message.`};return{title:"File rejected",message:"This file could not be added."}}(e.files);t&&r(t)},children:og.jsx(UY,{...e})})},VY=nV("div",{_id:"aiChatInput__DropZone"}),GY=nV("div",{_id:"aiChatInput__Notification"}),qY=e=>{const{inputNotification:t}=xJ();return t?og.jsx(GY,{role:"alert",...e}):null},WY=nV("p",{_id:"aiChatInput__NotificationTitle"}),YY=({children:e,...t})=>{const{inputNotification:n}=xJ();return(null==n?void 0:n.title)?og.jsxs(WY,{...t,children:[e,n.title]}):null},ZY=nV("p",{_id:"aiChatInput__NotificationMessage"}),KY=e=>{const{inputNotification:t}=xJ();return og.jsx(ZY,{...e,children:null==t?void 0:t.message})},XY=nV("button",{_id:"aiChatInput__NotificationClose"}),QY=({onClick:e,...t})=>{const{clearInputNotification:n}=xJ();return og.jsx(XY,{type:"button","aria-label":"Dismiss",onClick:NY(e,n),...t})},JY=nV("div",{_id:"aiChatInput__NotificationContent"}),eZ=nV("div",{_id:"aiChatInput__NotificationHeader"}),tZ=nV(kG,{_id:"aiChatInput__FileUploadButtonIcon",iconKey:"fileUpload"}),nZ=nV("button",{_id:"aiChatInput__FileUploadButton"}),rZ=e=>{const{aiChatSettings:t}=oR(),n=AY(),{onClick:r,...a}=e;return og.jsx(nZ,{type:"button","aria-label":"Upload file",disabled:t.isViewOnly,onClick:NY(r,(()=>n.openFilePicker())),...a})},aZ=nV("input",{_id:"aiChatInput__FileInput"}),oZ=e=>{const t=AY();return og.jsx(aZ,{...e,...t.getHiddenInputProps()})},iZ=nV("div",{_id:"aiChatInput__FileList"}),sZ=({children:e,...t})=>{const n=AY().acceptedFiles;return n.length?og.jsx(iZ,{...t,children:e(n)}):null},lZ=Q.createContext(null);function cZ(){const e=Q.useContext(lZ);if(!e)throw new Error("useFileContext must be used within EmbeddedChatPrimitiveFileItem");return e}const uZ=nV("div",{_id:"aiChatInput__FileItem"}),dZ=({file:e,...t})=>{const n=AY(),[r,a]=X.useState(void 0),[o,i]=X.useState(!0);X.useEffect((()=>n.createFileUrl(e,(e=>{a(e),i(!0)}))),[e]);return og.jsx(lZ.Provider,{value:{file:e,objectUrl:r,isLoading:o,setIsLoading:i,onRemove:()=>n.deleteFile(e)},children:og.jsx(uZ,{"data-loading":H$(o),...t})})},pZ=nV("button",{_id:"aiChatInput__FilePreviewTrigger"}),fZ=({onClick:e,...t})=>{const{objectUrl:n,file:r}=cZ(),{openImagePreview:a}=EG();return og.jsx(pZ,{type:"button","aria-label":`Preview ${r.name}`,disabled:!n,onClick:NY(e,(()=>{n&&a({url:n,name:r.name})})),...t})},hZ=nV("span",{_id:"aiChatInput__FileContent"}),mZ=e=>og.jsx(hZ,{...e}),gZ=nV("img",{_id:"aiChatInput__FileThumbnail"}),yZ=({onLoad:e,...t})=>{const{objectUrl:n,file:r,setIsLoading:a}=cZ();return og.jsx(gZ,{src:n,alt:r.name,onLoad:NY(e,(()=>a(!1))),...t})},bZ=({className:e})=>{const{file:t}=cZ(),n=IY[MY(t).type]??"file";return og.jsx(kG,{iconKey:n,className:e})},vZ=nV("span",{_id:"aiChatInput__FileName"}),kZ=e=>{const{file:t}=cZ();return og.jsx(vZ,{...e,children:t.name})},xZ=nV("button",{_id:"aiChatInput__FileRemove"}),wZ=nV(kG,{_id:"aiChatInput__FileRemoveIcon",iconKey:"close"}),EZ=({onClick:e,...t})=>{const{onRemove:n}=cZ();return og.jsx(xZ,{type:"button","aria-label":"Remove file",onClick:NY(e,n),...t})};var _Z=J[" useInsertionEffect ".trim().toString()]||HO;function SZ({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,i]=function({defaultProp:e,onChange:t}){const[n,r]=X.useState(e),a=X.useRef(n),o=X.useRef(t);return _Z((()=>{o.current=t}),[t]),X.useEffect((()=>{var e;a.current!==n&&(null==(e=o.current)||e.call(o,n),a.current=n)}),[n,a]),[n,r,o]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:a;{const t=X.useRef(void 0!==e);X.useEffect((()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s}),[s,r])}const c=X.useCallback((t=>{var n;if(s){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&(null==(n=i.current)||n.call(i,r))}else o(t)}),[s,e,o,i]);return[l,c]}const TZ=(e,t)=>{const{isOpen:n,onOpenChange:r,defaultOpen:a=!1,shortcutKey:o,triggerSelector:i=t.defaultTriggerSelector}=e??{},{logEvent:s}=lR(),[l=a,c]=SZ({prop:n,defaultProp:a??!1,onChange:r}),u=i||t.defaultTriggerSelector;(e=>{const{triggerSelector:t,onTriggerClick:n}=e;X.useEffect((()=>{const e=e=>{var r;const a=e.target;t&&(null==(r=null==a?void 0:a.matches)?void 0:r.call(a,t))&&(null==n||n())};return t&&document.addEventListener("click",e),()=>{t&&document.removeEventListener("click",e)}}),[t,n])})({triggerSelector:u,onTriggerClick:u?()=>c(!l):void 0});const d=X.useRef(!0);X.useEffect((()=>{d.current?d.current=!1:s({eventName:l?`${t.eventNamePrefix}_opened`:`${t.eventNamePrefix}_closed`,properties:{}})}),[l,t.eventNamePrefix]);const p=X.useRef(l);return p.current=l,X.useEffect((()=>{const e=e=>{o&&(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===o.toLowerCase()&&(e.preventDefault(),e.stopPropagation(),c(!0)),"Escape"===e.key&&p.current&&(e.preventDefault(),c(!1))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[o,c]),{isOpen:l,setOpen:c,shortcutKey:o}},CZ=X.createContext(void 0),AZ=({children:e,value:t})=>og.jsx(CZ.Provider,{value:t,children:e}),NZ=()=>X.useContext(CZ),IZ=X.createContext(void 0),OZ=({children:e,value:t})=>og.jsx(IZ.Provider,{value:t,children:e}),RZ=()=>{const e=X.useContext(IZ);if(!e)throw new Error("useSidebarChat must be used within a SidebarChatProvider");return e},PZ=()=>X.useContext(IZ),LZ=new TextEncoder;async function DZ(e,t){return n=await async function(e,t){return crypto.subtle.digest(e.toUpperCase(),"string"==typeof t?LZ.encode(t):new Uint8Array(t))}(e,t),[...new Uint8Array(n)].map((e=>e.toString(16).padStart(2,"0"))).join("");var n}function MZ(e){const t=/[?&]expires=(\d+)/.exec(e);return t?1e3*Number.parseInt(t[1],10):null}const FZ=async e=>{try{const t=await fetch(e,{method:"GET"});if(!t.ok)throw new Error(`Failed to fetch challenge: ${t.statusText}`);const n=await t.json(),{challenge:r,algorithm:a,salt:o,maxnumber:i}=n,{promise:s}=await function(e,t,n="SHA-256",r=1e6,a=0){const o=new AbortController,i=Date.now();return{promise:(async()=>{for(let s=a;s<=r;s+=1){if(o.signal.aborted)return null;if(await DZ(n,t+s)===e)return{number:s,took:Date.now()-i}}return null})(),controller:o}}(r,o,a,i),l=await s||void 0;if(!l)throw new Error("Challenge not solved");return{payload:{number:l.number,...n},expiresAt:MZ(o)}}catch(t){return void console.warn("[captcha] Error fetching/solving challenge:",t)}},jZ=e=>{const[t,n]=X.useState(!1);return X.useEffect((()=>{const t=window.matchMedia(e);n(t.matches);const r=e=>n(e.matches);return t.addEventListener("change",r),()=>t.removeEventListener("change",r)}),[e]),t};function zZ(e,t){if(400===e&&"object"==typeof t&&null!==t){const e=(t.detail??"").toLowerCase();if(e.includes("challenge")||e.includes("proof-of-work"))return"pow"}if(401===e&&"object"==typeof t&&null!==t){const e=t.detail??"";if(e.includes("Invalid end-user JWT")||e.includes("Bearer token required"))return"session"}return null}function BZ(e){if(!e)return{};if(e instanceof Headers){const t={};return e.forEach(((e,n)=>{t[n]=e})),t}return Array.isArray(e)?Object.fromEntries(e):e}function HZ(e,t,n,r){return{...e?{"x-inkeep-app-id":e}:{},...t?{Authorization:`Bearer ${t}`}:{},...BZ(r),...n}}function UZ({appId:e,authToken:t,getCaptchaHeader:n,invalidateCaptcha:r,refreshSession:a}){const o=X.useRef(e);o.current=e;const i=X.useRef(t);i.current=t;const s=X.useRef(n);s.current=n;const l=X.useRef(r);l.current=r;const c=X.useRef(a);c.current=a;return{fetchWithAuth:X.useCallback((async(e,t)=>{const n=await s.current(),r=HZ(o.current,i.current,n,null==t?void 0:t.headers),a=await fetch(e,{...t,headers:r});if(400!==a.status&&401!==a.status)return a;let u;try{u=await a.clone().json()}catch{return a}const d=zZ(a.status,u);if("pow"===d){l.current();const n=await s.current(),r=HZ(o.current,i.current,n,null==t?void 0:t.headers);return fetch(e,{...t,headers:r})}if("session"===d&&c.current){const n=await c.current();if(!n)return a;const r=await s.current(),i=HZ(o.current,n,r,null==t?void 0:t.headers);return fetch(e,{...t,headers:i})}return a}),[])}}const $Z=()=>{},VZ=async()=>({});function GZ(e){return new Date(e.expiresAt).getTime()-3e4<=Date.now()}const qZ=({baseUrl:e,appId:t,getCaptchaHeader:n,invalidateCaptcha:r,optOutAllAnalytics:a,enabled:o=!0})=>{const i=o&&t&&!a?`inkeep_session_${t}`:null,[s,l]=(e=>{const[t,n]=X.useState((()=>{if(!e)return null;try{const t=localStorage.getItem(e);return null!==t?JSON.parse(t):null}catch{return null}}));return[t,X.useCallback((t=>{if(n(t),e)try{null===t?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))}catch{}}),[e])]})(i),c=X.useRef(o);X.useEffect((()=>{const e=c.current;if(c.current=o,e&&!o&&t&&!a){try{localStorage.removeItem(`inkeep_session_${t}`)}catch{}l(null)}}),[o,t,a,l]);const{fetchWithAuth:u}=UZ({appId:t,authToken:void 0,getCaptchaHeader:n??VZ,invalidateCaptcha:r??$Z}),d=X.useRef(e);d.current=e;const p=X.useRef(t);p.current=t;const f=X.useRef(s);f.current=s;const h=X.useRef(l);h.current=l;const m=X.useRef(u);m.current=u;const g=X.useRef(null),y=X.useRef(o);y.current=o;const b=X.useCallback((async e=>{if(!y.current)return null;if(!d.current||!p.current)return null;if(!e&&g.current)return g.current;const t=`${d.current}/run/auth/apps/${p.current}/anonymous-session`,n=(async()=>{var n;try{const r={"Content-Type":"application/json"},a=null==(n=f.current)?void 0:n.token;a&&(r.Authorization=`Bearer ${a}`);const o=await m.current(t,{method:"POST",headers:r,signal:e});if(!o.ok)throw new Error(`Failed to fetch anonymous session: ${o.status}`);const i=await o.json();return h.current({token:i.token,expiresAt:i.expiresAt}),i.token}catch(jNe){return jNe instanceof Error&&"AbortError"===jNe.name||console.error("[anonymous-session] fetch failed",jNe),null}finally{e||(g.current=null)}})();return e||(g.current=n),n}),[]),v=X.useRef(!1);X.useEffect((()=>{if(!o)return;if(!e||!t)return;const n=!v.current;if(v.current=!0,!n&&f.current&&!GZ(f.current))return;if(g.current)return;const r=new AbortController;return b(r.signal),()=>r.abort()}),[e,t,o,b]),X.useEffect((()=>{if(!o)return;if(!e||!t||!(null==s?void 0:s.expiresAt))return;const n=new Date(s.expiresAt).getTime()-3e4-Date.now();if(n<=0)return;const r=setTimeout((()=>b()),Math.min(n,2147483647));return()=>clearTimeout(r)}),[e,t,o,null==s?void 0:s.expiresAt,b]),X.useEffect((()=>{if(!o)return;if(!e||!t)return;const n=()=>{if("visible"!==document.visibilityState)return;const e=f.current;e&&!GZ(e)||b()};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)}),[e,t,o,b]);const k=X.useCallback((()=>b()),[b]);return{sessionToken:(null==s?void 0:s.token)??null,refreshSession:k}};const WZ=()=>{const{baseSettings:e}=oR(),{getAuthToken:t}=e,[n,r]=X.useState(null),[a,o]=X.useState(!!t),i=X.useRef(null),s=X.useRef(t);s.current=t;const l=X.useCallback((async()=>{const e=s.current;if(!e)return null;if(i.current)return i.current;const t=(async()=>{try{const t=await e();return r(t),t}catch(jNe){return console.error("[useAuthToken] getAuthToken failed",jNe),r(null),null}finally{i.current=null,o(!1)}})();return i.current=t,t}),[]);X.useEffect((()=>{if(!t)return r(null),void o(!1);l()}),[t,l]),X.useEffect((()=>{if(!t||!n)return;const e=function(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")));return"number"==typeof n.exp?1e3*n.exp:null}catch{return null}}(n);if(!e)return;const r=e-3e4-Date.now();if(r<=0)return;const a=setTimeout((()=>l()),Math.min(r,2147483647));return()=>clearTimeout(a)}),[t,n,l]);const c=X.useCallback((async()=>s.current?l():null),[l]);return{authToken:n,isLoading:a,refreshToken:c}},YZ=()=>{};function ZZ(e=21){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,(e=>e.toString(36))).join("").slice(0,e)}const KZ=new Map;function XZ(e="id"){const t=(KZ.get(e)||0)+1;return KZ.set(e,t),`${e}${t}`}function QZ(e){const t=Number(e.code)||Number(e.statusCode);if(t&&!Number.isNaN(t))return t;try{const t=Number(JSON.parse(e.message??"").status);return t&&!Number.isNaN(t)?t:null}catch{return null}}const JZ="Hmm.. \n\nIt seems I might be having some issues right now. Please clear the chat and try again.",eK="Please try again.",tK=()=>{const{baseSettings:e,aiChatSettings:t}=oR(),[n="",r]=SZ({prop:t.conversationIdOverride,defaultProp:t.conversationIdOverride??""}),a=PP(),o=NZ(),i=PZ(),{logEvent:s}=lR(),{setConversationId:l,emitToParent:c}=function(){const e=qO(),t=null==e?void 0:e.shadowHost,n=X.useRef("");return{setConversationId:X.useCallback((e=>{n.current=e}),[]),emitToParent:X.useCallback(((e,r)=>{if(!t)return void console.warn("useStreamingEvents: No host element available for parent event emission");const a=new CustomEvent(`ikp-${e}`,{detail:{...r,conversationId:n.current,timestamp:Date.now()},bubbles:!0,composed:!0});t.dispatchEvent(a)}),[t])}}(),u=X.useRef(n);X.useEffect((()=>{const e=u.current;u.current=n,e!==n&&s({eventName:"chat_conversation_changed",properties:{conversationId:n,previousConversationId:e}})}),[n,s]);const[d,p]=X.useState(""),{shouldBypassCaptcha:f,filters:h,privacyPreferences:m,userProperties:g}=e,{authToken:y,isLoading:b,refreshToken:v}=WZ(),k=!!e.getAuthToken,x=!!y,{onInputMessageChange:w,filters:E,baseUrl:_,agentUrl:S,context:T,headers:C,appId:A,apiKey:N,files:I}=t,O=(null==a?void 0:a.isOpen)??(null==o?void 0:o.isOpen)??(null==i?void 0:i.isOpen)??!0,{getCaptchaHeader:R,invalidate:P}=(({baseUrl:e,shouldBypassCaptcha:t=!1,shouldMakeInitialRequest:n=!0})=>{const r=`${e}/run/auth/pow/challenge`,a=X.useRef(null),o=X.useRef(null),i=X.useCallback((()=>{const e=FZ(r);a.current=e,e.then((e=>{e&&(o.current=e.expiresAt)}))}),[r]),s=X.useCallback((async()=>{if(t)return{};a.current||i();const e=a.current;a.current=null,i();const n=a.current,r=await e;if(!r){const e=await n;return e?{"x-inkeep-challenge-solution":btoa(JSON.stringify(e.payload))}:{}}if(null!==r.expiresAt&&Date.now()>=r.expiresAt){const e=await n;return e?{"x-inkeep-challenge-solution":btoa(JSON.stringify(e.payload))}:{}}return{"x-inkeep-challenge-solution":btoa(JSON.stringify(r.payload))}}),[t,i]),l=X.useCallback((()=>{t||i()}),[t,i]);return X.useEffect((()=>{if(!n||t)return;const e=null!==o.current&&Date.now()>=o.current-3e4;a.current&&!e||i()}),[n,t,i]),{getCaptchaHeader:s,invalidate:l}})({baseUrl:_,shouldBypassCaptcha:f||!!N,shouldMakeInitialRequest:O}),L=X.useRef(R);L.current=R;const D=S||`${_}/run/api/chat`,{sessionToken:M,refreshSession:F}=qZ({baseUrl:_,appId:A,getCaptchaHeader:R,invalidateCaptcha:P,optOutAllAnalytics:null==m?void 0:m.optOutAllAnalytics,enabled:!x&&!b}),j=N??(x?y:M),{loadConversation:z}=(({baseUrl:e,appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a,refreshSession:o})=>{const{fetchWithAuth:i}=UZ({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??YZ,refreshSession:o});return{loadConversation:X.useCallback((async(t,r)=>{var a;if(!e||!n)return null;try{const n=`${e}/run/v1/conversations/${t}`,o=await i(n,{signal:r});if(!o.ok)throw new Error(`Failed to load conversation: ${o.status}`);return(null==(a=(await o.json()).data)?void 0:a.messages)??[]}catch(jNe){return jNe instanceof Error&&"AbortError"===jNe.name||console.error("[useConversationLoader]",jNe),null}}),[e,n,i])}})({baseUrl:_,appId:A,authToken:j,getCaptchaHeader:R,invalidateCaptcha:P,refreshSession:N||x?void 0:F}),[B,H]=X.useState(!1),U=X.useRef(null);U.current=M;const $=X.useRef(null);$.current=y;const V=X.useRef(void 0);V.current=g&&Object.keys(g).length>0?JSON.stringify(g):void 0;const G=X.useRef(0),q=X.useRef(null),W=X.useRef(null),Y=X.useRef(void 0),Z=(null==I?void 0:I.map((e=>`${e.filename??""}:${e.mediaType}:${e.url.length}:${e.url.slice(0,64)}:${e.url.slice(-32)}`)).join("\n"))??"";X.useEffect((()=>{Y.current=(null==I?void 0:I.length)?I:void 0}),[Z]);const K=X.useRef(C);K.current=C;const Q=X.useRef(void 0);Q.current=h||E?JSON.stringify({...h,...E}):void 0;const[J,ee]=X.useState([]),te=X.useMemo((()=>new AU({api:D,headers:()=>{const e=N??$.current??U.current;return{"x-inkeep-client-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone,"x-inkeep-client-timestamp":(new Date).toISOString(),"x-inkeep-invocation-type":"chat_widget",...A?{"x-inkeep-app-id":A}:{},...e?{Authorization:`Bearer ${e}`}:{},...Q.current?{"inkeep-filters":Q.current}:{},...V.current?{"x-inkeep-user-properties":V.current}:{},...K.current}},prepareSendMessagesRequest:async e=>{const t=await L.current(),n=e.messages[e.messages.length-1];return n||console.warn("[useInkeepChat] prepareSendMessagesRequest called with empty messages array"),{body:{...e.body,id:e.id,messages:n?[n]:[],trigger:e.trigger,messageId:e.messageId},headers:{...e.headers,...t}}},body:{requestContext:T}})),[D,T,A,N]),{messages:ne,sendMessage:re,addToolApprovalResponse:ae,status:oe,setMessages:ie,stop:se,error:le}=function({experimental_throttle:e,resume:t=!1,...n}={}){const r=X.useRef("chat"in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});"chat"in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});const a={...n,onToolCall:e=>{var t,n;return null==(n=(t=r.current).onToolCall)?void 0:n.call(t,e)},onData:e=>{var t,n;return null==(n=(t=r.current).onData)?void 0:n.call(t,e)},onFinish:e=>{var t,n;return null==(n=(t=r.current).onFinish)?void 0:n.call(t,e)},onError:e=>{var t,n;return null==(n=(t=r.current).onError)?void 0:n.call(t,e)},sendAutomaticallyWhen:e=>{var t,n,a;return null!=(a=null==(n=(t=r.current).sendAutomaticallyWhen)?void 0:n.call(t,e))&&a}},o=X.useRef("chat"in n?n.chat:new r$(a));("chat"in n&&n.chat!==o.current||"id"in n&&o.current.id!==n.id)&&(o.current="chat"in n?n.chat:new r$(a));const i=X.useCallback((t=>o.current["~registerMessagesCallback"](t,e)),[e,o.current.id]),s=X.useSyncExternalStore(i,(()=>o.current.messages),(()=>o.current.messages)),l=X.useSyncExternalStore(o.current["~registerStatusCallback"],(()=>o.current.status),(()=>o.current.status)),c=X.useSyncExternalStore(o.current["~registerErrorCallback"],(()=>o.current.error),(()=>o.current.error)),u=X.useCallback((e=>{"function"==typeof e&&(e=e(o.current.messages)),o.current.messages=e}),[o]);return X.useEffect((()=>{t&&o.current.resumeStream()}),[t,o]),{id:o.current.id,messages:s,setMessages:u,sendMessage:o.current.sendMessage,regenerate:o.current.regenerate,clearError:o.current.clearError,stop:o.current.stop,error:c,resumeStream:o.current.resumeStream,status:l,addToolResult:o.current.addToolOutput,addToolOutput:o.current.addToolOutput,addToolApprovalResponse:o.current.addToolApprovalResponse}}({transport:te,onData(e){c(e.type,e.data)},async onFinish(){c("completion",{conversationId:n}),await s({eventName:"assistant_message_received",properties:{conversationId:n}}),s({eventName:"assistant_answer_displayed",properties:{conversationId:n}})},onError(t){var r;console.error("onError",{code:t.code,message:t.message});const a=f||N?null:function(e){const t=QZ(e),n=zZ(t??0,{detail:e.message??""});return null!==n?n:401===t?"session":null}(t);if(null!==a&&G.current<1){G.current++;const e=W.current,t=q.current;return void(async()=>{var n;if("session"===a&&k){const e=await v();if(!e)throw new Error("Auth token refresh failed");$.current=e}else if("session"===a){const e=await F();e&&(U.current=e)}else P();e?ae(e):t&&(ie((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r})),re((null==(n=t.files)?void 0:n.length)?{parts:[{type:"text",text:t.content},...t.files]}:{text:t.content},{body:t.body}))})().catch((()=>{G.current=0,P(),ie((e=>{const t=[...e],n=t[t.length-1];if(!n)return t;const r=JZ;return"user"===n.role?t.push({id:ZZ(16),role:"assistant",parts:[{type:"text",text:r}]}):n.parts=[{type:"text",text:r}],t}))}))}G.current=0,null!==a&&P();const o=function(e){const t=QZ(e);return 400===t||429===t}(t),i=(t=>{var n,r;switch(QZ(t)){case 400:try{const e=JSON.parse(t.message??"");return e.detail??(null==(n=e.error)?void 0:n.message)??eK}catch{return(null==(r=t.message)?void 0:r.trim())||eK}case 401:return k?"Authentication failed. Please try again.":JZ;case 403:return`There seems to be a configuration error. Please contact ${e.organizationDisplayName??"Administrator"}`;case 429:return"You're sending requests too quickly. Please wait a moment and try again.";default:return JZ}})(t);if(s({eventName:"chat_error",properties:{conversationId:n,error:t.message}}),o){_e({title:"Request failed",message:i},8e3),ie((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r}));const e=null==(r=q.current)?void 0:r.content;return e&&p(e),void(we.current=t)}ie((e=>{const t=[...e],n=t[t.length-1];return n&&("user"===n.role?t.push({id:ZZ(16),role:"assistant",parts:[{type:"text",text:i}]}):n.parts=[{type:"text",text:i}]),t}))}}),ce=X.useRef(x);X.useEffect((()=>{const e=ce.current;ce.current=x,e!==x&&(se(),xe(null),ie([]),r(""),p(""),ee([]),P())}),[x,se,ie,r,P]);const ue="submitted"===oe,de="streaming"===oe,pe=X.useMemo((()=>{var e,t;const n=[...ne??[]].reverse().find((e=>"assistant"===e.role));if(!n)return!1;const r=null==(e=n.parts)?void 0:e.at(-1);return!!(e=>{if(!e||"object"!=typeof e)return!1;const t=e;return"string"==typeof t.type&&t.type.startsWith("tool-")})(r)&&("output-available"===r.state&&(!!(null==(t=r.approval)?void 0:t.id)&&!de))}),[ne,de]),[fe,he]=X.useState(!1),me=de||pe&&!fe,ge=ue||me,ye=0===ne.length,be=!d.trim()&&0===J.length||ge,ve=jZ("(max-width: 768px)"),[ke,xe]=X.useState(null),we=X.useRef(null);X.useEffect((()=>{if(le){if(we.current===le)return void(we.current=null);xe(le)}}),[le]);const{inputNotification:Ee,showInputNotification:_e,clearInputNotification:Se}=function(){const[e,t]=X.useState(null),n=X.useRef(null),r=X.useCallback(((e,r=5e3)=>{n.current&&clearTimeout(n.current),t(e),n.current=setTimeout((()=>t(null)),r)}),[]),a=X.useCallback((()=>{n.current&&clearTimeout(n.current),t(null)}),[]);return X.useEffect((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{inputNotification:e,showInputNotification:r,clearInputNotification:a}}(),Te=X.useRef(null);X.useEffect((()=>{null==w||w(d)}),[d]);const Ce=async(e=d)=>{if(be&&(!e||0===e.trim().length)&&0===J.length)return;const t=J;ee([]),p(""),G.current=0,W.current=null,he(!1),await s({eventName:"user_message_submitted",properties:{conversationId:n}});let a=n;a||(a=`conv_${ZZ(16)}`,r(a)),l(a);const o=Y.current;let i,c;if(Y.current=void 0,null==o?void 0:o.length){let n;try{n=await Promise.all(t.map((e=>{const t=MY(e);return new Promise(((e,n)=>{const r=new FileReader;r.onload=()=>{"string"==typeof r.result?e({type:"file",url:r.result,mediaType:t.type,filename:t.name}):n(new Error(`Failed to read file "${t.name}"`))},r.onerror=()=>n(new Error(`Failed to read file "${t.name}"`)),r.readAsDataURL(t)}))})))}catch(u){return void _e({title:"Failed to attach files",message:"Could not read one or more files. Please try again."})}c=[...n,...o],i=e.trim()?{parts:[{type:"text",text:e},...c]}:{parts:c}}else if(t.length>0){const n=new DataTransfer;for(const e of t)n.items.add(MY(e));const r=n.files;i=e.trim()?{text:e,files:r}:{files:r}}else i={text:e};q.current={content:e,body:{conversationId:a},files:c},re(i,{body:{conversationId:a}})},Ae=X.useCallback((e=>{G.current=0,W.current=e,he(!1),ae(e)}),[ae]),Ne=X.useCallback((()=>{he(!0),se().then((()=>{c("aborted",{conversationId:n})}))}),[se,n,c]),Ie=()=>{xe(null),ie([]),r(""),P(),Y.current=(null==I?void 0:I.length)?I:void 0,s({eventName:"chat_clear_button_clicked",properties:{conversationId:n}})},Oe=X.useCallback(((e,t)=>{xe(null),ie(t),r(e),P(),Y.current=void 0}),[ie,r,P]),Re=X.useCallback((async(e,t)=>{Ne(),Oe(e,[]),H(!0);try{const n=await z(e,t);if(null===n)return!1;const r=n[n.length-1],a="user"===(null==r?void 0:r.role)?[...n,{id:ZZ(16),role:"assistant",parts:[{type:"text",text:"This session was interrupted. Please check back in a few minutes or start a new conversation."}]}]:n;return Oe(e,a),!0}finally{(null==t?void 0:t.aborted)||H(!1)}}),[Oe,z,Ne]);(({conversationId:e,effectiveAuthToken:t,loadAndRestoreSession:n,onLoadFailed:r})=>{const a=X.useRef(null),o=X.useRef(n);o.current=n;const i=X.useRef(r);i.current=r,X.useEffect((()=>{if(!e||!t)return;if(a.current===e)return;a.current=e;const n=new AbortController,r=t=>{var n;a.current=null,console.error("[useInitialConversation] failed to load conversation:",e,t),null==(n=i.current)||n.call(i)};return(async()=>{try{await o.current(e,n.signal)||n.signal.aborted||r()}catch(jNe){n.signal.aborted||r(jNe)}})(),()=>{a.current=null,n.abort()}}),[e,t])})({conversationId:t.conversationId,effectiveAuthToken:j,loadAndRestoreSession:Re,onLoadFailed:()=>Oe("",[])});const{openForm:Pe}=jP(),Le=e0();return X.useImperativeHandle(t.chatFunctionsRef,(()=>({submitMessage:Ce,updateInputMessage(e){p(e)},clearChat:Ie,openForm:e=>{null==Le||Le.setView("chat"),Pe(e,void 0)},focusInput:()=>{var e;null==(e=Te.current)||e.focus()}}))),{messages:ne,sendMessage:re,addToolApprovalResponse:Ae,isLoading:ue,isStreaming:me,isBusy:ge,error:ke,setError:xe,isSubmitDisabled:be,input:d,handleInputChange:e=>p(e.target.value),handleInputKeyDown:e=>{"Enter"!==e.key||e.shiftKey||be||e.nativeEvent.isComposing||(e.preventDefault(),Ce())},handleSubmit:Ce,stop:Ne,clear:Ie,inputRef:Te,isMobile:ve,files:J,setFiles:ee,isNewChat:ye,conversationId:n,restoreSession:Oe,loadAndRestoreSession:Re,isSessionLoading:B,authToken:x?y:M,refreshSession:x?v:F,getCaptchaHeader:R,invalidateCaptcha:P,inputNotification:Ee,showInputNotification:_e,clearInputNotification:Se}},nK=()=>{};const rK=X.createContext(void 0);function aK(){const{baseSettings:e,aiChatSettings:t}=oR(),[n,r]=X.useState(null),[a,o]=X.useState({}),{conversationId:i,messages:s,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d}=xJ(),{analyticsProperties:p}=e,{logEvent:f}=lR(),{submitFeedback:h}=function({baseUrl:e,appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a,refreshSession:o}){const{fetchWithAuth:i}=UZ({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??nK,refreshSession:o});return{submitFeedback:X.useCallback((async({conversationId:t,messageId:r,type:a,details:o})=>{if(!e||!n)return;const s=`${e}/run/v1/feedback`,l=await i(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,messageId:r,type:a,details:o})});if(!l.ok)throw new Error(`Feedback submission failed: ${l.status}`);return l.json()}),[e,n,i])}}({baseUrl:t.baseUrl,appId:t.appId,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d}),m=X.useCallback((async(t,n,r)=>{o((e=>({...e,[t]:{type:n,messageId:t,details:r}}))),e.onFeedback?e.onFeedback({type:n,messageId:t,details:r,properties:p}).catch((e=>console.warn("[feedback] onFeedback error:",e))):h({conversationId:i,messageId:t,type:n,details:r}).catch((e=>console.warn("[feedback] submitFeedbackToApi error:",e)));const a=s.findIndex((e=>e.id===t)),l=s[a],c={conversationId:i,question:G$(s[a-1]),answer:G$(l),messageId:t,details:r};f({eventName:"positive"===n?"assistant_positive_feedback_submitted":"assistant_negative_feedback_submitted",properties:c}),"negative"===n&&f({eventName:"user_escalation_indicated",properties:{escalationType:"downvote",conversationId:i}})}),[s,i,p,e,f,h]);return{feedback:a,currentFeedback:n,setCurrentFeedback:r,submitPositiveFeedback:X.useCallback((async e=>{m(e,"positive")}),[m]),submitNegativeFeedback:X.useCallback((async(e,t)=>{m(e,"negative",t)}),[m])}}const oK=({children:e})=>{const t=aK();return og.jsx(rK.Provider,{value:t,children:e})},iK=()=>{const e=X.useContext(rK);if(!e)throw new Error("useFeedback must be used within a FeedbackProvider");return e};function sK(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function lK(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function cK(...e){return t=>{let n=!1;const r=e.map((e=>{const r=lK(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():lK(e[t],null)}}}}function uK(...e){return X.useCallback(cK(...e),e)}function dK(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},pK(r,...t)]}function pK(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var fK=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(gK);if(o){const e=o.props.children,n=a.map((t=>t===o?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(hK,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return og.jsx(hK,{...r,ref:t,children:n})}));fK.displayName="Slot";var hK=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n);return X.cloneElement(n,{...yK(r,n.props),ref:t?cK(t,e):e})}return X.Children.count(n)>1?X.Children.only(null):null}));hK.displayName="SlotClone";var mK=({children:e})=>og.jsx(og.Fragment,{children:e});function gK(e){return X.isValidElement(e)&&e.type===mK}function yK(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}var bK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=X.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?fK:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function vK(e){const t=X.useRef(e);return X.useEffect((()=>{t.current=e})),X.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function kK(e,t=(null==globalThis?void 0:globalThis.document)){const n=vK(e);X.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var xK,wK="dismissableLayer.update",EK="dismissableLayer.pointerDownOutside",_K="dismissableLayer.focusOutside",SK=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),TK=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(SK),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=uK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=vK(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){AK(EK,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=vK(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){AK(_K,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return kK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(xK=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),CK(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=xK)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),CK())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(wK,e),()=>document.removeEventListener(wK,e)}),[]),og.jsx(bK.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:sK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:sK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:sK(e.onPointerDownCapture,x.onPointerDownCapture)})}));TK.displayName="DismissableLayer";function CK(){const e=new CustomEvent(wK);document.dispatchEvent(e)}function AK(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(SK),r=X.useRef(null),a=uK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx(bK.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var NK=Boolean(null==globalThis?void 0:globalThis.document)?X.useLayoutEffect:()=>{},IK=J["useId".toString()]||(()=>{}),OK=0;function RK(e){const[t,n]=X.useState(IK());return NK((()=>{n((e=>e??String(OK++)))}),[e]),e||(t?`radix-${t}`:"")}const PK=["top","right","bottom","left"],LK=Math.min,DK=Math.max,MK=Math.round,FK=Math.floor,jK=e=>({x:e,y:e}),zK={left:"right",right:"left",bottom:"top",top:"bottom"};function BK(e,t,n){return DK(e,LK(t,n))}function HK(e,t){return"function"==typeof e?e(t):e}function UK(e){return e.split("-")[0]}function $K(e){return e.split("-")[1]}function VK(e){return"x"===e?"y":"x"}function GK(e){return"y"===e?"height":"width"}function qK(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function WK(e){return VK(qK(e))}function YK(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ZK=["left","right"],KK=["right","left"],XK=["top","bottom"],QK=["bottom","top"];function JK(e,t,n,r){const a=$K(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?KK:ZK:t?ZK:KK;case"left":case"right":return t?XK:QK;default:return[]}}(UK(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(YK)))),o}function eX(e){const t=UK(e);return zK[t]+e.slice(t.length)}function tX(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function nX(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function rX(e,t,n){let{reference:r,floating:a}=e;const o=qK(t),i=WK(t),s=GK(i),l=UK(t),c="y"===o,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,p=r[s]/2-a[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-a.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-a.width,y:d};break;default:f={x:r.x,y:r.y}}switch($K(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1)}return f}async function aX(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=HK(t,e),h=tX(f),m=s[p?"floating"===d?"reference":"floating":d],g=nX(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),v=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},k=nX(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-k.top+h.top)/v.y,bottom:(k.bottom-g.bottom+h.bottom)/v.y,left:(g.left-k.left+h.left)/v.x,right:(k.right-g.right+h.right)/v.x}}function oX(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iX(e){return PK.some((t=>e[t]>=0))}const sX=new Set(["left","top"]);function lX(){return"undefined"!=typeof window}function cX(e){return pX(e)?(e.nodeName||"").toLowerCase():"#document"}function uX(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function dX(e){var t;return null==(t=(pX(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function pX(e){return!!lX()&&(e instanceof Node||e instanceof uX(e).Node)}function fX(e){return!!lX()&&(e instanceof Element||e instanceof uX(e).Element)}function hX(e){return!!lX()&&(e instanceof HTMLElement||e instanceof uX(e).HTMLElement)}function mX(e){return!(!lX()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof uX(e).ShadowRoot)}function gX(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=TX(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function yX(e){return/^(table|td|th)$/.test(cX(e))}function bX(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const vX=/transform|translate|scale|rotate|perspective|filter/,kX=/paint|layout|strict|content/,xX=e=>!!e&&"none"!==e;let wX;function EX(e){const t=fX(e)?TX(e):e;return xX(t.transform)||xX(t.translate)||xX(t.scale)||xX(t.rotate)||xX(t.perspective)||!_X()&&(xX(t.backdropFilter)||xX(t.filter))||vX.test(t.willChange||"")||kX.test(t.contain||"")}function _X(){return null==wX&&(wX="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wX}function SX(e){return/^(html|body|#document)$/.test(cX(e))}function TX(e){return uX(e).getComputedStyle(e)}function CX(e){return fX(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function AX(e){if("html"===cX(e))return e;const t=e.assignedSlot||e.parentNode||mX(e)&&e.host||dX(e);return mX(t)?t.host:t}function NX(e){const t=AX(e);return SX(t)?e.ownerDocument?e.ownerDocument.body:e.body:hX(t)&&gX(t)?t:NX(t)}function IX(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=NX(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=uX(a);if(o){const e=OX(i);return t.concat(i,i.visualViewport||[],gX(a)?a:[],e&&n?IX(e):[])}return t.concat(a,IX(a,[],n))}function OX(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RX(e){const t=TX(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=hX(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=MK(n)!==o||MK(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function PX(e){return fX(e)?e:e.contextElement}function LX(e){const t=PX(e);if(!hX(t))return jK(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=RX(t);let i=(o?MK(n.width):n.width)/r,s=(o?MK(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const DX=jK(0);function MX(e){const t=uX(e);return _X()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:DX}function FX(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=PX(e);let i=jK(1);t&&(r?fX(r)&&(i=LX(r)):i=LX(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==uX(e))&&t}(o,n,r)?MX(o):jK(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=uX(o),t=r&&fX(r)?uX(r):r;let n=e,a=OX(n);for(;a&&r&&t!==n;){const e=LX(a),t=a.getBoundingClientRect(),r=TX(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=uX(a),a=OX(n)}}return nX({width:u,height:d,x:l,y:c})}function jX(e,t){const n=CX(e).scrollLeft;return t?t.left+n:FX(dX(e)).left+n}function zX(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-jX(e,n),y:n.top+t.scrollTop}}function BX(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=uX(e),r=dX(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const e=_X();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}const c=jX(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-a);i<=25&&(o-=i)}else c<=25&&(o+=c);return{width:o,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=dX(e),n=CX(e),r=e.ownerDocument.body,a=DK(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=DK(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+jX(e);const s=-n.scrollTop;return"rtl"===TX(r).direction&&(i+=DK(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(dX(e));else if(fX(t))r=function(e,t){const n=FX(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=hX(e)?LX(e):jK(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}(t,n);else{const n=MX(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nX(r)}function HX(e,t){const n=AX(e);return!(n===t||!fX(n)||SX(n))&&("fixed"===TX(n).position||HX(n,t))}function UX(e,t,n){const r=hX(t),a=dX(t),o="fixed"===n,i=FX(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=jK(0);function c(){l.x=jX(a)}if(r||!r&&!o)if(("body"!==cX(t)||gX(a))&&(s=CX(t)),r){const e=FX(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();o&&!r&&a&&c();const u=!a||r||o?jK(0):zX(a,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function $X(e){return"static"===TX(e).position}function VX(e,t){if(!hX(e)||"fixed"===TX(e).position)return null;if(t)return t(e);let n=e.offsetParent;return dX(e)===n&&(n=n.ownerDocument.body),n}function GX(e,t){const n=uX(e);if(bX(e))return n;if(!hX(e)){let t=AX(e);for(;t&&!SX(t);){if(fX(t)&&!$X(t))return t;t=AX(t)}return n}let r=VX(e,t);for(;r&&yX(r)&&$X(r);)r=VX(r,t);return r&&SX(r)&&$X(r)&&!EX(r)?n:r||function(e){let t=AX(e);for(;hX(t)&&!SX(t);){if(EX(t))return t;if(bX(t))return null;t=AX(t)}return null}(e)||n}const qX={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=dX(r),s=!!t&&bX(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=jK(1);const u=jK(0),d=hX(r);if((d||!d&&!o)&&(("body"!==cX(r)||gX(i))&&(l=CX(r)),d)){const e=FX(r);c=LX(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!i||d||o?jK(0):zX(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:dX,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?bX(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=IX(e,[],!1).filter((e=>fX(e)&&"body"!==cX(e))),a=null;const o="fixed"===TX(e).position;let i=o?AX(e):e;for(;fX(i)&&!SX(i);){const t=TX(i),n=EX(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&("absolute"===a.position||"fixed"===a.position)||gX(i)&&!n&&HX(e,i))?r=r.filter((e=>e!==i)):a=t,i=AX(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=BX(t,o[0],a);let s=i.top,l=i.right,c=i.bottom,u=i.left;for(let d=1;d<o.length;d++){const e=BX(t,o[d],a);s=DK(e.top,s),l=LK(e.right,l),c=LK(e.bottom,c),u=DK(e.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:GX,getElementRects:async function(e){const t=this.getOffsetParent||GX,n=this.getDimensions,r=await n(e.floating);return{reference:UX(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=RX(e);return{width:t,height:n}},getScale:LX,isElement:fX,isRTL:function(e){return"rtl"===TX(e).direction}};function WX(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function YX(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=PX(e),u=a||o?[...c?IX(c):[],...t?IX(t):[]]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const a=dX(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-FK(d)+"px "+-FK(a.clientWidth-(u+p))+"px "+-FK(a.clientHeight-(d+f))+"px "+-FK(u)+"px",threshold:DK(0,LK(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return i();r?i(!1,r):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}1!==r||WX(c,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(g,{...h,root:a.ownerDocument})}catch(y){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),o}(c,n):null;let p,f=-1,h=null;i&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),t&&h.observe(t));let m=l?FX(e):null;return l&&function t(){const r=FX(e);m&&!WX(m,r)&&n();m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const ZX=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=UK(n),s=$K(n),l="y"===qK(n),c=sX.has(i)?-1:1,u=o&&l?-1:1,d=HK(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},KX=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=HK(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),p=qK(UK(a)),f=VK(p);let h=u[f],m=u[p];if(i){const e="y"===f?"bottom":"right";h=BK(h+d["y"===f?"top":"left"],h,h-d[e])}if(s){const e="y"===p?"bottom":"right";m=BK(m+d["y"===p?"top":"left"],m,m-d[e])}const g=l.fn({...t,[f]:h,[p]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[p]:s}}}}}},XX=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=HK(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=UK(a),b=qK(s),v=UK(s)===s,k=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[eX(s)]:function(e){const t=eX(e);return[YK(e),t,YK(t)]}(s)),w="none"!==h;!p&&w&&x.push(...JK(s,m,h,k));const E=[s,...x],_=await l.detectOverflow(t,g),S=[];let T=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&S.push(_[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=$K(e),a=WK(e),o=GK(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=eX(i)),[i,eX(i)]}(a,i,k);S.push(_[e[0]],_[e[1]])}if(T=[...T,{placement:a,overflows:S}],!S.every((e=>e<=0))){var C,A;const e=((null==(C=o.flip)?void 0:C.index)||0)+1,t=E[e];if(t){if(!("alignment"===d&&b!==qK(t))||T.every((e=>qK(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(A=T.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=T.filter((e=>{if(w){const t=qK(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},QX=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:l=()=>{},...c}=HK(e,t),u=await i.detectOverflow(t,c),d=UK(a),p=$K(a),f="y"===qK(a),{width:h,height:m}=o.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=p===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===p?"top":"bottom");const b=m-u.top-u.bottom,v=h-u.left-u.right,k=LK(m-u[g],b),x=LK(h-u[y],v),w=!t.middlewareData.shift;let E=k,_=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=b),w&&!p){const e=DK(u.left,0),t=DK(u.right,0),n=DK(u.top,0),r=DK(u.bottom,0);f?_=h-2*(0!==e||0!==t?e+t:DK(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:DK(u.top,u.bottom))}await l({...t,availableWidth:_,availableHeight:E});const S=await i.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},JX=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=HK(e,t);switch(a){case"referenceHidden":{const e=oX(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:iX(e)}}}case"escaped":{const e=oX(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:iX(e)}}}default:return{}}}}},eQ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=HK(e,t)||{};if(null==c)return{};const d=tX(u),p={x:n,y:r},f=WK(a),h=GK(f),m=await i.getDimensions(c),g="y"===f,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",k=o.reference[h]+o.reference[f]-p[f]-o.floating[h],x=p[f]-o.reference[f],w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let E=w?w[v]:0;E&&await(null==i.isElement?void 0:i.isElement(w))||(E=s.floating[v]||o.floating[h]);const _=k/2-x/2,S=E/2-m[h]/2-1,T=LK(d[y],S),C=LK(d[b],S),A=T,N=E-m[h]-C,I=E/2-m[h]/2+_,O=BK(A,I,N),R=!l.arrow&&null!=$K(a)&&I!==O&&o.reference[h]/2-(I<A?T:C)-m[h]/2<0,P=R?I<A?I-A:I-N:0;return{[f]:p[f]+P,data:{[f]:O,centerOffset:I-O-P,...R&&{alignmentOffset:P}},reset:R}}}),tQ=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=HK(e,t),u={x:n,y:r},d=qK(a),p=VK(d);let f=u[p],h=u[d];const m=HK(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=o.reference[p]-o.floating[e]+g.mainAxis,n=o.reference[p]+o.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var y,b;const e="y"===p?"width":"height",t=sX.has(UK(a)),n=o.reference[d]-o.floating[e]+(t&&(null==(y=i.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(b=i.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[p]:f,[d]:h}}}},nQ=(e,t,n)=>{const r=new Map,a={platform:qX,...n},o={...a.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:aX},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=rX(c,r,l),p=r,f=0;const h={};for(let m=0;m<o.length;m++){const n=o[m];if(!n)continue;const{name:g,fn:y}=n,{x:b,y:v,data:k,reset:x}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:a,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=b?b:u,d=null!=v?v:d,h[g]={...h[g],...k},x&&f<50&&(f++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):x.rects),({x:u,y:d}=rX(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var rQ="undefined"!=typeof document?X.useLayoutEffect:function(){};function aQ(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!aQ(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!aQ(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function oQ(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iQ(e,t){const n=oQ(e);return Math.round(t*n)/n}function sQ(e){const t=X.useRef(e);return rQ((()=>{t.current=e})),t}function lQ(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=X.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=X.useState(r);aQ(p,r)||f(r);const[h,m]=X.useState(null),[g,y]=X.useState(null),b=X.useCallback((e=>{e!==w.current&&(w.current=e,m(e))}),[]),v=X.useCallback((e=>{e!==E.current&&(E.current=e,y(e))}),[]),k=o||h,x=i||g,w=X.useRef(null),E=X.useRef(null),_=X.useRef(u),S=null!=l,T=sQ(l),C=sQ(a),A=sQ(c),N=X.useCallback((()=>{if(!w.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};C.current&&(e.platform=C.current),nQ(w.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};I.current&&!aQ(_.current,t)&&(_.current=t,ue.flushSync((()=>{d(t)})))}))}),[p,t,n,C,A]);rQ((()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const I=X.useRef(!1);rQ((()=>(I.current=!0,()=>{I.current=!1})),[]),rQ((()=>{if(k&&(w.current=k),x&&(E.current=x),k&&x){if(T.current)return T.current(k,x,N);N()}}),[k,x,N,T,S]);const O=X.useMemo((()=>({reference:w,floating:E,setReference:b,setFloating:v})),[b,v]),R=X.useMemo((()=>({reference:k,floating:x})),[k,x]),P=X.useMemo((()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=iQ(R.floating,u.x),r=iQ(R.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...oQ(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,R.floating,u.x,u.y]);return X.useMemo((()=>({...u,update:N,refs:O,elements:R,floatingStyles:P})),[u,N,O,R,P])}const cQ=(e,t)=>{const n=ZX(e);return{name:n.name,fn:n.fn,options:[e,t]}},uQ=(e,t)=>{const n=KX(e);return{name:n.name,fn:n.fn,options:[e,t]}},dQ=(e,t)=>({fn:tQ(e).fn,options:[e,t]}),pQ=(e,t)=>{const n=XX(e);return{name:n.name,fn:n.fn,options:[e,t]}},fQ=(e,t)=>{const n=QX(e);return{name:n.name,fn:n.fn,options:[e,t]}},hQ=(e,t)=>{const n=JX(e);return{name:n.name,fn:n.fn,options:[e,t]}},mQ=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?eQ({element:n.current,padding:r}).fn(t):{}:n?eQ({element:n,padding:r}).fn(t):{};var a}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var gQ=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx(bK.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));gQ.displayName="Arrow";var yQ=gQ;function bQ(e){const[t,n]=X.useState(void 0);return NK((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var vQ="Popper",[kQ,xQ]=dK(vQ),[wQ,EQ]=kQ(vQ),_Q=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(wQ,{scope:t,anchor:r,onAnchorChange:a,children:n})};_Q.displayName=vQ;var SQ="PopperAnchor",TQ=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=EQ(SQ,n),i=X.useRef(null),s=uK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:og.jsx(bK.div,{...a,ref:s})}));TQ.displayName=SQ;var CQ="PopperContent",[AQ,NQ]=kQ(CQ),IQ=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=EQ(CQ,l),[E,_]=X.useState(null),S=uK(t,(e=>_(e))),[T,C]=X.useState(null),A=bQ(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(LQ),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=lQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>YX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[cQ({mainAxis:u+I,alignmentAxis:p}),h&&uQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?dQ():void 0,...D}),h&&pQ({...D}),fQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&mQ({element:T,padding:f}),DQ({arrowWidth:N,arrowHeight:I}),b&&hQ({strategy:"referenceHidden",...D})]}),[H,U]=MQ(j),$=vK(k);NK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return NK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(AQ,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx(bK.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));IQ.displayName=CQ;var OQ="PopperArrow",RQ={top:"bottom",right:"left",bottom:"top",left:"right"},PQ=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=NQ(OQ,n),o=RQ[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(yQ,{...r,ref:t,style:{...r.style,display:"block"}})})}));function LQ(e){return null!==e}PQ.displayName=OQ;var DQ=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=MQ(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function MQ(e){const[t,n="center"]=e.split("-");return[t,n]}var FQ=_Q,jQ=TQ,zQ=IQ,BQ=PQ;var HQ=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=X.useState(),r=X.useRef({}),a=X.useRef(e),o=X.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return X.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return X.useEffect((()=>{const e=UQ(r.current);o.current="mounted"===s?e:"none"}),[s]),NK((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=UQ(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),NK((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=UQ(r.current).includes(o.animationName);if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=UQ(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:X.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):X.Children.only(n),o=uK(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?X.cloneElement(a,{ref:o}):null};function UQ(e){return(null==e?void 0:e.animationName)||"none"}function $Q({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=function({defaultProp:e,onChange:t}){const n=X.useState(e),[r]=n,a=X.useRef(r),o=vK(t);return X.useEffect((()=>{a.current!==r&&(o(r),a.current=r)}),[r,a,o]),n}({defaultProp:t,onChange:n}),o=void 0!==e,i=o?e:r,s=vK(n);return[i,X.useCallback((t=>{if(o){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)}),[o,e,a,s])]}HQ.displayName="Presence";var VQ=X.forwardRef(((e,t)=>og.jsx(bK.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));VQ.displayName="VisuallyHidden";var GQ=VQ,[qQ]=dK("Tooltip",[xQ]),WQ=xQ(),YQ="TooltipProvider",ZQ=700,KQ="tooltip.open",[XQ,QQ]=qQ(YQ),JQ=e=>{const{__scopeTooltip:t,delayDuration:n=ZQ,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,[i,s]=X.useState(!0),l=X.useRef(!1),c=X.useRef(0);return X.useEffect((()=>{const e=c.current;return()=>window.clearTimeout(e)}),[]),og.jsx(XQ,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:X.useCallback((()=>{window.clearTimeout(c.current),s(!1)}),[]),onClose:X.useCallback((()=>{window.clearTimeout(c.current),c.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:l,onPointerInTransitChange:X.useCallback((e=>{l.current=e}),[]),disableHoverableContent:a,children:o})};JQ.displayName=YQ;var eJ="Tooltip",[tJ,nJ]=qQ(eJ),rJ=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,l=QQ(eJ,e.__scopeTooltip),c=WQ(t),[u,d]=X.useState(null),p=RK(),f=X.useRef(0),h=i??l.disableHoverableContent,m=s??l.delayDuration,g=X.useRef(!1),[y=!1,b]=$Q({prop:r,defaultProp:a,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(KQ))):l.onClose(),null==o||o(e)}}),v=X.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),k=X.useCallback((()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,b(!0)}),[b]),x=X.useCallback((()=>{window.clearTimeout(f.current),f.current=0,b(!1)}),[b]),w=X.useCallback((()=>{window.clearTimeout(f.current),f.current=window.setTimeout((()=>{g.current=!0,b(!0),f.current=0}),m)}),[m,b]);return X.useEffect((()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)}),[]),og.jsx(FQ,{...c,children:og.jsx(tJ,{scope:t,contentId:p,open:y,stateAttribute:v,trigger:u,onTriggerChange:d,onTriggerEnter:X.useCallback((()=>{l.isOpenDelayed?w():k()}),[l.isOpenDelayed,w,k]),onTriggerLeave:X.useCallback((()=>{h?x():(window.clearTimeout(f.current),f.current=0)}),[x,h]),onOpen:k,onClose:x,disableHoverableContent:h,children:n})})};rJ.displayName=eJ;var aJ="TooltipTrigger",oJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=nJ(aJ,n),o=QQ(aJ,n),i=WQ(n),s=uK(t,X.useRef(null),a.onTriggerChange),l=X.useRef(!1),c=X.useRef(!1),u=X.useCallback((()=>l.current=!1),[]);return X.useEffect((()=>()=>document.removeEventListener("pointerup",u)),[u]),og.jsx(jQ,{asChild:!0,...i,children:og.jsx(bK.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:s,onPointerMove:sK(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(c.current||o.isPointerInTransitRef.current||(a.onTriggerEnter(),c.current=!0))})),onPointerLeave:sK(e.onPointerLeave,(()=>{a.onTriggerLeave(),c.current=!1})),onPointerDown:sK(e.onPointerDown,(()=>{l.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:sK(e.onFocus,(()=>{l.current||a.onOpen()})),onBlur:sK(e.onBlur,a.onClose),onClick:sK(e.onClick,a.onClose)})})}));oJ.displayName=aJ;var[iJ,sJ]=qQ("TooltipPortal",{forceMount:void 0}),lJ="TooltipContent",cJ=X.forwardRef(((e,t)=>{const n=sJ(lJ,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=nJ(lJ,e.__scopeTooltip);return og.jsx(HQ,{present:r||i.open,children:i.disableHoverableContent?og.jsx(fJ,{side:a,...o,ref:t}):og.jsx(uJ,{side:a,...o,ref:t})})})),uJ=X.forwardRef(((e,t)=>{const n=nJ(lJ,e.__scopeTooltip),r=QQ(lJ,e.__scopeTooltip),a=X.useRef(null),o=uK(t,a),[i,s]=X.useState(null),{trigger:l,onClose:c}=n,u=a.current,{onPointerInTransitChange:d}=r,p=X.useCallback((()=>{s(null),d(!1)}),[d]),f=X.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},a=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),o=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...a,...function(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}(t.getBoundingClientRect())]);s(o),d(!0)}),[d]);return X.useEffect((()=>()=>p()),[p]),X.useEffect((()=>{if(l&&u){const e=e=>f(e,u),t=e=>f(e,l);return l.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}}),[l,u,f,p]),X.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==u?void 0:u.contains(t)),a=!function(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const e=t[o].x,s=t[o].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-e)*(r-s)/(c-s)+e&&(a=!a)}return a}(n,i);r?p():a&&(p(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[l,u,i,c,p]),og.jsx(fJ,{...e,ref:o})})),[dJ,pJ]=qQ(eJ,{isInside:!1}),fJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,l=nJ(lJ,n),c=WQ(n),{onClose:u}=l;return X.useEffect((()=>(document.addEventListener(KQ,u),()=>document.removeEventListener(KQ,u))),[u]),X.useEffect((()=>{if(l.trigger){const e=e=>{const t=e.target;(null==t?void 0:t.contains(l.trigger))&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[l.trigger,u]),og.jsx(TK,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:og.jsxs(zQ,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[og.jsx(mK,{children:r}),og.jsx(dJ,{scope:n,isInside:!0,children:og.jsx(GQ,{id:l.contentId,role:"tooltip",children:a||r})})]})})}));cJ.displayName=lJ;var hJ="TooltipArrow",mJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=WQ(n);return pJ(hJ,n).isInside?null:og.jsx(BQ,{...a,...r,ref:t})}));mJ.displayName=hJ;var gJ=JQ,yJ=oJ,bJ=mJ;const vJ=X.createContext(void 0),kJ=({children:e,...t})=>{const n=tK();return og.jsx(vJ.Provider,{value:{...n,...t},children:og.jsx(oK,{children:og.jsx(gJ,{children:e})})})},xJ=()=>{const e=X.useContext(vJ);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},wJ=X.createContext(void 0);const EJ=({layout:e,children:t})=>{const n=function(e){const{stop:t,clear:n,conversationId:r,isStreaming:a,loadAndRestoreSession:o,authToken:i,refreshSession:s,getCaptchaHeader:l,invalidateCaptcha:c}=xJ(),{aiChatSettings:u,baseSettings:d}=oR(),{baseUrl:p,appId:f,apiKey:h}=u,m=!!d.getAuthToken,g=!h&&!!f&&(!!i||m),{fetchWithAuth:y}=UZ({appId:f,authToken:i,getCaptchaHeader:l,invalidateCaptcha:c,refreshSession:s}),[b,v]=X.useState(!1),[k,x]=X.useState([]),[w,E]=X.useState(!i&&g),[_,S]=X.useState(0),[T,C]=X.useState(!1),A=X.useRef(!1),N=X.useRef(null),I=X.useRef(m),O=X.useRef(i);X.useEffect((()=>{const e=I.current,t=O.current;I.current=m,O.current=i,(e!==m||null!==t&&null!==i&&t!==i)&&(x([]),S(0),C(!1),A.current=!1)}),[m,i]);const R=X.useRef([]);R.current=k;const P=X.useRef(y);P.current=y;const L=X.useCallback((async(e,t=!1)=>{if(p&&i&&g){t||E(!0);try{const n=`${p}/run/v1/conversations?page=${e+1}&limit=25`,r=await P.current(n);if(!r.ok)throw new Error(`Failed to fetch conversations: ${r.status}`);const a=await r.json(),o=(a.data??[]).map((e=>({id:e.id,title:e.title??"",createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)})));x((n=>{if(0===e&&!t)return o;if(0===e&&t){const e=new Set(o.map((e=>e.id)));return[...o,...n.slice(25).filter((t=>!e.has(t.id)))]}const r=new Set(n.map((e=>e.id)));return[...n,...o.filter((e=>!r.has(e.id)))]}));const{page:i,pages:s}=a.pagination??{};C(null!=i&&null!=s&&i<s),t||S(e)}catch(jNe){console.error("[useChatHistory] Failed to load conversations:",jNe)}finally{E(!1)}}}),[p,i,g]);X.useEffect((()=>{b&&(i||m)&&g&&("stack"===e?L(0):!A.current&&i&&(A.current=!0,L(0)))}),[b,i,m,g,e,L]);const D=X.useRef("");X.useEffect((()=>{g&&"sidepane"===e&&r&&a&&A.current&&D.current!==r&&(R.current.some((e=>e.id===r))||(D.current=r,L(0,!0)))}),[r,g,e,L,a]);const M=X.useCallback((()=>{!w&&T&&L(_+1)}),[w,T,_,L]),F=X.useCallback((()=>{t(),n(),"sidepane"!==e&&v(!1)}),[e,t,n]),j=X.useCallback((async t=>{var n;null==(n=N.current)||n.abort();const r=new AbortController;N.current=r,await o(t,r.signal),r.signal.aborted||"sidepane"===e||v(!1)}),[e,o]);return{isEnabled:g,isOpen:b,setIsOpen:v,sessions:k,isLoading:w,hasMore:T,loadMore:M,startNewConversation:F,loadSession:j}}(e);return og.jsx(wJ.Provider,{value:n,children:"function"==typeof t?t(n):t})},_J=()=>{const e=X.useContext(wJ);if(!e)throw new Error("useChatHistory must be used within a ChatHistoryProvider");return e},SJ=X.createContext(void 0),TJ=({children:e,field:t,fieldProps:n,autoFocus:r})=>{const{errors:a}=jP(),o=a[t.name];return og.jsx(SJ.Provider,{value:{field:t,fieldProps:n,error:o,autoFocus:r},children:e})},CJ=()=>{const e=X.useContext(SJ);if(!e)throw new Error("useFormField must be used within a FormFieldProvider");return e},AJ=X.createContext(void 0);const NJ=({children:e,value:t})=>og.jsx(AJ.Provider,{value:t,children:e}),IJ=["light","dark"],OJ="(prefers-color-scheme: dark)",RJ="undefined"==typeof window,PJ=X.createContext(void 0),LJ={setColorMode:e=>{},colorModes:[]};function DJ(e,t){const n=X.useContext(PJ)??LJ;return"dark"===(n.forcedColorMode??n.resolvedColorMode)?t:e}const MJ=e=>(X.useContext(PJ),og.jsx(jJ,{...e})),FJ=["light","dark"],jJ=({forcedColorMode:e,disableTransitionOnChange:t=!1,enableSystem:n=!1,enableColorScheme:r=!0,storageKey:a="inkeep-colorMode",colorModes:o=FJ,defaultColorMode:i=(n?"system":"light"),attribute:s="data-theme",value:l,children:c,nonce:u,shadowHostId:d,rootId:p})=>{const[f,h]=X.useState((()=>BJ(a,i))),[m,g]=X.useState((()=>BJ(a))),y=l?Object.values(l):o,b=X.useCallback((e=>{var a;let o=e;if(!o)return;"system"===e&&n&&(o=UJ());const c=l?l[o]:o,u=t?HJ():null,f=d&&p&&(null==(a=document.getElementById(d))?void 0:a.shadowRoot),h=f?f.getElementById(p)??document.documentElement:document.documentElement;if("class"===s?(h.classList.remove(...y),c&&h.classList.add(c)):c?h.setAttribute(s,c):h.removeAttribute(s),r){const e=IJ.includes(i)?i:null,t=IJ.includes(o)?o:e;h.style.colorScheme=t}null==u||u()}),[]),v=X.useCallback((e=>{h(e);try{localStorage.setItem(a,e)}catch(Dce){}}),[e]),k=X.useCallback((t=>{const r=UJ(t);g(r),"system"===f&&n&&!e&&b("system")}),[f,e]);X.useEffect((()=>{const e=window.matchMedia(OJ);return e.addListener(k),k(e),()=>e.removeListener(k)}),[k]),X.useEffect((()=>{const e=e=>{if(e.key!==a)return;const t=e.newValue||i;v(t)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[v]),X.useEffect((()=>{b(e??f)}),[e,f]);const x=X.useMemo((()=>({colorMode:f,setColorMode:v,forcedColorMode:e,resolvedColorMode:"system"===f?m:f,colorModes:n?[...o,"system"]:o,systemColorMode:n?m:void 0})),[f,v,e,m,n,o]);return og.jsxs(PJ.Provider,{value:x,children:[og.jsx(zJ,{forcedColorMode:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:r,storageKey:a,colorModes:o,defaultColorMode:i,attribute:s,value:l,children:c,attrs:y,nonce:u,shadowHostId:d,rootId:p}),c]})},zJ=X.memo((({forcedColorMode:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultColorMode:o,value:i,attrs:s,nonce:l,shadowHostId:c,rootId:u})=>{const d="system"===o,p=(()=>{const e=c&&u?`document.getElementById('${c}').shadowRoot.getElementById('${u}')`:"document.documentElement";if("class"===n){return`var d=${e},c=d.classList;${`c.remove(${s.map((e=>`'${e}'`)).join(",")})`};`}return`var d=${e},n='${n}',s='setAttribute';`})(),f=(()=>{if(!a)return"";return(IJ.includes(o)?o:null)?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e"})(),h=(e,t=!1,r=!0)=>{const o=i?i[e]:e,s=t?`${e}|| ''`:`'${o}'`;let l="";return a&&r&&!t&&IJ.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${s})`:"null":o&&(l+=`d[s](n,${s})`),l},m=e?`!function(){${p}${h(e)}}()`:r?`!function(){try{${p}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${OJ}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}${d?"":`else{${h(o,!1,!1)}}`}${f}}catch(e){}}()`:`!function(){try{${p}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}else{${h(o,!1,!1)};}${f}}catch(t){}}();`;return og.jsx("script",{nonce:l,dangerouslySetInnerHTML:{__html:m}})}),(()=>!0)),BJ=(e,t)=>{if(RJ)return;let n;try{n=localStorage.getItem(e)||void 0}catch(Dce){}return n||t},HJ=()=>{const e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout((()=>{document.head.removeChild(e)}),1)}},UJ=e=>{e||(e=window.matchMedia(OJ));return e.matches?"dark":"light"};var $J=Object.prototype.hasOwnProperty;function VJ(e,t,n){for(n of e.keys())if(GJ(n,t))return n}function GJ(e,t){var n,r,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&GJ(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((a=r)&&"object"==typeof a&&!(a=VJ(t,a)))return!1;if(!t.has(a))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((a=r[0])&&"object"==typeof a&&!(a=VJ(t,a)))return!1;if(!GJ(r[1],t.get(a)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if($J.call(e,n)&&++r&&!$J.call(t,n))return!1;if(!(n in t)||!GJ(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function qJ(){const{baseSettings:e}=oR(),[t,n]=X.useState([]),r=function(e){const t=X.useRef(void 0);GJ(t.current,e)||(t.current=e);return t.current}(e.theme.styles),{customStyles:a,linksCount:o}=X.useMemo((()=>{if(!r||!Array.isArray(r))return{customStyles:null,loaded:!0};const{links:e,styleSheets:t}=r.reduce(((e,t)=>("link"===t.type?e.links.push(t):"style"===t.type&&e.styleSheets.push(t),e)),{links:[],styleSheets:[]}),a=t.map((e=>og.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:e.value}},e.key??XZ("link_")))),o=e.map((e=>{const t=e.key??XZ("stylesheet_");return og.jsx("link",{id:t,rel:"stylesheet",type:"text/css",href:e.value,onLoad:()=>{n((t=>[...new Set([...t,e.value])]))}},t)}));return{customStyles:og.jsxs(og.Fragment,{children:[o,a]}),linksCount:e.length}}),[r]);return{customStyles:a,loaded:t.length>=(o??0)}}const WJ=({children:e})=>{const{baseSettings:t}=oR(),{theme:n,primaryBrandColor:r,shadowHost:a,rootElement:o,colorMode:i}=t,{primaryColors:s,varsClassName:l}=n,{disableLoadingDefaultFont:c,fontFamily:u,fontSize:d,zIndex:p}=n,f=bk(s,r),h=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=kk[n]||n,a=(n,r=[])=>{for(const[o,i]of Object.entries(n)){const n=[...r,o];if("object"==typeof i&&null!==i)a(i,n);else{const r=n.map((e=>e.replace(/([A-Z])/g,"-$1").toLowerCase())).join("-");t[`--ikp-${e}-${r}`]=i}}};a(r)}return t}({colors:Gm(n.colors,f),fontFamily:u,fontSize:d,zIndex:p}),{customStyles:m,loaded:g}=qJ(),{sync:y,forcedColorMode:b,...v}=i??{},[k,x]=X.useState(),w=X.useRef(null);return X.useEffect((()=>{var e,t;if(!(null==y?void 0:y.target))return;const n="string"==typeof y.target?document.querySelector(y.target):y.target;if(!n)return;function r(e,t){return t.reduce(((t,n)=>({...t,[n]:e.getAttribute(n)})),{})}const a=new MutationObserver((()=>{var e,t;const a=r(n,y.attributes),o=(null==(e=y.isDarkMode)?void 0:e.call(y,a))?"dark":"light";null==(t=y.onChange)||t.call(y,o),x(o)}));a.observe(n,{attributes:!0,attributeFilter:y.attributes,childList:!1,subtree:!1}),w.current=a;const o=(null==(e=y.isDarkMode)?void 0:e.call(y,r(n,null==y?void 0:y.attributes)))?"dark":"light";return null==(t=y.onChange)||t.call(y,o),x(o),()=>a.disconnect()}),[y]),og.jsxs(og.Fragment,{children:[!c&&og.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:"\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');\n "}}),m,g&&og.jsx(MJ,{forcedColorMode:b??k,...v,shadowHostId:null==a?void 0:a.id,rootId:null==o?void 0:o.id,children:og.jsx("div",{className:l,style:{display:"contents",...h},children:e})})]})};function YJ(e){const{children:t,config:n,componentType:r}=e;return og.jsx(aR,{value:{...n,componentType:r},children:og.jsx(WJ,{children:og.jsx(sR,{children:t})})})}const ZJ=X.createContext(void 0),KJ=({children:e,source:t})=>og.jsx(ZJ.Provider,{value:{source:t},children:e}),XJ=()=>{const e=X.useContext(ZJ);if(!e)throw new Error("useSourceItem must be used within a SourceItemProvider");return e},QJ=X.createContext(void 0),JJ=({children:e,widget:t})=>og.jsx(QJ.Provider,{value:t,children:e}),e0=()=>X.useContext(QJ);var t0=X.useLayoutEffect,n0=function(e,t){"function"!=typeof e?e.current=t:e(t)},r0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},a0=function(e){Object.keys(r0).forEach((function(t){e.style.setProperty(t,r0[t],"important")}))},o0=null,i0=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize};var s0=function(){},l0=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],c0=!!document.documentElement.currentStyle,u0=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,l0.reduce((function(e,t){return e[t]=n[t],e}),{})),a=r.boxSizing;return""===a?null:(c0&&"border-box"===a&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function d0(e,t,n){var r,a,o=(r=n,a=Q.useRef(r),t0((function(){a.current=r})),a);X.useLayoutEffect((function(){var n=function(e){return o.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}}),[])}var p0=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],f0=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,a=e.minRows,o=e.onChange,i=void 0===o?s0:o,s=e.onHeightChange,l=void 0===s?s0:s,c=a$(e,p0),u=void 0!==c.value,d=X.useRef(null),p=function(e,t){var n=Q.useRef();return Q.useCallback((function(r){e.current=r,n.current&&n0(n.current,null),n.current=t,t&&n0(t,r)}),[t])}(d,t),f=X.useRef(0),h=X.useRef(),m=function(){var e=d.current,t=n&&h.current?h.current:u0(e);if(t){h.current=t;var o=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),o0||((o0=document.createElement("textarea")).setAttribute("tabindex","-1"),o0.setAttribute("aria-hidden","true"),a0(o0)),null===o0.parentNode&&document.body.appendChild(o0);var a=e.paddingSize,o=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;o0.style[t]=i[t]})),a0(o0),o0.value=t;var l=i0(o0,e);o0.value=t,l=i0(o0,e),o0.value="x";var c=o0.scrollHeight-a,u=c*n;"border-box"===s&&(u=u+a+o),l=Math.max(u,l);var d=c*r;return"border-box"===s&&(d=d+a+o),[l=Math.min(d,l),c]}(t,e.value||e.placeholder||"x",a,r),i=o[0],s=o[1];f.current!==i&&(f.current=i,e.style.setProperty("height",i+"px","important"),l(i,{rowHeight:s}))}};return X.useLayoutEffect(m),function(e,t){d0(document.body,"reset",(function(n){e.current.form===n.target&&t(n)}))}(d,(function(){if(!u){var e=d.current,t=e.value;requestAnimationFrame((function(){t!==e.value&&m()}))}})),d0(window,"resize",m),function(e){d0(document.fonts,"loadingdone",e)}(m),X.createElement("textarea",o$({},c,{onChange:function(e){u||m(),i(e)},ref:p}))},h0=X.forwardRef(f0),m0="Avatar",[g0]=dK(m0),[y0,b0]=g0(m0),v0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,o]=X.useState("idle");return og.jsx(y0,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:og.jsx(bK.span,{...r,ref:t})})}));v0.displayName=m0;var k0="AvatarImage",x0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...o}=e,i=b0(k0,n),s=function(e,t){const[n,r]=X.useState("idle");return NK((()=>{if(!e)return void r("error");let n=!0;const a=new window.Image,o=e=>()=>{n&&r(e)};return r("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{n=!1}}),[e,t]),n}(r,o.referrerPolicy),l=vK((e=>{a(e),i.onImageLoadingStatusChange(e)}));return NK((()=>{"idle"!==s&&l(s)}),[s,l]),"loaded"===s?og.jsx(bK.img,{...o,ref:t,src:r}):null}));x0.displayName=k0;var w0="AvatarFallback",E0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,o=b0(w0,n),[i,s]=X.useState(void 0===r);return X.useEffect((()=>{if(void 0!==r){const e=window.setTimeout((()=>s(!0)),r);return()=>window.clearTimeout(e)}}),[r]),i&&"loaded"!==o.imageLoadingStatus?og.jsx(bK.span,{...a,ref:t}):null}));E0.displayName=w0;var _0=v0,S0=x0,T0=E0;var C0="Checkbox",[A0]=dK(C0),[N0,I0]=A0(C0),O0=X.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:i,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[p,f]=X.useState(null),h=uK(t,(e=>f(e))),m=X.useRef(!1),g=!p||(u||!!p.closest("form")),[y=!1,b]=$Q({prop:a,defaultProp:o,onChange:c}),v=X.useRef(y);return X.useEffect((()=>{const e=null==p?void 0:p.form;if(e){const t=()=>b(v.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[p,b]),og.jsxs(N0,{scope:n,state:y,disabled:s,children:[og.jsx(bK.button,{type:"button",role:"checkbox","aria-checked":D0(y)?"mixed":y,"aria-required":i,"data-state":M0(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onKeyDown:sK(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:sK(e.onClick,(e=>{b((e=>!!D0(e)||!e)),g&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))}),g&&og.jsx(L0,{control:p,bubbles:!m.current,name:r,value:l,checked:y,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"},defaultChecked:!D0(o)&&o})]})}));O0.displayName=C0;var R0="CheckboxIndicator",P0=X.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=I0(R0,n);return og.jsx(HQ,{present:r||D0(o.state)||!0===o.state,children:og.jsx(bK.span,{"data-state":M0(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})}));P0.displayName=R0;var L0=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:a,...o}=e,i=X.useRef(null),s=function(e){const t=X.useRef({value:e,previous:e});return X.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(n),l=bQ(t);X.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==n&&a){const t=new Event("click",{bubbles:r});e.indeterminate=D0(n),a.call(e,!D0(n)&&n),e.dispatchEvent(t)}}),[s,n,r]);const c=X.useRef(!D0(n)&&n);return og.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??c.current,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function D0(e){return"indeterminate"===e}function M0(e){return D0(e)?"indeterminate":e?"checked":"unchecked"}var F0=O0,j0=P0,z0=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(U0);if(o){const e=o.props.children,n=a.map((t=>t===o?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(B0,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return og.jsx(B0,{...r,ref:t,children:n})}));z0.displayName="Slot";var B0=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?cK(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));B0.displayName="SlotClone";var H0=({children:e})=>og.jsx(og.Fragment,{children:e});function U0(e){return X.isValidElement(e)&&e.type===H0}var $0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=X.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?z0:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});var V0,G0="dismissableLayer.update",q0="dismissableLayer.pointerDownOutside",W0="dismissableLayer.focusOutside",Y0=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Z0=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(Y0),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=uK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=vK(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){X0(q0,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=vK(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){X0(W0,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return kK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(V0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),K0(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=V0)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),K0())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(G0,e),()=>document.removeEventListener(G0,e)}),[]),og.jsx($0.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:sK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:sK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:sK(e.onPointerDownCapture,x.onPointerDownCapture)})}));Z0.displayName="DismissableLayer";function K0(){const e=new CustomEvent(G0);document.dispatchEvent(e)}function X0(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(Y0),r=X.useRef(null),a=uK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx($0.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var Q0=0;function J0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var e1="focusScope.autoFocusOnMount",t1="focusScope.autoFocusOnUnmount",n1={bubbles:!1,cancelable:!0},r1=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=vK(a),u=vK(o),d=X.useRef(null),p=uK(t,(e=>l(e))),f=X.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;X.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:s1(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||s1(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&s1(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),X.useEffect((()=>{if(s){l1.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(e1,n1);s.addEventListener(e1,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(s1(r,{select:t}),document.activeElement!==n)return}((e=a1(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&s1(s))}return()=>{s.removeEventListener(e1,c),setTimeout((()=>{const e=new CustomEvent(t1,n1);s.addEventListener(t1,u),s.dispatchEvent(e),e.defaultPrevented||s1(t??document.body,{select:!0}),s.removeEventListener(t1,u),l1.remove(f)}),0)}}var e}),[s,c,u,f]);const h=X.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=a1(e),n=o1(t,e),r=o1(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&s1(o,{select:!0})):(e.preventDefault(),n&&s1(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return og.jsx($0.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function a1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function o1(e,t){for(const n of e)if(!i1(n,{upTo:t}))return n}function i1(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function s1(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}r1.displayName="FocusScope";var l1=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=c1(e,t),e.unshift(t)},remove(t){var n;e=c1(e,t),null==(n=e[0])||n.resume()}}}();function c1(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var u1=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx($0.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));u1.displayName="Arrow";var d1=u1,p1="Popper",[f1,h1]=dK(p1),[m1,g1]=f1(p1),y1=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(m1,{scope:t,anchor:r,onAnchorChange:a,children:n})};y1.displayName=p1;var b1="PopperAnchor",v1=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=g1(b1,n),i=X.useRef(null),s=uK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:og.jsx($0.div,{...a,ref:s})}));v1.displayName=b1;var k1="PopperContent",[x1,w1]=f1(k1),E1=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=g1(k1,l),[E,_]=X.useState(null),S=uK(t,(e=>_(e))),[T,C]=X.useState(null),A=bQ(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(C1),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=lQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>YX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[cQ({mainAxis:u+I,alignmentAxis:p}),h&&uQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?dQ():void 0,...D}),h&&pQ({...D}),fQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&mQ({element:T,padding:f}),A1({arrowWidth:N,arrowHeight:I}),b&&hQ({strategy:"referenceHidden",...D})]}),[H,U]=N1(j),$=vK(k);NK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return NK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(x1,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx($0.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));E1.displayName=k1;var _1="PopperArrow",S1={top:"bottom",right:"left",bottom:"top",left:"right"},T1=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=w1(_1,n),o=S1[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(d1,{...r,ref:t,style:{...r.style,display:"block"}})})}));function C1(e){return null!==e}T1.displayName=_1;var A1=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=N1(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function N1(e){const[t,n="center"]=e.split("-");return[t,n]}var I1=y1,O1=v1,R1=E1,P1=T1,L1=new WeakMap,D1=new WeakMap,M1={},F1=0,j1=function(e){return e&&(e.host||j1(e.parentNode))},z1=function(e,t,n,r){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=j1(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);M1[n]||(M1[n]=new WeakMap);var o=M1[n],i=[],s=new Set,l=new Set(a),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(L1.get(e)||0)+1,c=(o.get(e)||0)+1;L1.set(e,l),o.set(e,c),i.push(e),1===l&&a&&D1.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(Dce){console.error("aria-hidden: cannot operate on ",e,Dce)}}))};return u(t),s.clear(),F1++,function(){i.forEach((function(e){var t=L1.get(e)-1,a=o.get(e)-1;L1.set(e,t),o.set(e,a),t||(D1.has(e)||e.removeAttribute(r),D1.delete(e)),a||e.removeAttribute(n)})),--F1||(L1=new WeakMap,L1=new WeakMap,D1=new WeakMap,M1={})}},B1=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),z1(r,a,n,"aria-hidden")):function(){return null}},H1="right-scroll-bar-position",U1="width-before-scroll-bar";function $1(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var V1="undefined"!=typeof window?X.useLayoutEffect:X.useEffect,G1=new WeakMap;function q1(e,t){var n,r,a,o=(n=null,r=function(t){return e.forEach((function(e){return $1(e,t)}))},(a=X.useState((function(){return{value:n,callback:r,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=r,a.facade);return V1((function(){var t=G1.get(o);if(t){var n=new Set(t),r=new Set(e),a=o.current;n.forEach((function(e){r.has(e)||$1(e,null)})),r.forEach((function(e){n.has(e)||$1(e,a)}))}G1.set(o,e)}),[e]),o}function W1(e){return e}var Y1=function(e){var t=e.sideCar,n=l$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return X.createElement(r,s$({},n))};Y1.isSideCarExport=!0;var Z1=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=W1);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var a=t(e,r);return n.push(a),function(){n=n.filter((function(e){return e!==a}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var a=n;n=[],a.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=s$({async:!0,ssr:!1},e),t}(),K1=function(){},X1=X.forwardRef((function(e,t){var n=X.useRef(null),r=X.useState({onScrollCapture:K1,onWheelCapture:K1,onTouchMoveCapture:K1}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,f=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,b=void 0===y?"div":y,v=e.gapMode,k=l$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,w=q1([n,t]),E=s$(s$({},k),a);return X.createElement(X.Fragment,null,u&&X.createElement(x,{sideCar:Z1,removeScrollBar:c,shards:d,noRelative:f,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:v}),i?X.cloneElement(X.Children.only(s),s$(s$({},E),{ref:w})):X.createElement(b,s$({},E,{className:l,ref:w}),s))}));X1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},X1.classNames={fullWidth:U1,zeroRight:H1};function Q1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var J1=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=Q1())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},e2=function(){var e,t=(e=J1(),function(t,n){X.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},t2={left:0,top:0,right:0,gap:0},n2=function(e){return parseInt(e||"",10)||0},r2=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return t2;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[n2(n),n2(r),n2(a)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},a2=e2(),o2="data-scroll-locked",i2=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(o2,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(H1," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(U1," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(H1," .").concat(H1," {\n right: 0 ").concat(r,";\n }\n \n .").concat(U1," .").concat(U1," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(o2,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},s2=function(){var e=parseInt(document.body.getAttribute(o2)||"0",10);return isFinite(e)?e:0},l2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;X.useEffect((function(){return document.body.setAttribute(o2,(s2()+1).toString()),function(){var e=s2()-1;e<=0?document.body.removeAttribute(o2):document.body.setAttribute(o2,e.toString())}}),[]);var o=X.useMemo((function(){return r2(a)}),[a]);return X.createElement(a2,{styles:i2(o,!t,a,n?"":"!important")})},c2=!1;if("undefined"!=typeof window)try{var u2=Object.defineProperty({},"passive",{get:function(){return c2=!0,!0}});window.addEventListener("test",u2,u2),window.removeEventListener("test",u2,u2)}catch(jNe){c2=!1}var d2=!!c2&&{passive:!1},p2=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},f2=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),h2(e,r)){var a=m2(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},h2=function(e,t){return"v"===e?function(e){return p2(e,"overflowY")}(t):function(e){return p2(e,"overflowX")}(t)},m2=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},g2=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},y2=function(e){return[e.deltaX,e.deltaY]},b2=function(e){return e&&"current"in e?e.current:e},v2=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},k2=0,x2=[];function w2(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const E2=(_2=function(e){var t=X.useRef([]),n=X.useRef([0,0]),r=X.useRef(),a=X.useState(k2++)[0],o=X.useState(e2)[0],i=X.useRef(e);X.useEffect((function(){i.current=e}),[e]),X.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=c$([e.lockRef.current],(e.shards||[]).map(b2),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=X.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=g2(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===u||f.contains(u)))return!1;var h=f2(d,u);if(!h)return!0;if(h?a=d:(a="v"===d?"h":"v",h=f2(d,u)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var m=r.current||a;return function(e,t,n,r){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),o=a*r,i=n.target,s=t.contains(i),l=!1,c=o>0,u=0,d=0;do{if(!i)break;var p=m2(e,i),f=p[0],h=p[1]-p[2]-a*f;(f||h)&&h2(e,i)&&(u+=h,d+=f);var m=i.parentNode;i=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(m,t,e,"h"===m?l:c)}),[]),l=X.useCallback((function(e){var n=e;if(x2.length&&x2[x2.length-1]===o){var r="deltaY"in n?y2(n):g2(n),a=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,a=r,t[0]===a[0]&&t[1]===a[1]);var t,a}))[0];if(a&&a.should)n.cancelable&&n.preventDefault();else if(!a){var l=(i.current.shards||[]).map(b2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),c=X.useCallback((function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:w2(r)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),u=X.useCallback((function(e){n.current=g2(e),r.current=void 0}),[]),d=X.useCallback((function(t){c(t.type,y2(t),t.target,s(t,e.lockRef.current))}),[]),p=X.useCallback((function(t){c(t.type,g2(t),t.target,s(t,e.lockRef.current))}),[]);X.useEffect((function(){return x2.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,d2),document.addEventListener("touchmove",l,d2),document.addEventListener("touchstart",u,d2),function(){x2=x2.filter((function(e){return e!==o})),document.removeEventListener("wheel",l,d2),document.removeEventListener("touchmove",l,d2),document.removeEventListener("touchstart",u,d2)}}),[]);var f=e.removeScrollBar,h=e.inert;return X.createElement(X.Fragment,null,h?X.createElement(o,{styles:v2(a)}):null,f?X.createElement(l2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Z1.useMedium(_2),Y1);var _2,S2=X.forwardRef((function(e,t){return X.createElement(X1,s$({},e,{ref:t,sideCar:E2}))}));S2.classNames=X1.classNames;var T2="Popover",[C2]=dK(T2,[h1]),A2=h1(),[N2,I2]=C2(T2),O2=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,s=A2(t),l=X.useRef(null),[c,u]=X.useState(!1),[d=!1,p]=$Q({prop:r,defaultProp:a,onChange:o});return og.jsx(I1,{...s,children:og.jsx(N2,{scope:t,contentId:RK(),triggerRef:l,open:d,onOpenChange:p,onOpenToggle:X.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:c,onCustomAnchorAdd:X.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:X.useCallback((()=>u(!1)),[]),modal:i,children:n})})};O2.displayName=T2;var R2="PopoverAnchor";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=I2(R2,n),o=A2(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=a;return X.useEffect((()=>(i(),()=>s())),[i,s]),og.jsx(O1,{...o,...r,ref:t})})).displayName=R2;var P2="PopoverTrigger",L2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=I2(P2,n),o=A2(n),i=uK(t,a.triggerRef),s=og.jsx($0.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":V2(a.open),...r,ref:i,onClick:sK(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:og.jsx(O1,{asChild:!0,...o,children:s})}));L2.displayName=P2;var[D2,M2]=C2("PopoverPortal",{forceMount:void 0}),F2="PopoverContent",j2=X.forwardRef(((e,t)=>{const n=M2(F2,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=I2(F2,e.__scopePopover);return og.jsx(HQ,{present:r||o.open,children:o.modal?og.jsx(z2,{...a,ref:t}):og.jsx(B2,{...a,ref:t})})}));j2.displayName=F2;var z2=X.forwardRef(((e,t)=>{const n=I2(F2,e.__scopePopover),r=X.useRef(null),a=uK(t,r),o=X.useRef(!1);return X.useEffect((()=>{const e=r.current;if(e)return B1(e)}),[]),og.jsx(S2,{as:z0,allowPinchZoom:!0,children:og.jsx(H2,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:sK(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),o.current||null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:sK(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:sK(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),B2=X.forwardRef(((e,t)=>{const n=I2(F2,e.__scopePopover),r=X.useRef(!1),a=X.useRef(!1);return og.jsx(H2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null==(o=e.onCloseAutoFocus)||o.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),H2=X.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=I2(F2,n),f=A2(n);return X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??J0()),document.body.insertAdjacentElement("beforeend",e[1]??J0()),Q0++,()=>{1===Q0&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Q0--}}),[]),og.jsx(r1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:og.jsx(Z0,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:og.jsx(R1,{"data-state":V2(p.open),role:"dialog",id:p.contentId,...f,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),U2="PopoverClose";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=I2(U2,n);return og.jsx($0.button,{type:"button",...r,ref:t,onClick:sK(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=U2;var $2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=A2(n);return og.jsx(P1,{...a,...r,ref:t})}));function V2(e){return e?"open":"closed"}$2.displayName="PopoverArrow";var G2=O2,q2=L2,W2=j2,Y2=$2,Z2=X.createContext(void 0);var K2="ScrollArea",[X2]=dK(K2),[Q2,J2]=X2(K2),e5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...i}=e,[s,l]=X.useState(null),[c,u]=X.useState(null),[d,p]=X.useState(null),[f,h]=X.useState(null),[m,g]=X.useState(null),[y,b]=X.useState(0),[v,k]=X.useState(0),[x,w]=X.useState(!1),[E,_]=X.useState(!1),S=uK(t,(e=>l(e))),T=function(e){const t=X.useContext(Z2);return e||t||"ltr"}(a);return og.jsx(Q2,{scope:n,type:r,dir:T,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:p,scrollbarX:f,onScrollbarXChange:h,scrollbarXEnabled:x,onScrollbarXEnabledChange:w,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:b,onCornerHeightChange:k,children:og.jsx(bK.div,{dir:T,...i,ref:S,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":v+"px",...e.style}})})}));e5.displayName=K2;var t5="ScrollAreaViewport",n5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,i=J2(t5,n),s=uK(t,X.useRef(null),i.onViewportChange);return og.jsxs(og.Fragment,{children:[og.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),og.jsx(bK.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:og.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})}));n5.displayName=t5;var r5="ScrollAreaScrollbar",a5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=J2(r5,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=a,s="horizontal"===e.orientation;return X.useEffect((()=>(s?o(!0):i(!0),()=>{s?o(!1):i(!1)})),[s,o,i]),"hover"===a.type?og.jsx(o5,{...r,ref:t,forceMount:n}):"scroll"===a.type?og.jsx(i5,{...r,ref:t,forceMount:n}):"auto"===a.type?og.jsx(s5,{...r,ref:t,forceMount:n}):"always"===a.type?og.jsx(l5,{...r,ref:t}):null}));a5.displayName=r5;var o5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=J2(r5,e.__scopeScrollArea),[o,i]=X.useState(!1);return X.useEffect((()=>{const e=a.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout((()=>i(!1)),a.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}}),[a.scrollArea,a.scrollHideDelay]),og.jsx(HQ,{present:n||o,children:og.jsx(s5,{"data-state":o?"visible":"hidden",...r,ref:t})})})),i5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=J2(r5,e.__scopeScrollArea),o="horizontal"===e.orientation,i=C5((()=>l("SCROLL_END")),100),[s,l]=(c="hidden",u={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},X.useReducer(((e,t)=>u[e][t]??e),c));var c,u;return X.useEffect((()=>{if("idle"===s){const e=window.setTimeout((()=>l("HIDE")),a.scrollHideDelay);return()=>window.clearTimeout(e)}}),[s,a.scrollHideDelay,l]),X.useEffect((()=>{const e=a.viewport,t=o?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[a.viewport,o,l,i]),og.jsx(HQ,{present:n||"hidden"!==s,children:og.jsx(l5,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:sK(e.onPointerEnter,(()=>l("POINTER_ENTER"))),onPointerLeave:sK(e.onPointerLeave,(()=>l("POINTER_LEAVE")))})})})),s5=X.forwardRef(((e,t)=>{const n=J2(r5,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,i]=X.useState(!1),s="horizontal"===e.orientation,l=C5((()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}}),10);return A5(n.viewport,l),A5(n.content,l),og.jsx(HQ,{present:r||o,children:og.jsx(l5,{"data-state":o?"visible":"hidden",...a,ref:t})})})),l5=X.forwardRef(((e,t)=>{const{orientation:n="vertical",...r}=e,a=J2(r5,e.__scopeScrollArea),o=X.useRef(null),i=X.useRef(0),[s,l]=X.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=x5(s.viewport,s.content),u={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(c>0&&c<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const a=w5(n),o=a/2,i=t||o,s=a-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d="ltr"===r?[0,u]:[-1*u,0];return _5([l,c],d)(e)}(e,i.current,s,t)}return"horizontal"===n?og.jsx(c5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=E5(a.viewport.scrollLeft,s,a.dir);o.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=d(e,a.dir))}}):"vertical"===n?og.jsx(u5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=E5(a.viewport.scrollTop,s);o.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=d(e))}}):null})),c5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=J2(r5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=uK(t,l,o.onScrollbarXChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),og.jsx(f5,{"data-orientation":"horizontal",...a,ref:c,sizes:n,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":w5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),S5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:k5(i.paddingLeft),paddingEnd:k5(i.paddingRight)}})}})})),u5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=J2(r5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=uK(t,l,o.onScrollbarYChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),og.jsx(f5,{"data-orientation":"vertical",...a,ref:c,sizes:n,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":w5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),S5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:k5(i.paddingTop),paddingEnd:k5(i.paddingBottom)}})}})})),[d5,p5]=X2(r5),f5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...p}=e,f=J2(r5,n),[h,m]=X.useState(null),g=uK(t,(e=>m(e))),y=X.useRef(null),b=X.useRef(""),v=f.viewport,k=r.content-r.viewport,x=vK(u),w=vK(l),E=C5(d,10);function _(e){if(y.current){const t=e.clientX-y.current.left,n=e.clientY-y.current.top;c({x:t,y:n})}}return X.useEffect((()=>{const e=e=>{const t=e.target;(null==h?void 0:h.contains(t))&&x(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[v,h,k,x]),X.useEffect(w,[r,w]),A5(h,E),A5(f.content,E),og.jsx(d5,{scope:n,scrollbar:h,hasThumb:a,onThumbChange:vK(o),onThumbPointerUp:vK(i),onThumbPositionChange:w,onThumbPointerDown:vK(s),children:og.jsx(bK.div,{...p,ref:g,style:{position:"absolute",...p.style},onPointerDown:sK(e.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),y.current=h.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),_(e)}})),onPointerMove:sK(e.onPointerMove,_),onPointerUp:sK(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,f.viewport&&(f.viewport.style.scrollBehavior=""),y.current=null}))})})})),h5="ScrollAreaThumb",m5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=p5(h5,e.__scopeScrollArea);return og.jsx(HQ,{present:n||a.hasThumb,children:og.jsx(g5,{ref:t,...r})})})),g5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=J2(h5,n),i=p5(h5,n),{onThumbPositionChange:s}=i,l=uK(t,(e=>i.onThumbChange(e))),c=X.useRef(void 0),u=C5((()=>{c.current&&(c.current(),c.current=void 0)}),100);return X.useEffect((()=>{const e=o.viewport;if(e){const t=()=>{if(u(),!c.current){const t=T5(e,s);c.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[o.viewport,u,s]),og.jsx(bK.div,{"data-state":i.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:sK(e.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})})),onPointerUp:sK(e.onPointerUp,i.onThumbPointerUp)})}));m5.displayName=h5;var y5="ScrollAreaCorner",b5=X.forwardRef(((e,t)=>{const n=J2(y5,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?og.jsx(v5,{...e,ref:t}):null}));b5.displayName=y5;var v5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=J2(y5,n),[o,i]=X.useState(0),[s,l]=X.useState(0),c=Boolean(o&&s);return A5(a.scrollbarX,(()=>{var e;const t=(null==(e=a.scrollbarX)?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),l(t)})),A5(a.scrollbarY,(()=>{var e;const t=(null==(e=a.scrollbarY)?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),i(t)})),c?og.jsx(bK.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null}));function k5(e){return e?parseInt(e,10):0}function x5(e,t){const n=e/t;return isNaN(n)?0:n}function w5(e){const t=x5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function E5(e,t,n="ltr"){const r=w5(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,i=t.content-t.viewport,s=o-r,l=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,"ltr"===n?[0,i]:[-1*i,0]);return _5([0,i],[0,s])(l)}function _5(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function S5(e,t){return e>0&&e<t}var T5=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,s=n.top!==o.top;(i||s)&&t(),n=o,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function C5(e,t){const n=vK(e),r=X.useRef(0);return X.useEffect((()=>()=>window.clearTimeout(r.current)),[]),X.useCallback((()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)}),[n,t])}function A5(e,t){const n=vK(t);NK((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}var N5=e5,I5=n5,O5=b5;function R5(e,[t,n]){return Math.min(n,Math.max(t,e))}function P5(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function L5(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r);a.displayName=t+"Context";const o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},D5(r,...t)]}function D5(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function M5(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function F5(...e){return t=>{let n=!1;const r=e.map((e=>{const r=M5(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():M5(e[t],null)}}}}function j5(...e){return X.useCallback(F5(...e),e)}var z5=Symbol.for("react.lazy"),B5=J[" use ".trim().toString()];function H5(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===z5&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function U5(e){const t=$5(e),n=X.forwardRef(((e,n)=>{let{children:r,...a}=e;H5(r)&&"function"==typeof B5&&(r=B5(r._payload));const o=X.Children.toArray(r),i=o.find(G5);if(i){const e=i.props.children,r=o.map((t=>t===i?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return og.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function $5(e){const t=X.forwardRef(((e,t)=>{let{children:n,...r}=e;if(H5(n)&&"function"==typeof B5&&(n=B5(n._payload)),X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?F5(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var V5=Symbol("radix.slottable");function G5(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===V5}var q5=X.createContext(void 0);function W5(e){const t=X.useContext(q5);return e||t||"ltr"}function Y5(e){const t=Z5(e),n=X.forwardRef(((e,n)=>{const{children:r,...a}=e,o=X.Children.toArray(r),i=o.find(X5);if(i){const e=i.props.children,r=o.map((t=>t===i?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return og.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function Z5(e){const t=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?F5(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var K5=Symbol("radix.slottable");function X5(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===K5}var Q5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=Y5(`Primitive.${t}`),r=X.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function J5(e){const t=X.useRef(e);return X.useEffect((()=>{t.current=e})),X.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}var e3,t3="dismissableLayer.update",n3="dismissableLayer.pointerDownOutside",r3="dismissableLayer.focusOutside",a3=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),o3=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(a3),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=j5(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=J5(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){s3(n3,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=J5(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){s3(r3,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=J5(e);X.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(e3=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),i3(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=e3)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),i3())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(t3,e),()=>document.removeEventListener(t3,e)}),[]),og.jsx(Q5.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:P5(e.onFocusCapture,w.onFocusCapture),onBlurCapture:P5(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:P5(e.onPointerDownCapture,x.onPointerDownCapture)})}));o3.displayName="DismissableLayer";function i3(){const e=new CustomEvent(t3);document.dispatchEvent(e)}function s3(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(a3),r=X.useRef(null),a=j5(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx(Q5.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var l3=0;function c3(){X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??u3()),document.body.insertAdjacentElement("beforeend",e[1]??u3()),l3++,()=>{1===l3&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),l3--}}),[])}function u3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var d3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=U5(`Primitive.${t}`),r=X.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),p3="focusScope.autoFocusOnMount",f3="focusScope.autoFocusOnUnmount",h3={bubbles:!1,cancelable:!0},m3=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=J5(a),u=J5(o),d=X.useRef(null),p=j5(t,(e=>l(e))),f=X.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;X.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:v3(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||v3(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&v3(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),X.useEffect((()=>{if(s){k3.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(p3,h3);s.addEventListener(p3,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(v3(r,{select:t}),document.activeElement!==n)return}((e=g3(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&v3(s))}return()=>{s.removeEventListener(p3,c),setTimeout((()=>{const e=new CustomEvent(f3,h3);s.addEventListener(f3,u),s.dispatchEvent(e),e.defaultPrevented||v3(t??document.body,{select:!0}),s.removeEventListener(f3,u),k3.remove(f)}),0)}}var e}),[s,c,u,f]);const h=X.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=g3(e),n=y3(t,e),r=y3(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&v3(o,{select:!0})):(e.preventDefault(),n&&v3(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return og.jsx(d3.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function g3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function y3(e,t){for(const n of e)if(!b3(n,{upTo:t}))return n}function b3(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function v3(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}m3.displayName="FocusScope";var k3=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=x3(e,t),e.unshift(t)},remove(t){var n;e=x3(e,t),null==(n=e[0])||n.resume()}}}();function x3(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var w3=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx(Q5.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));w3.displayName="Arrow";var E3=w3;function _3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},S3(r,...t)]}function S3(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var T3="Popper",[C3,A3]=_3(T3),[N3,I3]=C3(T3),O3=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(N3,{scope:t,anchor:r,onAnchorChange:a,children:n})};O3.displayName=T3;var R3="PopperAnchor",P3=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=I3(R3,n),i=X.useRef(null),s=j5(t,i),l=X.useRef(null);return X.useEffect((()=>{const e=l.current;l.current=(null==r?void 0:r.current)||i.current,e!==l.current&&o.onAnchorChange(l.current)})),r?null:og.jsx(Q5.div,{...a,ref:s})}));P3.displayName=R3;var L3="PopperContent",[D3,M3]=C3(L3),F3=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=I3(L3,l),[E,_]=X.useState(null),S=j5(t,(e=>_(e))),[T,C]=X.useState(null),A=function(e){const[t,n]=X.useState(void 0);return HO((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(H3),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=lQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>YX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[cQ({mainAxis:u+I,alignmentAxis:p}),h&&uQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?dQ():void 0,...D}),h&&pQ({...D}),fQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&mQ({element:T,padding:f}),U3({arrowWidth:N,arrowHeight:I}),b&&hQ({strategy:"referenceHidden",...D})]}),[H,U]=$3(j),$=J5(k);HO((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return HO((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(D3,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx(Q5.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));F3.displayName=L3;var j3="PopperArrow",z3={top:"bottom",right:"left",bottom:"top",left:"right"},B3=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=M3(j3,n),o=z3[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(E3,{...r,ref:t,style:{...r.style,display:"block"}})})}));function H3(e){return null!==e}B3.displayName=j3;var U3=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=$3(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function $3(e){const[t,n="center"]=e.split("-");return[t,n]}var V3=O3,G3=P3,q3=F3,W3=B3,Y3=X.forwardRef(((e,t)=>{var n;const{container:r,...a}=e,[o,i]=X.useState(!1);HO((()=>i(!0)),[]);const s=r||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?de.createPortal(og.jsx(d3.div,{...a,ref:t}),s):null}));Y3.displayName="Portal";const Z3=[" ","Enter","ArrowUp","ArrowDown"],K3=[" ","Enter"],X3="Select",[Q3,J3,e4]=function(e){const t=e+"CollectionProvider",[n,r]=L5(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{const{scope:t,children:n}=e,r=Q.useRef(null),o=Q.useRef(new Map).current;return og.jsx(a,{scope:t,itemMap:o,collectionRef:r,children:n})};i.displayName=t;const s=e+"CollectionSlot",l=U5(s),c=Q.forwardRef(((e,t)=>{const{scope:n,children:r}=e,a=j5(t,o(s,n).collectionRef);return og.jsx(l,{ref:a,children:r})}));c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=U5(u),f=Q.forwardRef(((e,t)=>{const{scope:n,children:r,...a}=e,i=Q.useRef(null),s=j5(t,i),l=o(u,n);return Q.useEffect((()=>(l.itemMap.set(i,{ref:i,...a}),()=>{l.itemMap.delete(i)}))),og.jsx(p,{[d]:"",ref:s,children:r})}));return f.displayName=u,[{Provider:i,Slot:c,ItemSlot:f},function(t){const n=o(e+"CollectionConsumer",t);return Q.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}(X3),[t4]=L5(X3,[e4,A3]),n4=A3(),[r4,a4]=t4(X3),[o4,i4]=t4(X3),s4=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:s,onValueChange:l,dir:c,disabled:u,required:d}=e,p=n4(t),[f,h]=X.useState(null),[m,g]=X.useState(null),[y,b]=X.useState(!1),v=W5(c),[k,x]=SZ({prop:r,defaultProp:a??!1,onChange:o,caller:X3}),[w,E]=SZ({prop:i,defaultProp:s,onChange:l,caller:X3}),_=X.useRef(null),[S,T]=X.useState(new Set);return og.jsx(V3,{...p,children:og.jsx(r4,{required:d,scope:t,trigger:f,onTriggerChange:h,valueNode:m,onValueNodeChange:g,valueNodeHasChildren:y,onValueNodeHasChildrenChange:b,contentId:VO(),value:w,onValueChange:E,open:!!k,onOpenChange:x,dir:v,triggerPointerDownPosRef:_,disabled:u,children:og.jsx(Q3.Provider,{scope:t,children:og.jsx(o4,{scope:e.__scopeSelect,onNativeOptionAdd:X.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:X.useCallback((e=>{T((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:n})})})})};s4.displayName=X3;const l4="SelectTrigger",c4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=n4(n),i=a4(l4,n),s=i.disabled||r,l=j5(t,i.onTriggerChange),c=J3(n),u=X.useRef("touch"),[d,p,f]=$4((e=>{const t=c().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=V4(t,e,n);void 0!==r&&i.onValueChange(r.value)})),h=e=>{s||(i.onOpenChange(!0),f()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return og.jsx(G3,{asChild:!0,...o,children:og.jsx(d3.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":U4(i.value)?"":void 0,...a,ref:l,onClick:P5(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)})),onPointerDown:P5(a.onPointerDown,(e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())})),onKeyDown:P5(a.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||Z3.includes(e.key)&&(h(),e.preventDefault())}))})})}));c4.displayName=l4;const u4="SelectValue",d4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,l=a4(u4,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==o,d=j5(t,l.onValueNodeChange);return HO((()=>{c(u)}),[c,u]),og.jsx(d3.span,{...s,ref:d,style:{pointerEvents:"none"},children:U4(l.value)?og.jsx(og.Fragment,{children:i}):o})}));d4.displayName=u4;const p4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return og.jsx(d3.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})}));p4.displayName="SelectIcon";const f4="SelectContent",h4=X.forwardRef(((e,t)=>{const n=a4(f4,e.__scopeSelect),[r,a]=X.useState();if(HO((()=>{a(new DocumentFragment)}),[]),!n.open){const t=r;return t?ue.createPortal(og.jsx(g4,{scope:e.__scopeSelect,children:og.jsx(Q3.Slot,{scope:e.__scopeSelect,children:og.jsx("div",{children:e.children})})}),t):null}return og.jsx(v4,{...e,ref:t})}));h4.displayName=f4;const m4=10,[g4,y4]=t4(f4),b4=U5("SelectContent.RemoveScroll"),v4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g,...y}=e,b=a4(f4,n),[v,k]=X.useState(null),[x,w]=X.useState(null),E=j5(t,(e=>k(e))),[_,S]=X.useState(null),[T,C]=X.useState(null),A=J3(n),[N,I]=X.useState(!1),O=X.useRef(!1);X.useEffect((()=>{if(v)return B1(v)}),[v]),c3();const R=X.useCallback((e=>{const[t,...n]=A().map((e=>e.ref.current)),[r]=n.slice(-1),a=document.activeElement;for(const o of e){if(o===a)return;if(null==o||o.scrollIntoView({block:"nearest"}),o===t&&x&&(x.scrollTop=0),o===r&&x&&(x.scrollTop=x.scrollHeight),null==o||o.focus(),document.activeElement!==a)return}}),[A,x]),P=X.useCallback((()=>R([_,v])),[R,_,v]);X.useEffect((()=>{N&&P()}),[N,P]);const{onOpenChange:L,triggerPointerDownPosRef:D}=b;X.useEffect((()=>{if(v){let e={x:0,y:0};const t=t=>{var n,r;e={x:Math.abs(Math.round(t.pageX)-((null==(n=D.current)?void 0:n.x)??0)),y:Math.abs(Math.round(t.pageY)-((null==(r=D.current)?void 0:r.y)??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():v.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),D.current=null};return null!==D.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[v,L,D]),X.useEffect((()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[L]);const[M,F]=$4((e=>{const t=A().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=V4(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),j=X.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&(S(e),r&&(O.current=!0))}),[b.value]),z=X.useCallback((()=>null==v?void 0:v.focus()),[v]),B=X.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&C(e)}),[b.value]),H="popper"===r?x4:k4,U=H===x4?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return og.jsx(g4,{scope:n,content:v,viewport:x,onViewportChange:w,itemRefCallback:j,selectedItem:_,onItemLeave:z,itemTextRefCallback:B,focusSelectedItem:P,selectedItemText:T,position:r,isPositioned:N,searchRef:M,children:og.jsx(S2,{as:b4,allowPinchZoom:!0,removeScrollBar:!1,children:og.jsx(m3,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:P5(a,(e=>{var t;null==(t=b.trigger)||t.focus({preventScroll:!0}),e.preventDefault()})),children:og.jsx(o3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:og.jsx(H,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...U,onPlaced:()=>I(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:P5(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=A().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>R(t))),e.preventDefault()}}))})})})})})}));v4.displayName="SelectContentImpl";const k4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=a4(f4,n),i=y4(f4,n),[s,l]=X.useState(null),[c,u]=X.useState(null),d=j5(t,(e=>u(e))),p=J3(n),f=X.useRef(!1),h=X.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=i,v=X.useCallback((()=>{if(o.trigger&&o.valueNode&&s&&c&&m&&g&&y){const e=o.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=y.getBoundingClientRect();if("rtl"!==o.dir){const r=a.left-t.left,o=n.left-r,i=e.left-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-m4,d=R5(o,[m4,Math.max(m4,u-c)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-a.right,o=window.innerWidth-n.right-r,i=window.innerWidth-e.right-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-m4,d=R5(o,[m4,Math.max(m4,u-c)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=p(),l=window.innerHeight-2*m4,u=m.scrollHeight,d=window.getComputedStyle(c),h=Number.parseInt(d.borderTopWidth,10),b=Number.parseInt(d.paddingTop,10),v=Number.parseInt(d.borderBottomWidth,10),k=h+b+u+Number.parseInt(d.paddingBottom,10)+v,x=Math.min(5*g.offsetHeight,k),w=window.getComputedStyle(m),E=Number.parseInt(w.paddingTop,10),_=Number.parseInt(w.paddingBottom,10),S=e.top+e.height/2-m4,T=l-S,C=g.offsetHeight/2,A=h+b+(g.offsetTop+C),N=k-A;if(A<=S){const e=i.length>0&&g===i[i.length-1].ref.current;s.style.bottom="0px";const t=c.clientHeight-m.offsetTop-m.offsetHeight,n=A+Math.max(T,C+(e?_:0)+t+v);s.style.height=n+"px"}else{const e=i.length>0&&g===i[0].ref.current;s.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?E:0)+C)+N;s.style.height=t+"px",m.scrollTop=A-S+m.offsetTop}s.style.margin=`${m4}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",null==r||r(),requestAnimationFrame((()=>f.current=!0))}}),[p,o.trigger,o.valueNode,s,c,m,g,y,o.dir,r]);HO((()=>v()),[v]);const[k,x]=X.useState();HO((()=>{c&&x(window.getComputedStyle(c).zIndex)}),[c]);const w=X.useCallback((e=>{e&&!0===h.current&&(v(),null==b||b(),h.current=!1)}),[v,b]);return og.jsx(w4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:f,onScrollButtonChange:w,children:og.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:og.jsx(d3.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));k4.displayName="SelectItemAlignedPosition";const x4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=m4,...o}=e,i=n4(n);return og.jsx(q3,{...i,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));x4.displayName="SelectPopperPosition";const[w4,E4]=t4(f4,{}),_4="SelectViewport",S4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=y4(_4,n),i=E4(_4,n),s=j5(t,o.onViewportChange),l=X.useRef(0);return og.jsxs(og.Fragment,{children:[og.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),og.jsx(Q3.Slot,{scope:n,children:og.jsx(d3.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:P5(a.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if((null==r?void 0:r.current)&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*m4,a=Number.parseFloat(n.style.minHeight),o=Number.parseFloat(n.style.height),i=Math.max(a,o);if(i<r){const a=i+e,o=Math.min(r,a),s=a-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))})})]})}));S4.displayName=_4;const T4="SelectGroup",[C4,A4]=t4(T4);X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=VO();return og.jsx(C4,{scope:n,id:a,children:og.jsx(d3.div,{role:"group","aria-labelledby":a,...r,ref:t})})})).displayName=T4;const N4="SelectLabel";X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=A4(N4,n);return og.jsx(d3.div,{id:a.id,...r,ref:t})})).displayName=N4;const I4="SelectItem",[O4,R4]=t4(I4),P4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=a4(I4,n),l=y4(I4,n),c=s.value===r,[u,d]=X.useState(o??""),[p,f]=X.useState(!1),h=j5(t,(e=>{var t;return null==(t=l.itemRefCallback)?void 0:t.call(l,e,r,a)})),m=VO(),g=X.useRef("touch"),y=()=>{a||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return og.jsx(O4,{scope:n,value:r,disabled:a,textId:m,isSelected:c,onItemTextChange:X.useCallback((e=>{d((t=>t||((null==e?void 0:e.textContent)??"").trim()))}),[]),children:og.jsx(Q3.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:og.jsx(d3.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:h,onFocus:P5(i.onFocus,(()=>f(!0))),onBlur:P5(i.onBlur,(()=>f(!1))),onClick:P5(i.onClick,(()=>{"mouse"!==g.current&&y()})),onPointerUp:P5(i.onPointerUp,(()=>{"mouse"===g.current&&y()})),onPointerDown:P5(i.onPointerDown,(e=>{g.current=e.pointerType})),onPointerMove:P5(i.onPointerMove,(e=>{var t;g.current=e.pointerType,a?null==(t=l.onItemLeave)||t.call(l):"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:P5(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null==(t=l.onItemLeave)||t.call(l))})),onKeyDown:P5(i.onKeyDown,(e=>{var t;""!==(null==(t=l.searchRef)?void 0:t.current)&&" "===e.key||(K3.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));P4.displayName=I4;const L4="SelectItemText",D4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=a4(L4,n),s=y4(L4,n),l=R4(L4,n),c=i4(L4,n),[u,d]=X.useState(null),p=j5(t,(e=>d(e)),l.onItemTextChange,(e=>{var t;return null==(t=s.itemTextRefCallback)?void 0:t.call(s,e,l.value,l.disabled)})),f=null==u?void 0:u.textContent,h=X.useMemo((()=>og.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value)),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return HO((()=>(m(h),()=>g(h))),[m,g,h]),og.jsxs(og.Fragment,{children:[og.jsx(d3.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ue.createPortal(o.children,i.valueNode):null]})}));D4.displayName=L4;const M4="SelectItemIndicator",F4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return R4(M4,n).isSelected?og.jsx(d3.span,{"aria-hidden":!0,...r,ref:t}):null}));F4.displayName=M4;const j4="SelectScrollUpButton";X.forwardRef(((e,t)=>{const n=y4(j4,e.__scopeSelect),r=E4(j4,e.__scopeSelect),[a,o]=X.useState(!1),i=j5(t,r.onScrollButtonChange);return HO((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;o(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?og.jsx(B4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null})).displayName=j4;const z4="SelectScrollDownButton";X.forwardRef(((e,t)=>{const n=y4(z4,e.__scopeSelect),r=E4(z4,e.__scopeSelect),[a,o]=X.useState(!1),i=j5(t,r.onScrollButtonChange);return HO((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;o(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?og.jsx(B4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null})).displayName=z4;const B4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=y4("SelectScrollButton",n),i=X.useRef(null),s=J3(n),l=X.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return X.useEffect((()=>()=>l()),[l]),HO((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==(e=null==t?void 0:t.ref.current)||e.scrollIntoView({block:"nearest"})}),[s]),og.jsx(d3.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:P5(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:P5(a.onPointerMove,(()=>{var e;null==(e=o.onItemLeave)||e.call(o),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:P5(a.onPointerLeave,(()=>{l()}))})}));X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return og.jsx(d3.div,{"aria-hidden":!0,...r,ref:t})})).displayName="SelectSeparator";const H4="SelectArrow";function U4(e){return""===e||void 0===e}function $4(e){const t=J5(e),n=X.useRef(""),r=X.useRef(0),a=X.useCallback((e=>{const a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(a)}),[t]),o=X.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return X.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,a,o]}function V4(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,a=n?e.indexOf(n):-1;let o=(i=e,s=Math.max(a,0),i.map(((e,t)=>i[(s+t)%i.length])));var i,s;1===r.length&&(o=o.filter((e=>e!==n)));const l=o.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=n4(n),o=a4(H4,n),i=y4(H4,n);return o.open&&"popper"===i.position?og.jsx(W3,{...a,...r,ref:t}):null})).displayName=H4;const G4=s4,q4=c4,W4=d4,Y4=p4,Z4=h4,K4=S4,X4=P4,Q4=D4,J4=F4;var e6=(e,t=[])=>({parts:(...n)=>{if(n6(t))return e6(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>e6(e,[...t,...n]),omit:(...n)=>e6(e,t.filter((e=>!n.includes(e)))),rename:e=>e6(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${t6(e)}"][data-part="${t6(n)}"]`,`& [data-scope="${t6(e)}"][data-part="${t6(n)}"]`].join(", "),attrs:{"data-scope":t6(e),"data-part":t6(n)}}})),{})}),t6=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),n6=e=>0===e.length,r6=e6("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger").build(),a6=Object.defineProperty,o6=(e,t,n)=>((e,t,n)=>t in e?a6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),i6={itemToValue:e=>"string"==typeof e?e:Aq(e)&&Iq(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:Aq(e)&&Iq(e,"label")?e.label:i6.itemToValue(e),isItemDisabled:e=>!(!Aq(e)||!Iq(e,"disabled"))&&!!e.disabled},s6=class e{constructor(t){this.options=t,o6(this,"items"),o6(this,"indexMap",null),o6(this,"copy",(t=>new e({...this.options,items:t??[...this.items]}))),o6(this,"isEqual",(e=>Tq(this.items,e.items))),o6(this,"setItems",(e=>this.copy(e))),o6(this,"getValues",((e=this.items)=>{const t=[];for(const n of e){const e=this.getItemValue(n);null!=e&&t.push(e)}return t})),o6(this,"find",(e=>{if(null==e)return null;const t=this.indexOf(e);return-1!==t?this.at(t):null})),o6(this,"findMany",(e=>{const t=[];for(const n of e){const e=this.find(n);null!=e&&t.push(e)}return t})),o6(this,"at",(e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0;const n=this.group();for(const[,r]of n)for(const n of r){if(t===e)return n;t++}return null})),o6(this,"sortFn",((e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0))),o6(this,"sort",(e=>[...e].sort(this.sortFn.bind(this)))),o6(this,"getItemValue",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToValue)?void 0:n.call(t,e))??i6.itemToValue(e)})),o6(this,"getItemDisabled",(e=>{var t,n;return null!=e&&((null==(n=(t=this.options).isItemDisabled)?void 0:n.call(t,e))??i6.isItemDisabled(e))})),o6(this,"stringifyItem",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToString)?void 0:n.call(t,e))??i6.itemToString(e)})),o6(this,"stringify",(e=>null==e?null:this.stringifyItem(this.find(e)))),o6(this,"stringifyItems",((e,t=", ")=>{const n=[];for(const r of e){const e=this.stringifyItem(r);null!=e&&n.push(e)}return n.join(t)})),o6(this,"stringifyMany",((e,t)=>this.stringifyItems(this.findMany(e),t))),o6(this,"has",(e=>-1!==this.indexOf(e))),o6(this,"hasItem",(e=>null!=e&&this.has(this.getItemValue(e)))),o6(this,"group",(()=>{const{groupBy:e,groupSort:t}=this.options;if(!e)return[["",[...this.items]]];const n=new Map;this.items.forEach(((t,r)=>{const a=e(t,r);n.has(a)||n.set(a,[]),n.get(a).push(t)}));let r=Array.from(n.entries());return t&&r.sort((([e],[n])=>{if("function"==typeof t)return t(e,n);if(Array.isArray(t)){const r=t.indexOf(e),a=t.indexOf(n);return-1===r?1:-1===a?-1:r-a}return"asc"===t?e.localeCompare(n):"desc"===t?n.localeCompare(e):0})),r})),o6(this,"getNextValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))})),o6(this,"getPreviousValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))})),o6(this,"indexOf",(e=>{if(null==e)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex((t=>this.getItemValue(t)===e));if(!this.indexMap){this.indexMap=new Map;let e=0;const t=this.group();for(const[,n]of t)for(const t of n){const n=this.getItemValue(t);null!=n&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1})),o6(this,"getByText",((e,t)=>{const n=null!=t?this.indexOf(t):-1,r=1===e.length;for(let a=0;a<this.items.length;a++){const o=this.items[(n+a+1)%this.items.length];if((!r||this.getItemValue(o)!==t)&&(!this.getItemDisabled(o)&&l6(this.stringifyItem(o),e)))return o}})),o6(this,"search",((e,t)=>{const{state:n,currentValue:r,timeout:a=350}=t,o=n.keysSoFar+e,i=o.length>1&&Array.from(o).every((e=>e===o[0]))?o[0]:o,s=this.getByText(i,r),l=this.getItemValue(s);function c(){clearTimeout(n.timer),n.timer=-1}return function e(t){n.keysSoFar=t,c(),""!==t&&(n.timer=+setTimeout((()=>{e(""),c()}),a))}(o),l})),o6(this,"update",((e,t)=>{let n=this.indexOf(e);return-1===n?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])})),o6(this,"upsert",((e,t,n="append")=>{let r=this.indexOf(e);if(-1===r){return("append"===n?this.append:this.prepend)(t)}return this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])})),o6(this,"insert",((e,...t)=>this.copy(c6(this.items,e,...t)))),o6(this,"insertBefore",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(c6(this.items,n,...t))})),o6(this,"insertAfter",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(c6(this.items,n+1,...t))})),o6(this,"prepend",((...e)=>this.copy(c6(this.items,0,...e)))),o6(this,"append",((...e)=>this.copy(c6(this.items,this.items.length,...e)))),o6(this,"filter",(e=>{const t=this.items.filter(((t,n)=>e(this.stringifyItem(t),n,t)));return this.copy(t)})),o6(this,"remove",((...e)=>{const t=e.map((e=>"string"==typeof e?e:this.getItemValue(e)));return this.copy(this.items.filter((e=>{const n=this.getItemValue(e);return null!=n&&!t.includes(n)})))})),o6(this,"move",((e,t)=>{const n=this.indexOf(e);return-1===n?this:this.copy(u6(this.items,[n],t))})),o6(this,"moveBefore",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(u6(this.items,r,n))})),o6(this,"moveAfter",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(u6(this.items,r,n+1))})),o6(this,"reorder",((e,t)=>this.copy(u6(this.items,[e],t)))),o6(this,"compareValue",((e,t)=>{const n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:n>r?1:0})),o6(this,"range",((e,t)=>{let n=[],r=e;for(;null!=r;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]})),o6(this,"getValueRange",((e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[])),o6(this,"toString",(()=>{let e="";for(const t of this.items){e+=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(":")+","}return e})),o6(this,"toJSON",(()=>({size:this.size,first:this.firstValue,last:this.lastValue}))),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},l6=(e,t)=>!!(null==e?void 0:e.toLowerCase().startsWith(t.toLowerCase()));function c6(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function u6(e,t,n){const r=(t=[...t].sort(((e,t)=>e-t))).map((t=>e[t]));for(let a=t.length-1;a>=0;a--)e=[...e.slice(0,t[a]),...e.slice(t[a]+1)];return n=Math.max(0,n-t.filter((e=>e<n)).length),[...e.slice(0,n),...r,...e.slice(n)]}function d6({values:e,collection:t,selectedItemMap:n}){const r=[];for(const a of e){const e=t.find(a)??n.get(a);null!=e&&r.push(e)}return r}function p6({selectedItemMap:e,values:t,selectedItems:n,collection:r}){const a=new Map(e);for(const i of n){const e=r.getItemValue(i);null!=e&&a.set(e,i)}const o=new Set(t);for(const i of a.keys())o.has(i)||a.delete(i);return a}function f6({values:e,collection:t,selectedItemMap:n}){const r=d6({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:p6({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function h6({selectedItems:e,collection:t}){return p6({selectedItemMap:new Map,values:e.map((e=>t.getItemValue(e))).filter(Boolean),selectedItems:e,collection:t})}var m6=e=>new s6(e);function g6(e=0,t=0,n=0,r=0){if("function"==typeof DOMRect)return new DOMRect(e,t,n,r);const a={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...a,toJSON:()=>a}}function y6(e,t){return{contextElement:dW(e)?e:null==e?void 0:e.contextElement,getBoundingClientRect:()=>{const n=e,r=null==t?void 0:t(n);return r||!n?function(e){if(!e)return g6();const{x:t,y:n,width:r,height:a}=e;return g6(t,n,r,a)}(r):n.getBoundingClientRect()}}}m6.empty=()=>new s6({items:[]});var b6=e=>({variable:e,reference:`var(${e})`}),v6={arrowSize:b6("--arrow-size"),arrowSizeHalf:b6("--arrow-size-half"),arrowBg:b6("--arrow-background"),transformOrigin:b6("--transform-origin"),arrowOffset:b6("--arrow-offset")};function k6(e,t){return{name:"transformOrigin",fn(n){var r,a,o,i;const{elements:s,middlewareData:l,placement:c,rects:u,y:d}=n,p=c.split("-")[0],f=(e=>"top"===e||"bottom"===e?"y":"x")(p),h=(null==(r=l.arrow)?void 0:r.x)||0,m=(null==(a=l.arrow)?void 0:a.y)||0,g=(null==t?void 0:t.clientWidth)||0,y=(null==t?void 0:t.clientHeight)||0,b=h+g/2,v=m+y/2,k=Math.abs((null==(o=l.shift)?void 0:o.y)||0),x=u.reference.height/2,w=y/2,E=(null==(i=e.offset)?void 0:i.mainAxis)??e.gutter,_="number"==typeof E?E+w:E??w,S=k>_,T={top:`${b}px calc(100% + ${_}px)`,bottom:`${b}px ${-_}px`,left:`calc(100% + ${_}px) ${v}px`,right:`${-_}px ${v}px`}[p],C=`${b}px ${u.reference.y+x-d}px`,A=Boolean(e.overlap)&&"y"===f&&S;return s.floating.style.setProperty(v6.transformOrigin.variable,A?C:T),{data:{transformOrigin:A?C:T}}}}}var x6={name:"rects",fn:({rects:e})=>({data:e})},w6=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:a}=n.arrow,o=t.split("-")[0];return Object.assign(e.style,{left:null!=r?`${r}px`:"",top:null!=a?`${a}px`:"",[o]:`calc(100% + ${v6.arrowOffset.reference})`}),{}}}};var E6={strategy:"absolute",placement:"bottom",listeners:!0,restoreStyles:!1,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function _6(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function S6(e,t){return null!=e&&Math.abs(e-t)<.5}function T6(e){return"function"==typeof e?e():"clipping-ancestors"===e?"clippingAncestors":e}function C6(e,t,n){const r=e||t.createElement("div");return eQ({element:r,padding:n.arrowPadding})}function A6(e,t){if(null!=(t.offset??t.gutter))return ZX((({placement:n})=>{var r,a;const o=((null==e?void 0:e.clientHeight)||0)/2,i=(null==(r=t.offset)?void 0:r.mainAxis)??t.gutter,s="number"==typeof i?i+o:i??o,{hasAlign:l}=function(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:null!=n}}(n),c=l?void 0:t.shift;return zq({crossAxis:(null==(a=t.offset)?void 0:a.crossAxis)??c,mainAxis:s,alignmentAxis:t.shift})}))}function N6(e){if(!e.flip)return;const t=T6(e.boundary);return XX({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:!0===e.flip?void 0:e.flip})}function I6(e){if(!e.slide&&!e.overlap)return;const t=T6(e.boundary);return KX({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:tQ()})}function O6(e){if(!1===e.sizeMiddleware&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,a;return QX({padding:e.overflowPadding,apply({elements:e,rects:o,availableHeight:i,availableWidth:s}){const l=e.floating,c=Math.round(o.reference.width),u=Math.round(o.reference.height);s=Math.floor(s),i=Math.floor(i),S6(t,c)||(l.style.setProperty("--reference-width",`${c}px`),t=c),S6(n,u)||(l.style.setProperty("--reference-height",`${u}px`),n=u),S6(r,s)||(l.style.setProperty("--available-width",`${s}px`),r=s),S6(a,i)||(l.style.setProperty("--available-height",`${i}px`),a=i)}})}function R6(e){if(e.hideWhenDetached)return JX({strategy:"referenceHidden",boundary:T6(e.boundary)??"clippingAncestors"})}var P6=["transform","visibility","pointer-events","--x","--y","--z-index","--reference-width","--reference-height","--available-width","--available-height","--transform-origin"],L6=["top","right","bottom","left"];function D6(e,t){if(!e)return Mq;const n=new Map(t.map((t=>[t,e.style.getPropertyValue(t)])));return()=>{n.forEach(((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)})),0===e.style.length&&e.removeAttribute("style")}}function M6(e,t,n={}){const{defer:r,...a}=n,o=r?sY:e=>e(),i=[];return i.push(o((()=>{const n="function"==typeof e?e():e,r="function"==typeof t?t():t;i.push(function(e,t,n={}){var r;const a=y6((null==(r=n.getAnchorElement)?void 0:r.call(n))??e,n.getAnchorRect);if(!t||!a)return;const o=Object.assign({},E6,n),i=t.querySelector("[data-part=arrow]"),s=o.restoreStyles?D6(t,P6):void 0,l=o.restoreStyles?D6(i,L6):void 0,c=[A6(i,o),N6(o),I6(o),C6(i,t.ownerDocument,o),w6(i),k6({gutter:o.gutter,offset:o.offset,overlap:o.overlap},i),O6(o),R6(o),x6],{placement:u,strategy:d,onComplete:p,onPositioned:f}=o;let h,m,g=!1;const y=async()=>{var e;if(!a||!t)return;const n=await nQ(a,t,{placement:u,middleware:c,strategy:d});null==p||p(n);const r=xW(t),i=_6(r,n.x),s=_6(r,n.y);if(t.style.transform=`translate3d(${i}px, ${s}px, 0)`,S6(h,i)||(t.style.setProperty("--x",`${i}px`),h=i),S6(m,s)||(t.style.setProperty("--y",`${s}px`),m=s),o.hideWhenDetached&&((null==(e=n.middlewareData.hide)?void 0:e.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events"))),!g){const e=t.firstElementChild;e&&(t.style.setProperty("--z-index",TW(e).zIndex),g=!0)}},b=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:y,floatingElement:t}),null==f||f({placed:!0})):await y()},v=function(e){return e?!0===e?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}(o.listeners),k=o.listeners?YX(a,t,b,v):Mq;return b(),()=>{null==k||k(),null==l||l(),null==s||s(),null==f||f({placed:!1})}}(n,r,a))}))),()=>{i.forEach((e=>null==e?void 0:e()))}}var F6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};var j6=e=>{var t;return(null==(t=e.ids)?void 0:t.label)??`combobox:${e.id}:label`},z6=e=>{var t;return(null==(t=e.ids)?void 0:t.control)??`combobox:${e.id}:control`},B6=e=>{var t;return(null==(t=e.ids)?void 0:t.input)??`combobox:${e.id}:input`},H6=e=>{var t;return(null==(t=e.ids)?void 0:t.content)??`combobox:${e.id}:content`},U6=e=>{var t;return(null==(t=e.ids)?void 0:t.positioner)??`combobox:${e.id}:popper`},$6=e=>{var t;return(null==(t=e.ids)?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},V6=e=>{var t;return(null==(t=e.ids)?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},G6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroup)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup:${t}`},q6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroupLabel)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup-label:${t}`},W6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.item)?void 0:r.call(n,t))??`combobox:${e.id}:option:${t}`},Y6=e=>e.getById(H6(e)),Z6=e=>e.getById(B6(e)),K6=e=>e.getById(U6(e)),X6=e=>e.getById(z6(e)),Q6=e=>e.getById($6(e)),J6=(e,t)=>{if(null==t)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return function(e,t){return(null==e?void 0:e.querySelector(t))??null}(Y6(e),n)},e8=e=>{const t=Z6(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0}),iW(t)};function t8(e,t){const{context:n,prop:r,state:a,send:o,scope:i,computed:s,event:l}=e,c=r("translations"),u=r("collection"),d=!!r("disabled"),p=s("isInteractive"),f=!!r("invalid"),h=!!r("required"),m=!!r("readOnly"),g=a.hasTag("open"),y=a.hasTag("focused"),b=r("composite"),v=n.get("highlightedValue"),k=function(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:a="absolute"}=e;return{arrow:{position:"absolute",width:v6.arrowSize.reference,height:v6.arrowSize.reference,[v6.arrowSizeHalf.variable]:`calc(${v6.arrowSize.reference} / 2)`,[v6.arrowOffset.variable]:`calc(${v6.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?F6[t.split("-")[0]]:void 0,background:v6.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:a,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)"}}}({...r("positioning"),placement:n.get("currentPlacement")});function x(e){const t=u.getItemDisabled(e.item),r=u.getItemValue(e.item);return Uq(r,(()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`)),{value:r,disabled:Boolean(d||t),highlighted:v===r,selected:n.get("value").includes(r)}}return{focused:y,open:g,inputValue:n.get("inputValue"),highlightedValue:v,highlightedItem:n.get("highlightedItem"),value:n.get("value"),valueAsString:s("valueAsString"),hasSelectedItems:s("hasSelectedItems"),selectedItems:s("selectedItems"),collection:r("collection"),multiple:!!r("multiple"),disabled:!!d,syncSelectedItems(){o({type:"SELECTED_ITEMS.SYNC"})},reposition(e={}){o({type:"POSITIONING.SET",options:e})},setHighlightValue(e){o({type:"HIGHLIGHTED_VALUE.SET",value:e})},clearHighlightValue(){o({type:"HIGHLIGHTED_VALUE.CLEAR"})},selectValue(e){o({type:"ITEM.SELECT",value:e})},setValue(e){o({type:"VALUE.SET",value:e})},setInputValue(e,t="script"){o({type:"INPUT_VALUE.SET",value:e,src:t})},clearValue(e){o(null!=e?{type:"ITEM.CLEAR",value:e}:{type:"VALUE.CLEAR"})},focus(){var e;null==(e=Z6(i))||e.focus()},setOpen(e,t="script"){a.hasTag("open")!==e&&o({type:e?"OPEN":"CLOSE",src:t})},getRootProps(){return t.element({...r6.root.attrs,dir:r("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.root)??`combobox:${e.id}`),"data-invalid":cW(f),"data-readonly":cW(m)});var e,n},getLabelProps:()=>t.label({...r6.label.attrs,dir:r("dir"),htmlFor:B6(i),id:j6(i),"data-readonly":cW(m),"data-disabled":cW(d),"data-invalid":cW(f),"data-required":cW(h),"data-focus":cW(y),onClick(e){var t;b||(e.preventDefault(),null==(t=Q6(i))||t.focus({preventScroll:!0}))}}),getControlProps:()=>t.element({...r6.control.attrs,dir:r("dir"),id:z6(i),"data-state":g?"open":"closed","data-focus":cW(y),"data-disabled":cW(d),"data-invalid":cW(f)}),getPositionerProps:()=>t.element({...r6.positioner.attrs,dir:r("dir"),id:U6(i),style:k.floating}),getInputProps:()=>t.input({...r6.input.attrs,dir:r("dir"),"aria-invalid":uW(f),"data-invalid":cW(f),"data-autofocus":cW(r("autoFocus")),name:r("name"),form:r("form"),disabled:d,required:r("required"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:"false",readOnly:m,placeholder:r("placeholder"),id:B6(i),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":s("autoComplete")?"both":"list","aria-controls":H6(i),"aria-expanded":g,"data-state":g?"open":"closed","aria-activedescendant":v?W6(i,v):void 0,onClick(e){e.defaultPrevented||r("openOnClick")&&p&&o({type:"INPUT.CLICK",src:"input-click"})},onFocus(){d||o({type:"INPUT.FOCUS"})},onBlur(){d||o({type:"INPUT.BLUR"})},onChange(e){o({type:"INPUT.CHANGE",value:e.currentTarget.value,src:"input-change"})},onKeyDown(e){if(e.defaultPrevented)return;if(!p)return;if(e.ctrlKey||e.shiftKey||function(e){return function(e){return e.nativeEvent??e}(e).isComposing||229===e.keyCode}(e))return;const t=r("openOnKeyPress"),n=e.ctrlKey||e.metaKey||e.shiftKey,a=!0,l={ArrowDown(e){(t||g)&&(o({type:e.altKey?"OPEN":"INPUT.ARROW_DOWN",keypress:a,src:"arrow-key"}),e.preventDefault())},ArrowUp(){(t||g)&&(o({type:e.altKey?"CLOSE":"INPUT.ARROW_UP",keypress:a,src:"arrow-key"}),e.preventDefault())},Home(e){n||(o({type:"INPUT.HOME",keypress:a}),g&&e.preventDefault())},End(e){n||(o({type:"INPUT.END",keypress:a}),g&&e.preventDefault())},Enter(e){var t;o({type:"INPUT.ENTER",keypress:a,src:"item-select"});const n=s("isCustomValue")&&r("allowCustomValue"),l=null!=v,c=r("alwaysSubmitOnEnter");if(g&&!n&&!c&&l&&e.preventDefault(),null==v)return;const u=J6(i,v);var d;(null==(d=u)?void 0:d.matches("a[href]"))&&(null==(t=r("navigate"))||t({value:v,node:u,href:u.href}))},Escape(){o({type:"INPUT.ESCAPE",keypress:a,src:"escape-key"}),e.preventDefault()}}[qW(e,{dir:r("dir")})];null==l||l(e)}}),getTriggerProps:(e={})=>t.button({...r6.trigger.attrs,dir:r("dir"),id:$6(i),"aria-haspopup":b?"listbox":"dialog",type:"button",tabIndex:e.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":g,"data-state":g?"open":"closed","aria-controls":g?H6(i):void 0,disabled:d,"data-invalid":cW(f),"data-focusable":cW(e.focusable),"data-readonly":cW(m),"data-disabled":cW(d),onFocus(){e.focusable&&o({type:"INPUT.FOCUS",src:"trigger"})},onClick(e){e.defaultPrevented||p&&UW(e)&&o({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(e){p&&"touch"!==e.pointerType&&UW(e)&&(e.preventDefault(),queueMicrotask((()=>{e8(i)})))},onKeyDown(e){if(e.defaultPrevented)return;if(b)return;const t={ArrowDown(){o({type:"INPUT.ARROW_DOWN",src:"arrow-key"})},ArrowUp(){o({type:"INPUT.ARROW_UP",src:"arrow-key"})}}[qW(e,{dir:r("dir")})];t&&(t(e),e.preventDefault())}}),getContentProps:()=>t.element({...r6.content.attrs,dir:r("dir"),id:H6(i),role:b?"listbox":"dialog",tabIndex:-1,hidden:!g,"data-state":g?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":j6(i),"aria-multiselectable":!(!r("multiple")||!b)||void 0,"data-empty":cW(0===u.size),onPointerDown(e){UW(e)&&e.preventDefault()}}),getListProps:()=>t.element({...r6.list.attrs,role:b?void 0:"listbox","data-empty":cW(0===u.size),"aria-labelledby":j6(i),"aria-multiselectable":!(!r("multiple")||b)||void 0}),getClearTriggerProps:()=>t.button({...r6.clearTrigger.attrs,dir:r("dir"),id:V6(i),type:"button",tabIndex:-1,disabled:d,"data-invalid":cW(f),"aria-label":c.clearTriggerLabel,"aria-controls":B6(i),hidden:!n.get("value").length,onPointerDown(e){UW(e)&&e.preventDefault()},onClick(e){e.defaultPrevented||p&&o({type:"VALUE.CLEAR",src:"clear-trigger"})}}),getItemState:x,getItemProps(e){const n=x(e),a=n.value;return t.element({...r6.item.attrs,dir:r("dir"),id:W6(i,a),role:"option",tabIndex:-1,"data-highlighted":cW(n.highlighted),"data-state":n.selected?"checked":"unchecked","aria-selected":uW(n.selected),"aria-disabled":uW(n.disabled),"data-disabled":cW(n.disabled),"data-value":n.value,onPointerMove(){n.disabled||n.highlighted||o({type:"ITEM.POINTER_MOVE",value:a})},onPointerLeave(){if(e.persistFocus)return;if(n.disabled)return;const t=l.previous();(null==t?void 0:t.type.includes("POINTER"))&&o({type:"ITEM.POINTER_LEAVE",value:a})},onClick(e){(function(e){const t=e.currentTarget;if(!t)return!1;const n=t.localName;return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)})(e)||BW(e)||$W(e)||n.disabled||o({type:"ITEM.CLICK",src:"item-select",value:a})}})},getItemTextProps(e){const n=x(e);return t.element({...r6.itemText.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked","data-disabled":cW(n.disabled),"data-highlighted":cW(n.highlighted)})},getItemIndicatorProps(e){const n=x(e);return t.element({"aria-hidden":!0,...r6.itemIndicator.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked",hidden:!n.selected})},getItemGroupProps(e){const{id:n}=e;return t.element({...r6.itemGroup.attrs,dir:r("dir"),id:G6(i,n),"aria-labelledby":q6(i,n),"data-empty":cW(0===u.size),role:"group"})},getItemGroupLabelProps(e){const{htmlFor:n}=e;return t.element({...r6.itemGroupLabel.attrs,dir:r("dir"),id:q6(i,n),role:"presentation"})}}}var n8="pointerdown.outside",r8="focus.outside";function a8(e){for(const t of e)if(dW(t)&&nY(t))return!0;return!1}var o8=e=>"clientY"in e;function i8(e,t){if(!t||!o8(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,a=t.scrollWidth>t.clientWidth,o=a&&e.clientY>t.offsetTop+t.clientHeight;return!!function(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(a?16:0)},{x:e.clientX,y:e.clientY})&&(r||o)}function s8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:a,onInteractOutside:o,defer:i,followControlledElements:s=!0}=t;if(!e)return;const l=kW(e),c=xW(e),u=function(e){const t={each(t){var n;for(let r=0;r<(null==(n=e.frames)?void 0:n.length);r+=1){const n=e.frames[r];n&&t(n)}},addEventListener:(e,n,r)=>(t.each((t=>{try{t.document.addEventListener(e,n,r)}catch{}})),()=>{try{t.removeEventListener(e,n,r)}catch{}}),removeEventListener(e,n,r){t.each((t=>{try{t.document.removeEventListener(e,n,r)}catch{}}))}};return t}(c),d=function(e){const t=null!=e.frameElement?e.parent:null;return{addEventListener:(e,n,r)=>{try{null==t||t.addEventListener(e,n,r)}catch{}return()=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}}}(c);function p(t,r){if(!dW(r))return!1;if(!r.isConnected)return!1;if(vW(e,r))return!1;if(function(e,t){if(!o8(t)||!e)return!1;const n=e.getBoundingClientRect();return 0!==n.width&&0!==n.height&&n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}(e,t))return!1;if(s&&IW(e,r))return!1;const a=l.querySelector(`[aria-controls="${e.id}"]`);if(a){if(i8(t,dY(a)))return!1}return!i8(t,dY(e))&&!(null==n?void 0:n(r))}const f=new Set,h=mW(null==e?void 0:e.getRootNode());let m=!1;function g(t){m=!0;const n=()=>{m=!1};function r(n){var r;const s=i&&!MW()?sY:e=>e(),l=n??t,c=(null==(r=null==l?void 0:l.composedPath)?void 0:r.call(l))??[null==l?void 0:l.target];s((()=>{const n=h?c[0]:zW(t);if(e&&p(t,n)){if(a||o){const t=Fq(a,o);e.addEventListener(n8,t,{once:!0})}c8(e,n8,{bubbles:!1,cancelable:!0,detail:{originalEvent:l,contextmenu:$W(l),focusable:a8(c),target:n}})}}))}l.addEventListener("pointerup",n,{once:!0}),c.addEventListener("pointerup",n,{once:!0}),"touch"===t.pointerType?(f.forEach((e=>e())),f.add(WW(l,"click",r,{once:!0})),f.add(d.addEventListener("click",r,{once:!0})),f.add(u.addEventListener("click",r,{once:!0}))):r()}const y=new Set,b=setTimeout((()=>{y.add(WW(l,"pointerdown",g,!0)),y.add(d.addEventListener("pointerdown",g,!0)),y.add(u.addEventListener("pointerdown",g,!0))}),0);function v(t){if(m)return;(i?sY:e=>e())((()=>{var n;const a=(null==(n=null==t?void 0:t.composedPath)?void 0:n.call(t))??[null==t?void 0:t.target],i=h?a[0]:zW(t);if(e&&p(t,i)){if(r||o){const t=Fq(r,o);e.addEventListener(r8,t,{once:!0})}c8(e,r8,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:nY(i),target:i}})}}))}return MW()||(y.add(WW(l,"focusin",v,!0)),y.add(d.addEventListener("focusin",v,!0)),y.add(u.addEventListener("focusin",v,!0))),()=>{clearTimeout(b),f.forEach((e=>e())),y.forEach((e=>e()))}}function l8(e,t){const{defer:n}=t,r=n?sY:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(s8(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function c8(e,t,n){const r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function u8(e,t){return WW(kW(e),"keydown",(e=>{"Escape"===e.key&&(e.isComposing||null==t||t(e))}),{capture:!0})}var d8,p8="layer:request-dismiss",f8={layers:[],branches:[],recentlyRemoved:new Set,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 t;return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(null==(t=this.topMostPointerBlockingLayer())?void 0:t.node):-1)},isTopMost(e){const t=this.layers[this.count()-1];return(null==t?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-1===n?[]:this.layers.slice(n+1).filter((e=>e.type===t))},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find((e=>e.type===t))},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!this.getNestedLayers(e).some((e=>vW(e.node,t)))||this.recentlyRemoved.size>0},isInBranch(e){return Array.from(this.branches).some((t=>vW(t,e)))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);if(!(t<0)){if(this.recentlyRemoved.add(e),lY((()=>this.recentlyRemoved.delete(e))),t<this.count()-1){this.getNestedLayers(e).forEach((t=>f8.dismiss(t.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 n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)}))},indexOf(e){return this.layers.findIndex((t=>t.node===e))},dismiss(e,t){const n=this.indexOf(e);if(-1===n)return;const r=this.layers[n];var a,o;a=p8,o=e=>{var t;null==(t=r.requestDismiss)||t.call(r,e),e.defaultPrevented||null==r||r.dismiss()},e.addEventListener(a,o,{once:!0}),function(e,t,n){const r=e.ownerDocument.defaultView||window,a=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});e.dispatchEvent(a)}(e,p8,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function h8(){f8.layers.forEach((({node:e})=>{e.style.pointerEvents=f8.isBelowPointerBlockingLayer(e)?"none":"auto"}))}function m8(e,t){const n=kW(e),r=[];return f8.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(d8=document.body.style.pointerEvents,queueMicrotask((()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")}))),null==t||t.forEach((e=>{const[t,n]=yY((()=>{const t=e();return dW(t)?t:null}),{timeout:1e3});t.then((e=>r.push(gY(e,{pointerEvents:"auto"})))),r.push(n)})),()=>{f8.hasPointerBlockingLayer()||(queueMicrotask((()=>{n.body.style.pointerEvents=d8,n.body.removeAttribute("data-inert"),0===n.body.style.length&&n.body.removeAttribute("style")})),r.forEach((e=>e())))}}function g8(e,t){const{defer:n}=t,r=n?sY:e=>e(),a=[];return a.push(r((()=>{const n=Nq(e)?e():e;a.push(function(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e)return void Bq("[@zag-js/dismissable] node is `null` or `undefined`");if(!e)return;const{onDismiss:r,onRequestDismiss:a,pointerBlocking:o,exclude:i,debug:s,type:l="dialog"}=t,c={dismiss:r,node:e,type:l,pointerBlocking:o,requestDismiss:a};f8.add(c),h8();const u=[o?m8(e,t.persistentElements):void 0,u8(e,(function(n){var a;f8.isTopMost(e)&&(null==(a=t.onEscapeKeyDown)||a.call(t,n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))})),l8(e,{exclude:function(n){var r;if(!e)return!1;const a="function"==typeof i?i():i,o=Array.isArray(a)?a:[a],s=null==(r=t.persistentElements)?void 0:r.map((e=>e())).filter(dW);return s&&o.push(...s),o.some((e=>vW(e,n)))||f8.isInNestedLayer(e,n)},onFocusOutside:function(e){var n,a;const o=zW(e.detail.originalEvent);f8.isInBranch(o)||(null==(n=t.onFocusOutside)||n.call(t,e),null==(a=t.onInteractOutside)||a.call(t,e),e.defaultPrevented||(s&&console.log("onFocusOutside:",e.detail.originalEvent),null==r||r()))},onPointerDownOutside:function(n){var a,o;const i=zW(n.detail.originalEvent);f8.isBelowPointerBlockingLayer(e)||f8.isInBranch(i)||(null==(a=t.onPointerDownOutside)||a.call(t,n),null==(o=t.onInteractOutside)||o.call(t,n),n.defaultPrevented||(s&&console.log("onPointerDownOutside:",n.detail.originalEvent),null==r||r()))},defer:t.defer})];return()=>{f8.remove(e),h8(),function(e){e.style.pointerEvents=""}(e),u.forEach((e=>null==e?void 0:e()))}}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}var y8=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);var b8=null,v8=new Set,k8=new Map,x8=!1,w8=!1,E8={Tab:!0,Escape:!0};function _8(e,t){for(let n of v8)n(e,t)}function S8(e){x8=!0,function(e){return!(e.metaKey||!jW()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(b8="keyboard",_8("keyboard",e))}function T8(e){b8="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(x8=!0,_8("pointer",e))}function C8(e){HW(e)&&(x8=!0,b8="virtual")}function A8(e){const t=zW(e);t!==xW(t)&&t!==kW(t)&&e.isTrusted&&(x8||w8||(b8="virtual",_8("virtual",e)),x8=!1,w8=!1)}function N8(){x8=!1,w8=!0}var I8=(e,t)=>{const n=xW(e),r=kW(e),a=k8.get(n);if(a){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:a.focus})}catch{}r.removeEventListener("keydown",S8,!0),r.removeEventListener("keyup",S8,!0),r.removeEventListener("click",C8,!0),n.removeEventListener("focus",A8,!0),n.removeEventListener("blur",N8,!1),void 0!==n.PointerEvent?(r.removeEventListener("pointerdown",T8,!0),r.removeEventListener("pointermove",T8,!0),r.removeEventListener("pointerup",T8,!0)):(r.removeEventListener("mousedown",T8,!0),r.removeEventListener("mousemove",T8,!0),r.removeEventListener("mouseup",T8,!0)),k8.delete(n)}};function O8(){return"keyboard"===b8||"virtual"===b8}function R8(e={}){const{isTextInput:t,autoFocus:n,onChange:r,root:a}=e;!function(e){if("undefined"==typeof window||k8.get(xW(e)))return;const t=xW(e),n=kW(e);let r=t.HTMLElement.prototype.focus;try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:function(){x8=!0,r.apply(this,arguments)}})}catch{}n.addEventListener("keydown",S8,!0),n.addEventListener("keyup",S8,!0),n.addEventListener("click",C8,!0),t.addEventListener("focus",A8,!0),t.addEventListener("blur",N8,!1),void 0!==t.PointerEvent?(n.addEventListener("pointerdown",T8,!0),n.addEventListener("pointermove",T8,!0),n.addEventListener("pointerup",T8,!0)):(n.addEventListener("mousedown",T8,!0),n.addEventListener("mousemove",T8,!0),n.addEventListener("mouseup",T8,!0)),t.addEventListener("beforeunload",(()=>{I8(e)}),{once:!0}),k8.set(t,{focus:r})}(a),null==r||r({isFocusVisible:n||O8(),modality:b8});const o=(e,n)=>{(function(e,t,n){const r=n?zW(n):null,a=kW(r),o=xW(r),i=wW(a);return!((e=e||i instanceof o.HTMLInputElement&&!y8.has(null==i?void 0:i.type)||i instanceof o.HTMLTextAreaElement||i instanceof o.HTMLElement&&i.isContentEditable)&&"keyboard"===t&&n instanceof o.KeyboardEvent&&!Reflect.has(E8,n.key))})(!!t,e,n)&&(null==r||r({isFocusVisible:O8(),modality:e}))};return v8.add(o),()=>{v8.delete(o)}}var{guards:P8,createMachine:L8,choose:D8}={guards:{and:(...e)=>function(t){return e.every((e=>t.guard(e)))},or:(...e)=>function(t){return e.some((e=>t.guard(e)))},not:e=>function(t){return!t.guard(e)}},createMachine:e=>tW(e),choose:e=>function({choose:t}){var n;return null==(n=t(e))?void 0:n.actions}},{and:M8,not:F8}=P8,j8=L8({props:({props:e})=>({loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:e}){uY(e)},collection:m6.empty(),...e,positioning:{placement:"bottom",sameWidth:!0,...e.positioning},translations:{triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value",...e.translations}}),initialState:({prop:e})=>e("open")||e("defaultOpen")?"open.suggesting":"closed.idle",context({prop:e,bindable:t,getContext:n,getEvent:r}){const a=e("value")??e("defaultValue")??[],o=e("collection").findMany(a);return{currentPlacement:t((()=>({defaultValue:void 0}))),value:t((()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:Tq,hash:e=>e.join(","),onChange(t){var r;const a=n(),o=e("collection"),i=f6({values:t,collection:o,selectedItemMap:a.get("selectedItemMap")}),s=e("value")??t,l=s===t?i:f6({values:s,collection:o,selectedItemMap:i.nextSelectedItemMap});a.set("selectedItemMap",l.nextSelectedItemMap),null==(r=e("onValueChange"))||r({value:t,items:i.selectedItems})}}))),highlightedValue:t((()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(t){var n;const r=e("collection").find(t);null==(n=e("onHighlightChange"))||n({highlightedValue:t,highlightedItem:r})}}))),inputValue:t((()=>{let t=e("inputValue")||e("defaultInputValue");const n=e("value")||e("defaultValue");if(!t.trim()&&!e("multiple")){const r=e("collection").stringifyMany(n);t=jq(e("selectionBehavior"),{preserve:t||r,replace:r,clear:""})}return{defaultValue:t,value:e("inputValue"),onChange(t){var n;const a=r(),o=(a.previousEvent||a).src;null==(n=e("onInputValueChange"))||n({inputValue:t,reason:o})}}})),highlightedItem:t((()=>{const t=e("highlightedValue");return{defaultValue:e("collection").find(t)}})),selectedItemMap:t((()=>({defaultValue:h6({selectedItems:o,collection:e("collection")})})))}},computed:{isInputValueEmpty:({context:e})=>0===e.get("inputValue").length,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>"autocomplete"===e("inputBehavior"),autoHighlight:({prop:e})=>"autohighlight"===e("inputBehavior"),hasSelectedItems:({context:e})=>e.get("value").length>0,selectedItems:({context:e,prop:t})=>d6({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")}),valueAsString:({computed:e,prop:t})=>t("collection").stringifyItems(e("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:r,send:a}){n([()=>e.hash("value")],(()=>{r(["syncSelectedItems"])})),n([()=>e.get("inputValue")],(()=>{r(["syncInputValue"])})),n([()=>e.get("highlightedValue")],(()=>{r(["syncHighlightedItem","autofillInputValue"])})),n([()=>t("open")],(()=>{r(["toggleVisibility"])})),n([()=>t("collection").toString()],(()=>{a({type:"CHILDREN_CHANGE"})}))},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:D8([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{closed:{tags:["closed"],initial:"idle",states:{idle:{tags:["idle"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"open.interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"open.suggesting"},{target:"open.interacting"}],"INPUT.CHANGE":[{guard:M8("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"open.suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:M8("isCustomValue",F8("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:M8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:M8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}}}},open:{tags:["open","focused"],entry:["setInitialFocus"],effects:["trackFocusVisible","scrollToHighlightedItem","trackDismissableLayer","trackPlacement"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"closed.focused",actions:["setFinalFocus"]},{target:"closed.idle"}],"INPUT.ENTER":[{guard:M8("isOpenControlled","isCustomValue",F8("hasHighlightedItem"),F8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:M8("isCustomValue",F8("hasHighlightedItem"),F8("allowCustomValue")),target:"closed.focused",actions:["revertInputValue","invokeOnClose"]},{guard:M8("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"ITEM.CLICK":[{guard:M8("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:M8("isOpenControlled","isCustomValue",F8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:M8("isCustomValue",F8("allowCustomValue")),target:"closed.idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"closed.focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]},initial:"interacting",states:{interacting:{on:{CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:M8("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:M8("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.ESCAPE":[{guard:M8("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"closed.focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}]}},suggesting:{on:{CHILDREN_CHANGE:[{guard:M8("isHighlightedItemRemoved","hasCollectionItems","autoHighlight"),actions:["clearHighlightedValue","highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{guard:"autoHighlight",actions:["highlightFirstItem"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]}}}}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>null!=e.get("highlightedValue"),closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>null!=e("open"),openOnChange:({prop:e,context:t})=>{const n=e("openOnChange");return!0===(r=n)||!1===r?n:!!(null==n?void 0:n({inputValue:t.get("inputValue")}));var r},restoreFocus:({event:e})=>{var t;const n=e.restoreFocus??(null==(t=e.previousEvent)?void 0:t.restoreFocus);return null==n||!!n},isChangeEvent:({event:e})=>{var t;return"INPUT.CHANGE"===(null==(t=e.previousEvent)?void 0:t.type)},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue")),hasCollectionItems:({prop:e})=>e("collection").size>0},effects:{trackFocusVisible({scope:e}){var t;return R8({root:null==(t=e.getRootNode)?void 0:t.call(e)})},trackDismissableLayer({send:e,prop:t,scope:n}){if(t("disableLayer"))return;return g8((()=>Y6(n)),{type:"listbox",defer:!0,exclude:()=>{return[Z6(n),Q6(n),(e=n,e.getById(V6(e)))];var e},onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(t){t.preventDefault(),t.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},trackPlacement:({context:e,prop:t,scope:n})=>(e.set("currentPlacement",t("positioning").placement),M6((()=>X6(n)||Q6(n)),(()=>K6(n)),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})),scrollToHighlightedItem({context:e,prop:t,scope:n}){const r=Z6(n);let a=[];const o=r=>{if("pointer"===b8)return;const o=e.get("highlightedValue");if(!o)return;const i=Y6(n),s=t("scrollToIndexFn");if(s){return void s({index:t("collection").indexOf(o),immediate:r,getElement:()=>J6(n,o)})}const l=J6(n,o),c=sY((()=>{mY(l,{rootEl:i,block:"nearest"})}));a.push(c)},i=sY((()=>{var e;b8=e="virtual",_8(e,null),o(!0)}));a.push(i);const s=cY(r,{attributes:["aria-activedescendant"],callback:()=>o(!1)});return a.push(s),()=>{a.forEach((e=>e()))}}},actions:{reposition({context:e,prop:t,scope:n,event:r}){M6((()=>X6(n)),(()=>K6(n)),{...t("positioning"),...r.options,defer:!0,listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},setHighlightedValue({context:e,event:t}){null!=t.value&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var t;const{context:n,prop:r}=e,a=r("collection"),o=n.get("highlightedValue");if(!o||!a.has(o))return;const i=r("multiple")?_q(n.get("value"),o):[o];null==(t=r("onSelect"))||t({value:i,itemValue:o}),n.set("value",i);const s=jq(r("selectionBehavior"),{preserve:n.get("inputValue"),replace:a.stringifyMany(i),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){lY((()=>{const r=e.get("highlightedValue");if(null==r)return;const a=J6(n,r),o=Y6(n),i=t("scrollToIndexFn");if(i){i({index:t("collection").indexOf(r),immediate:!0,getElement:()=>J6(n,r)})}else mY(a,{rootEl:o,block:"nearest"})}))},selectItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{var e;const r=a("multiple")?_q(t.get("value"),n.value):[n.value];null==(e=a("onSelect"))||e({value:r,itemValue:n.value}),t.set("value",r);const o=jq(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r),clear:""});t.set("inputValue",o)}))},clearItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{const e=Eq(t.get("value"),n.value);t.set("value",e);const r=jq(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(e),clear:""});t.set("inputValue",r)}))},setInitialFocus({scope:e}){sY((()=>{e8(e)}))},setFinalFocus({scope:e}){sY((()=>{const t=Q6(e);null==(null==t?void 0:t.dataset.focusable)?e8(e):(e=>{const t=Q6(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0})})(e)}))},syncInputValue({context:e,scope:t,event:n}){const r=Z6(t);r&&(r.value=e.get("inputValue"),queueMicrotask((()=>{"INPUT.CHANGE"!==n.current().type&&iW(r)})))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){const r=jq(t("selectionBehavior"),{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",r)},setValue(e){const{context:t,flush:n,event:r,prop:a}=e;n((()=>{t.set("value",r.value);const e=jq(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r.value),clear:""});t.set("inputValue",e)}))},clearSelectedItems(e){const{context:t,flush:n,prop:r}=e;n((()=>{t.set("value",[]);const e=jq(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany([]),clear:""});t.set("inputValue",e)}))},scrollContentToTop({prop:e,scope:t}){const n=e("scrollToIndexFn");if(n){const r=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>J6(t,r)})}else{const e=Y6(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;const a=z8(t);null==(r=e("onOpenChange"))||r({open:!0,reason:a,value:n.get("value")})},invokeOnClose({prop:e,event:t,context:n}){var r;const a=z8(t);null==(r=e("onOpenChange"))||r({open:!1,reason:a,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(Y6(n)?queueMicrotask:sY)((()=>{const n=t("collection").firstValue;n&&e.set("highlightedValue",n)}))},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(Y6(n)?queueMicrotask:sY)((()=>{const n=t("collection").lastValue;n&&e.set("highlightedValue",n)}))},highlightNextItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getNextValue(r),!n&&t("loopFocus")&&(n=a.firstValue)):n=a.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getPreviousValue(r),!n&&t("loopFocus")&&(n=a.lastValue)):n=a.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){sY((()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)}))},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){sY((()=>{let r=null;r=n("hasSelectedItems")?t("collection").sort(e.get("value"))[0]:t("collection").firstValue,r&&e.set("highlightedValue",r)}))},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){sY((()=>{const r=t("collection");let a=null;a=n("hasSelectedItems")?r.sort(e.get("value"))[0]:r.lastValue,a&&e.set("highlightedValue",a)}))},autofillInputValue({context:e,computed:t,prop:n,event:r,scope:a}){const o=Z6(a),i=n("collection");if(!t("autoComplete")||!o||!r.keypress)return;const s=i.stringify(e.get("highlightedValue"));sY((()=>{o.value=s||e.get("inputValue")}))},syncSelectedItems(e){queueMicrotask((()=>{const{context:t,prop:n}=e,r=n("collection"),a=t.get("value"),o=f6({values:a,collection:r,selectedItemMap:t.get("selectedItemMap")});t.set("selectedItemMap",o.nextSelectedItemMap);const i=jq(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:r.stringifyMany(a),clear:""});t.set("inputValue",i)}))},syncHighlightedItem({context:e,prop:t}){const n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});function z8(e){return(e.previousEvent||e).src}const B8=X.forwardRef(((e,t)=>{const{children:n,defaultValue:r=[],items:a,multiple:o=!1,placeholder:i,name:s,disabled:l,required:c,id:u,onValueChange:d}=e,p=X.useId(),f=u??p,h=qO(),[m,g]=X.useState(a),y=X.useMemo((()=>m6({items:m,itemToValue:e=>e.value,itemToString:e=>e.label})),[m]),b=t8(xY(j8,{id:f,collection:y,defaultValue:r,multiple:o,placeholder:i,name:s,disabled:l,required:c,openOnClick:!0,getRootNode:()=>{var e;return(null==(e=null==h?void 0:h.shadowHost)?void 0:e.shadowRoot)??document},selectionBehavior:o?"clear":"replace",onOpenChange(e){e.open||g(a)},onInputValueChange(e){const t=""===e.inputValue.trim()?a:a.filter((t=>t.label.toLowerCase().includes(e.inputValue.toLowerCase())));g(t.length>0?t:[])},onValueChange(e){null==d||d(e)}}),SY),v=X.useMemo((()=>({api:b,options:m})),[b,m]),k=b.getRootProps();return og.jsx("div",{"data-scope":"combobox","data-part":"root",...k,children:og.jsx(e9.Provider,{value:v,children:n})})}));B8.displayName="ComboboxRoot";const H8=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=t9(),o=a.getControlProps();return og.jsx("div",{"data-scope":"combobox","data-part":"control","data-state":a.open?"open":"closed","data-disabled":a.disabled?"":void 0,"data-focus":a.focused?"":void 0,...o,ref:U8(t,o.ref),...r,children:n})}));function U8(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))}}H8.displayName="ComboboxControl";const $8=X.forwardRef(((e,t)=>{const n=t9(),r=n.getInputProps();return og.jsx("input",{"data-scope":"combobox","data-part":"input","data-state":n.open?"open":"closed",...r,...e,ref:U8(t,r.ref)})}));$8.displayName="ComboboxInput";const V8=X.forwardRef(((e,t)=>{const n=t9(),r=n.getTriggerProps();return og.jsx("button",{type:"button","data-scope":"combobox","data-part":"trigger","data-state":n.open?"open":"closed","data-disabled":n.disabled?"":void 0,...r,ref:U8(t,r.ref),...e,children:e.children??"▼"})}));V8.displayName="ComboboxTrigger";const G8=X.forwardRef((function(e,t){const n=t9();return og.jsx("div",{ref:t,...n.getPositionerProps(),...e})})),q8=X.forwardRef(((e,t)=>{const n=t9(),r=n.getContentProps();return og.jsx("div",{"data-scope":"combobox","data-part":"content","data-state":n.open?"open":"closed",...r,ref:U8(t,r.ref),...e,children:e.children})}));q8.displayName="ComboboxContent";const W8=X.forwardRef(((e,t)=>{const n=t9().getListProps();return og.jsx("div",{ref:U8(t,n.ref),"data-scope":"combobox","data-part":"list",...n,...e,children:e.children})}));W8.displayName="ComboboxList";const Y8=({children:e})=>{const t=function(){const e=X.useContext(e9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.options}();return og.jsx(og.Fragment,{children:e(t)})};Y8.displayName="ComboboxListItems";const Z8=X.forwardRef(((e,t)=>{const{children:n="No results found",...r}=e;return og.jsx("div",{ref:t,"data-scope":"combobox","data-part":"list-empty",...r,children:n})}));Z8.displayName="ComboboxListEmpty";const K8=X.createContext(null),X8=X.forwardRef(((e,t)=>{const{item:n,...r}=e,a=t9(),o=a.getItemState({item:n}),i=a.getItemProps({item:n});return og.jsx(K8.Provider,{value:n,children:og.jsx("div",{ref:U8(t,i.ref),"data-scope":"combobox","data-part":"item","data-value":n.value,"data-highlighted":o.highlighted?"":void 0,"data-state":o.selected?"checked":"unchecked","data-disabled":o.disabled?"":void 0,...i,...r,children:e.children})})}));X8.displayName="ComboboxItem";const Q8=X.forwardRef(((e,t)=>{const n=X.useContext(K8),r=t9(),a=n?r.getItemTextProps({item:n}):{};return og.jsx("span",{ref:U8(t,a.ref),"data-scope":"combobox","data-part":"item-text",...a,...e})}));Q8.displayName="ComboboxItemText";const J8=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.useContext(K8),o=t9(),i=a?o.getItemState({item:a}):{selected:!1},s=a?o.getItemIndicatorProps({item:a}):{};return i.selected?og.jsx("span",{ref:U8(t,s.ref),"data-scope":"combobox","data-part":"item-indicator","data-state":"checked","aria-hidden":!0,...s,...r,children:n??og.jsx(bG,{iconSettings:{builtIn:"LuCheck"}})}):null}));J8.displayName="ComboboxItemIndicator";const e9=X.createContext(null);function t9(){const e=X.useContext(e9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.api}const n9=X.forwardRef(((e,t)=>{const n=t9(),r=n.selectedItems??[],a=n.clearValue;return 0===r.length?null:og.jsx("div",{ref:t,"data-scope":"combobox","data-part":"selected-tags",className:e.className,style:e.style,children:r.map((t=>og.jsxs("span",{"data-scope":"combobox","data-part":"tag",children:[e.renderTag?e.renderTag(t):t.label,og.jsx("button",{type:"button","data-part":"tag-clear","aria-label":`Remove ${t.label}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),null==a||a(t.value)},children:og.jsx(bG,{iconSettings:{builtIn:"IoCloseOutline"}})})]},t.value)))})}));n9.displayName="ComboboxSelectedTags";var r9=Object.defineProperty,a9=(e,t,n)=>((e,t,n)=>t in e?r9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),o9={activateTrap(e,t){if(e.length>0){const n=e[e.length-1];n!==t&&n.pause()}const n=e.indexOf(t);-1===n||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},i9=[],s9=class{constructor(e,t){a9(this,"trapStack"),a9(this,"config"),a9(this,"doc"),a9(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),a9(this,"portalContainers",new Set),a9(this,"listenerCleanups",[]),a9(this,"handleFocus",(e=>{const t=zW(e),n=this.findContainerIndex(t,e)>=0;if(n||pW(t))n&&(this.state.mostRecentlyFocusedNode=t);else{let t;e.stopImmediatePropagation();let n=!0;if(this.state.mostRecentlyFocusedNode)if(oY(this.state.mostRecentlyFocusedNode)>0){const e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){const e=r.findIndex((e=>e===this.state.mostRecentlyFocusedNode));e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some((e=>e.tabbableNodes.some((e=>oY(e)>0))))||(n=!1);else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0})),a9(this,"handlePointerDown",(e=>{const t=zW(e);this.findContainerIndex(t,e)>=0||(p9(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):p9(this.config.allowOutsideClick,e)||e.preventDefault())})),a9(this,"handleClick",(e=>{const t=zW(e);this.findContainerIndex(t,e)>=0||p9(this.config.clickOutsideDeactivates,e)||p9(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())})),a9(this,"handleTabKey",(e=>{if(this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;const t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;c9(e)&&e.preventDefault(),this.tryFocus(n)}})),a9(this,"handleEscapeKey",(e=>{f9(e)&&!1!==p9(this.config.escapeDeactivates,e)&&(e.preventDefault(),this.deactivate())})),a9(this,"_mutationObserver"),a9(this,"setupMutationObserver",(()=>{const e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver((e=>{e.some((e=>Array.from(e.removedNodes).some((e=>e===this.state.mostRecentlyFocusedNode))))&&this.tryFocus(this.getInitialFocusNode());e.some((e=>"attributes"===e.type&&("aria-controls"===e.attributeName||"aria-expanded"===e.attributeName)||"childList"===e.type&&e.addedNodes.length>0&&Array.from(e.addedNodes).some((e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;const t=e;return!!function(e){var t;return!!function(e){return e.hasAttribute("aria-controls")&&"true"===e.getAttribute("aria-expanded")}(e)||Boolean(null==(t=e.querySelector)?void 0:t.call(e,'[aria-controls][aria-expanded="true"]'))}(t)||!(!t.id||this.state.containers.some((e=>e.contains(t))))&&RW(t)}))))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())}))})),a9(this,"updateObservedNodes",(()=>{var e;null==(e=this._mutationObserver)||e.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map((e=>{var t;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})})),this.portalContainers.forEach((e=>{this.observePortalContainer(e)})))})),a9(this,"getInitialFocusNode",(()=>{let e=this.getNodeForOption("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!nY(e)){const t=wW(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{const t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else null===e&&(e=this.getNodeForOption("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");if(e.isConnected||(e=this.getNodeForOption("fallbackFocus")),!e||!e.isConnected)throw new Error("Your focus-trap needs to have at least one focusable element");return e})),a9(this,"tryFocus",(e=>{!1!==e&&e!==wW(this.doc)&&(e&&e.focus?(e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,m9(e)&&e.select()):this.tryFocus(this.getInitialFocusNode()))})),a9(this,"deactivate",(e=>{if(!this.state.active)return this;const t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),o9.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const n=this.getOption(t,"onDeactivate"),r=this.getOption(t,"onPostDeactivate"),a=this.getOption(t,"checkCanReturnFocus"),o=this.getOption(t,"returnFocus","returnFocusOnDeactivate");null==n||n();const i=()=>{h9((()=>{if(o){const e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(e)}null==r||r()}))};if(o&&a){return a(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(i,i),this}return i(),this})),a9(this,"pause",(e=>{if(this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onPause"),n=this.getOption(e,"onPostPause");return this.state.paused=!0,null==t||t(),this.removeListeners(),this.updateObservedNodes(),null==n||n(),this})),a9(this,"unpause",(e=>{if(!this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onUnpause"),n=this.getOption(e,"onPostUnpause");return this.state.paused=!1,null==t||t(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n(),this})),a9(this,"updateContainerElements",(e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this))),a9(this,"getReturnFocusNode",(e=>{const t=this.getNodeForOption("setReturnFocus",{params:[e]});return t||!1!==t&&e})),a9(this,"getOption",((e,t,n)=>e&&void 0!==e[t]?e[t]:this.config[n||t])),a9(this,"getNodeForOption",((e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if("function"==typeof r&&(r=r(...n)),!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let a=r;if("string"==typeof r){try{a=this.doc.querySelector(r)}catch(jNe){throw new Error(`\`${e}\` appears to be an invalid selector; error="${jNe.message}"`)}if(!a&&!t)throw new Error(`\`${e}\` as selector refers to no known node`)}return a})),a9(this,"findNextNavNode",(e=>{const{event:t,isBackward:n=!1}=e,r=e.target||zW(t);this.updateTabbableNodes();let a=null;if(this.state.tabbableGroups.length>0){const e=this.findContainerIndex(r,t),o=e>=0?this.state.containerGroups[e]:void 0;if(e<0)a=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex((({firstTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||nY(r)&&!aY(r)&&!(null==o?void 0:o.nextTabbableNode(r,!1)))&&(n=e),n>=0){const e=0===n?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];a=oY(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else c9(t)||(a=null==o?void 0:o.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex((({lastTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||nY(r)&&!aY(r)&&!(null==o?void 0:o.nextTabbableNode(r)))&&(n=e),n>=0){const e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];a=oY(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else c9(t)||(a=null==o?void 0:o.nextTabbableNode(r))}}else a=this.getNodeForOption("fallbackFocus");return a})),this.trapStack=t.trapStack||i9;const n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:u9,isKeyBackward:d9,...t};this.doc=n.document||kW(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;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach((e=>{OW(e).forEach((e=>{this.addPortalContainer(e)}))}))}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return this.state.containerGroups.findIndex((({container:t,tabbableNodes:r})=>t.contains(e)||(null==n?void 0:n.includes(t))||r.find((t=>t===e))||this.isControlledElement(t,e)))}isControlledElement(e,t){return!!this.config.followControlledElements&&IW(e,t)}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map((e=>{const t=rY(e,{getShadowRoot:this.config.getShadowRoot}),n=tY(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],a=t[t.length-1],o=r,i=a;let s=!1;for(let l=0;l<t.length;l++)if(oY(t[l])>0){s=!0;break}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:a,firstDomTabbableNode:o,lastDomTabbableNode:i,nextTabbableNode:function(e,r=!0){const a=t.indexOf(e);if(a>=0)return t[a+(r?1:-1)];const o=n.indexOf(e);if(!(o<0))if(r){for(let t=o+1;t<n.length;t++)if(aY(n[t]))return n[t]}else for(let t=o-1;t>=0;t--)if(aY(n[t]))return n[t]}}})),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 o9.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?h9((()=>{this.tryFocus(this.getInitialFocusNode())})):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(WW(this.doc,"focusin",this.handleFocus,!0),WW(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),WW(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),WW(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),WW(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),WW(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=wW(this.doc),null==t||t();const a=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n()};return r?(r(this.state.containers.concat()).then(a,a),this):(a(),this)}},l9=e=>"keydown"===(null==e?void 0:e.type),c9=e=>l9(e)&&"Tab"===(null==e?void 0:e.key),u9=e=>l9(e)&&"Tab"===e.key&&!(null==e?void 0:e.shiftKey),d9=e=>l9(e)&&"Tab"===e.key&&(null==e?void 0:e.shiftKey),p9=(e,...t)=>"function"==typeof e?e(...t):e,f9=e=>!e.isComposing&&"Escape"===e.key,h9=e=>setTimeout(e,0),m9=e=>"input"===e.localName&&"select"in e&&"function"==typeof e.select;var g9=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=X.useState(),r=X.useRef(null),a=X.useRef(e),o=X.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return X.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return X.useEffect((()=>{const e=y9(r.current);o.current="mounted"===s?e:"none"}),[s]),HO((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=y9(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),HO((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=y9(r.current).includes(CSS.escape(o.animationName));if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=y9(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:X.useCallback((e=>{r.current=e?getComputedStyle(e):null,n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):X.Children.only(n),o=j5(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?X.cloneElement(a,{ref:o}):null};function y9(e){return(null==e?void 0:e.animationName)||"none"}g9.displayName="Presence";var b9="data-scroll-lock";function v9(e){const t=TW(e),n=null==t?void 0:t.scrollbarGutter;return"stable"===n||!0===(null==n?void 0:n.startsWith("stable "))}function k9(e){const t=e??document,n=t.defaultView??window,{documentElement:r,body:a}=t;if(a.hasAttribute(b9))return;const o=v9(r)||v9(a),i=n.innerWidth-r.clientWidth;a.setAttribute(b9,"");const s=function(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}(r),l=[function(e,t,n){if(!e)return sW;const r=e.style.getPropertyValue(t);return r===n?sW:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),0===e.style.length&&e.removeAttribute("style")})}(r,"--scrollbar-width",`${i}px`),FW()?(()=>{const{scrollX:e,scrollY:t,visualViewport:r}=n,l=(null==r?void 0:r.offsetLeft)??0,c=(null==r?void 0:r.offsetTop)??0,u={position:"fixed",overflow:"hidden",top:-(t-Math.floor(c))+"px",left:-(e-Math.floor(l))+"px",right:"0"};!o&&i>0&&(u[s]=`${i}px`);const d=gY(a,u);return()=>{null==d||d(),n.scrollTo({left:e,top:t,behavior:"instant"})}})():(()=>{const e={overflow:"hidden"};return!o&&i>0&&(e[s]=`${i}px`),gY(a,e)})()];return()=>{l.forEach((e=>null==e?void 0:e())),a.removeAttribute(b9)}}const x9="Dialog",[w9]=L5(x9),[E9,_9]=w9(x9),S9=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,s=X.useRef(null),l=X.useRef(null),[c=!1,u]=SZ({prop:r,defaultProp:a??!1,onChange:o});return og.jsx(E9,{scope:t,triggerRef:s,contentRef:l,contentId:VO(),titleId:VO(),descriptionId:VO(),open:c,onOpenChange:u,onOpenToggle:X.useCallback((()=>u((e=>!e))),[u]),modal:i,children:n})};S9.displayName=x9;const T9="DialogTrigger";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=_9(T9,n),o=j5(t,a.triggerRef);return og.jsx(d3.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":V9(a.open),...r,ref:o,onClick:P5(e.onClick,a.onOpenToggle)})})).displayName=T9;const C9="DialogPortal",[A9,N9]=w9(C9,{forceMount:void 0}),I9=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=_9(C9,t);return og.jsx(A9,{scope:t,forceMount:n,children:X.Children.map(r,(e=>og.jsx(g9,{present:n||o.open,children:og.jsx(Y3,{asChild:!0,container:a,children:e})})))})};I9.displayName=C9;const O9="DialogOverlay",R9=X.forwardRef(((e,t)=>{const n=N9(O9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=_9(O9,e.__scopeDialog);return o.modal?og.jsx(g9,{present:r||o.open,children:og.jsx(P9,{...a,ref:t})}):null}));R9.displayName=O9;const P9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=_9(O9,n),o=qO();return X.useEffect((()=>{var e;return k9((null==(e=null==o?void 0:o.rootElement)?void 0:e.ownerDocument)??document)}),[o]),og.jsx(d3.div,{"data-dialog-overlay":"","data-state":V9(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})),L9="DialogContent",D9=X.forwardRef(((e,t)=>{const n=N9(L9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=_9(L9,e.__scopeDialog);return og.jsx(g9,{present:r||o.open,children:o.modal?og.jsx(M9,{...a,ref:t}):og.jsx(F9,{...a,ref:t})})}));D9.displayName=L9;const M9=X.forwardRef(((e,t)=>{const n=_9(L9,e.__scopeDialog),r=X.useRef(null),a=j5(t,n.contentRef,r);return X.useEffect((()=>{const e=r.current;if(e){const t=document.querySelectorAll("[data-ikp-component]");return B1([e,...Array.from(t)])}}),[]),og.jsx(j9,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onPointerDownOutside:P5(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault();e.target.closest("[data-ikp-component]")&&e.preventDefault()})),onFocusOutside:P5(e.onFocusOutside,(e=>e.preventDefault()))})})),F9=X.forwardRef(((e,t)=>{const n=_9(L9,e.__scopeDialog),r=X.useRef(!1),a=X.useRef(!1);return og.jsx(j9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),j9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=_9(L9,n),l=X.useRef(null),c=j5(t,l);return c3(),X.useEffect((()=>{if(r)return function(e,t={}){let n;const r=sY((()=>{const r=(Array.isArray(e)?e:[e]).map((e=>"function"==typeof e?e():e)).filter((e=>null!=e));if(0===r.length)return;const a=r[0];n=new s9(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a,...t,document:kW(a)});try{n.activate()}catch{}}));return function(){null==n||n.deactivate(),r()}}(l.current,{preventScroll:!0,onActivate:a,onDeactivate:o,initialFocus:!1,allowOutsideClick:e=>{var t;const n=(null==(t=e.composedPath)?void 0:t.call(e)[0])??e.target;return!!n.closest("[data-ikp-component]")||!!n.closest("[data-dialog-overlay]")}})}),[]),og.jsx(o3,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":V9(s.open),...i,ref:c,onDismiss:()=>s.onOpenChange(!1)})})),z9="DialogTitle",B9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=_9(z9,n);return og.jsx(d3.h2,{id:a.titleId,...r,ref:t})}));B9.displayName=z9;const H9="DialogDescription";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=_9(H9,n);return og.jsx(d3.p,{id:a.descriptionId,...r,ref:t})})).displayName=H9;const U9="DialogClose",$9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=_9(U9,n);return og.jsx(d3.button,{type:"button",...r,ref:t,onClick:P5(e.onClick,(()=>a.onOpenChange(!1)))})}));function V9(e){return e?"open":"closed"}$9.displayName=U9;const G9=S9,q9=I9,W9=R9,Y9=D9,Z9=B9,K9=$9,X9=X.forwardRef(((e,t)=>{const n=X.useId();return og.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:"100%",width:"100%",ref:t,...e,children:[og.jsx("title",{children:"AI Avatar"}),og.jsx("path",{d:"M9.937 15.5002C9.84772 15.1542 9.66734 14.8384 9.41462 14.5856C9.1619 14.3329 8.84607 14.1525 8.5 14.0632L2.365 12.4812C2.26033 12.4515 2.16821 12.3885 2.10261 12.3017C2.03702 12.2149 2.00153 12.1091 2.00153 12.0002C2.00153 11.8914 2.03702 11.7856 2.10261 11.6988C2.16821 11.612 2.26033 11.549 2.365 11.5192L8.5 9.93625C8.84595 9.84706 9.16169 9.66682 9.4144 9.41429C9.66711 9.16175 9.84757 8.84614 9.937 8.50025L11.519 2.36525C11.5484 2.26017 11.6114 2.16759 11.6983 2.10164C11.7853 2.0357 11.8914 2 12.0005 2C12.1096 2 12.2157 2.0357 12.3027 2.10164C12.3896 2.16759 12.4526 2.26017 12.482 2.36525L14.063 8.50025C14.1523 8.84632 14.3327 9.16215 14.5854 9.41487C14.8381 9.66759 15.1539 9.84797 15.5 9.93725L21.635 11.5182C21.7405 11.5473 21.8335 11.6103 21.8998 11.6973C21.9661 11.7844 22.0021 11.8908 22.0021 12.0002C22.0021 12.1097 21.9661 12.2161 21.8998 12.3032C21.8335 12.3902 21.7405 12.4531 21.635 12.4822L15.5 14.0632C15.1539 14.1525 14.8381 14.3329 14.5854 14.5856C14.3327 14.8384 14.1523 15.1542 14.063 15.5002L12.481 21.6353C12.4516 21.7403 12.3886 21.8329 12.3017 21.8989C12.2147 21.9648 12.1086 22.0005 11.9995 22.0005C11.8904 22.0005 11.7843 21.9648 11.6973 21.8989C11.6104 21.8329 11.5474 21.7403 11.518 21.6353L9.937 15.5002Z",stroke:`url(#${n}-stroke1)`,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),og.jsx("path",{d:"M18.9838 5.37522C18.9615 5.28871 18.9164 5.20975 18.8532 5.14657C18.79 5.08339 18.7111 5.0383 18.6246 5.01598L17.0909 4.62049C17.0647 4.61306 17.0417 4.5973 17.0253 4.5756C17.0089 4.5539 17 4.52744 17 4.50024C17 4.47304 17.0089 4.44659 17.0253 4.42488C17.0417 4.40318 17.0647 4.38742 17.0909 4.38L18.6246 3.98426C18.7111 3.96196 18.79 3.9169 18.8532 3.85377C18.9163 3.79064 18.9615 3.71174 18.9838 3.62527L19.3793 2.09155C19.3867 2.06528 19.4024 2.04214 19.4241 2.02565C19.4459 2.00917 19.4724 2.00024 19.4997 2.00024C19.527 2.00024 19.5535 2.00917 19.5752 2.02565C19.597 2.04214 19.6127 2.06528 19.6201 2.09155L20.0153 3.62527C20.0376 3.71178 20.0827 3.79074 20.1459 3.85391C20.2091 3.91709 20.288 3.96219 20.3745 3.98451L21.9082 4.37975C21.9346 4.38702 21.9579 4.40275 21.9744 4.42452C21.991 4.44628 22 4.47288 22 4.50024C22 4.5276 21.991 4.55421 21.9744 4.57597C21.9579 4.59774 21.9346 4.61347 21.9082 4.62074L20.3745 5.01598C20.288 5.0383 20.2091 5.08339 20.1459 5.14657C20.0827 5.20975 20.0376 5.28871 20.0153 5.37522L19.6198 6.90893C19.6124 6.9352 19.5967 6.95835 19.575 6.97483C19.5532 6.99132 19.5267 7.00024 19.4994 7.00024C19.4721 7.00024 19.4456 6.99132 19.4239 6.97483C19.4022 6.95835 19.3864 6.9352 19.3791 6.90893L18.9838 5.37522Z",stroke:`url(#${n}-stroke2)`,strokeLinecap:"round",strokeLinejoin:"round"}),og.jsx("path",{d:"M3.98382 20.3752C3.9615 20.2887 3.9164 20.2098 3.85322 20.1466C3.79005 20.0834 3.71109 20.0383 3.62458 20.016L2.09087 19.6205C2.0647 19.6131 2.04167 19.5973 2.02527 19.5756C2.00887 19.5539 2 19.5274 2 19.5002C2 19.473 2.00887 19.4466 2.02527 19.4249C2.04167 19.4032 2.0647 19.3874 2.09087 19.38L3.62458 18.9843C3.71106 18.962 3.78999 18.9169 3.85317 18.8538C3.91635 18.7906 3.96146 18.7117 3.98382 18.6253L4.37931 17.0916C4.38666 17.0653 4.4024 17.0421 4.42414 17.0257C4.44587 17.0092 4.4724 17.0002 4.49968 17.0002C4.52696 17.0002 4.55349 17.0092 4.57522 17.0257C4.59695 17.0421 4.6127 17.0653 4.62005 17.0916L5.01529 18.6253C5.03761 18.7118 5.0827 18.7907 5.14588 18.8539C5.20906 18.9171 5.28801 18.9622 5.37453 18.9845L6.90824 19.3797C6.93461 19.387 6.95787 19.4027 6.97445 19.4245C6.99102 19.4463 7 19.4729 7 19.5002C7 19.5276 6.99102 19.5542 6.97445 19.576C6.95787 19.5977 6.93461 19.6135 6.90824 19.6207L5.37453 20.016C5.28801 20.0383 5.20906 20.0834 5.14588 20.1466C5.0827 20.2098 5.03761 20.2887 5.01529 20.3752L4.6198 21.9089C4.61245 21.9352 4.5967 21.9583 4.57497 21.9748C4.55324 21.9913 4.52671 22.0002 4.49943 22.0002C4.47215 22.0002 4.44562 21.9913 4.42389 21.9748C4.40215 21.9583 4.38641 21.9352 4.37906 21.9089L3.98382 20.3752Z",stroke:`url(#${n}-stroke3)`,strokeLinecap:"round",strokeLinejoin:"round"}),og.jsxs("defs",{children:[og.jsxs("linearGradient",{id:`${n}-stroke1`,x1:"0.149625",y1:"0.148102",x2:"23.8539",y2:"23.8524",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),og.jsxs("linearGradient",{id:`${n}-stroke2`,x1:"16.537",y1:"1.53728",x2:"22.463",y2:"7.46321",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),og.jsxs("linearGradient",{id:`${n}-stroke3`,x1:"1.53704",y1:"16.5373",x2:"7.46296",y2:"22.4632",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]})]})]})})),Q9=X.forwardRef(((e,t)=>og.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"32px",viewBox:"0 96 960 960",width:"32px",ref:t,...e,children:[og.jsx("title",{children:"User Avatar"}),og.jsx("path",{d:"M222 801q63-40 124.5-60.5T480 720q72 0 134 20.5T739 801q44-54 62.5-109T820 576q0-145-97.5-242.5T480 236q-145 0-242.5 97.5T140 576q0 61 19 116t63 109Zm257.814-195Q422 606 382.5 566.314q-39.5-39.686-39.5-97.5t39.686-97.314q39.686-39.5 97.5-39.5t97.314 39.686q39.5 39.686 39.5 97.5T577.314 566.5q-39.686 39.5-97.5 39.5Zm-.219 370q-83.146 0-156.275-31.5t-127.225-86Q142 804 111 731.159 80 658.319 80 575.5q0-82.819 31.5-155.659Q143 347 197.5 293t127.341-85.5Q397.681 176 480.5 176q82.819 0 155.659 31.5Q709 239 763 293t85.5 127Q880 493 880 575.734q0 82.734-31.5 155.5T763 858.5q-54 54.5-127.129 86T479.595 976Z",fill:"currentColor"})]}))),J9=X.forwardRef((({isExternal:e,...t},n)=>og.jsx("a",{target:e?"_blank":void 0,rel:e?"noopener":void 0,...t,ref:n})));J9.displayName="Link";const e7=X.forwardRef((({href:e,appendToUrl:t,...n},r)=>{const{baseSettings:a}=oR(),o=Object.assign({},a.urlQueryParamsToAppend,t),i=e?function(e,t){if(!t)return e;try{const n=new URL(e);for(const e of Object.keys(t))t[e]&&n.searchParams.append(e,t[e]);return n.href}catch{return e}}(e,o):e;return og.jsx(J9,{ref:r,href:i,...n})}));function t7(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,o=!1;for(;!o;){-1===r&&(r=n.length,o=!0);const e=n.slice(a,r).trim();!e&&o||t.push(e),a=r+1,r=n.indexOf(",",a)}return t}function n7(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}e7.displayName="LinkWithQueryParams";const r7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,a7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o7={};function i7(e,t){return(o7.jsx?a7:r7).test(e)}const s7=/[ \t\n\f\r]/g;function l7(e){return""===e.replace(s7,"")}class c7{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function u7(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new c7(n,r,t)}function d7(e){return e.toLowerCase()}c7.prototype.normal={},c7.prototype.property={},c7.prototype.space=void 0;class p7{constructor(e,t){this.attribute=t,this.property=e}}p7.prototype.attribute="",p7.prototype.booleanish=!1,p7.prototype.boolean=!1,p7.prototype.commaOrSpaceSeparated=!1,p7.prototype.commaSeparated=!1,p7.prototype.defined=!1,p7.prototype.mustUseProperty=!1,p7.prototype.number=!1,p7.prototype.overloadedBoolean=!1,p7.prototype.property="",p7.prototype.spaceSeparated=!1,p7.prototype.space=void 0;let f7=0;const h7=x7(),m7=x7(),g7=x7(),y7=x7(),b7=x7(),v7=x7(),k7=x7();function x7(){return 2**++f7}const w7=Object.freeze(Object.defineProperty({__proto__:null,boolean:h7,booleanish:m7,commaOrSpaceSeparated:k7,commaSeparated:v7,number:y7,overloadedBoolean:g7,spaceSeparated:b7},Symbol.toStringTag,{value:"Module"})),E7=Object.keys(w7);class _7 extends p7{constructor(e,t,n,r){let a=-1;if(super(e,t),S7(this,"space",r),"number"==typeof n)for(;++a<E7.length;){const e=E7[a];S7(this,E7[a],(n&w7[e])===w7[e])}}}function S7(e,t,n){n&&(e[t]=n)}function T7(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new _7(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[d7(r)]=r,n[d7(o.attribute)]=r}return new c7(t,n,e.space)}_7.prototype.defined=!0;const C7=T7({properties:{ariaActiveDescendant:null,ariaAtomic:m7,ariaAutoComplete:null,ariaBusy:m7,ariaChecked:m7,ariaColCount:y7,ariaColIndex:y7,ariaColSpan:y7,ariaControls:b7,ariaCurrent:null,ariaDescribedBy:b7,ariaDetails:null,ariaDisabled:m7,ariaDropEffect:b7,ariaErrorMessage:null,ariaExpanded:m7,ariaFlowTo:b7,ariaGrabbed:m7,ariaHasPopup:null,ariaHidden:m7,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:b7,ariaLevel:y7,ariaLive:null,ariaModal:m7,ariaMultiLine:m7,ariaMultiSelectable:m7,ariaOrientation:null,ariaOwns:b7,ariaPlaceholder:null,ariaPosInSet:y7,ariaPressed:m7,ariaReadOnly:m7,ariaRelevant:null,ariaRequired:m7,ariaRoleDescription:b7,ariaRowCount:y7,ariaRowIndex:y7,ariaRowSpan:y7,ariaSelected:m7,ariaSetSize:y7,ariaSort:null,ariaValueMax:y7,ariaValueMin:y7,ariaValueNow:y7,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function A7(e,t){return t in e?e[t]:t}function N7(e,t){return A7(e,t.toLowerCase())}const I7=T7({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:v7,acceptCharset:b7,accessKey:b7,action:null,allow:null,allowFullScreen:h7,allowPaymentRequest:h7,allowUserMedia:h7,alt:null,as:null,async:h7,autoCapitalize:null,autoComplete:b7,autoFocus:h7,autoPlay:h7,blocking:b7,capture:null,charSet:null,checked:h7,cite:null,className:b7,cols:y7,colSpan:null,content:null,contentEditable:m7,controls:h7,controlsList:b7,coords:y7|v7,crossOrigin:null,data:null,dateTime:null,decoding:null,default:h7,defer:h7,dir:null,dirName:null,disabled:h7,download:g7,draggable:m7,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:h7,formTarget:null,headers:b7,height:y7,hidden:g7,high:y7,href:null,hrefLang:null,htmlFor:b7,httpEquiv:b7,id:null,imageSizes:null,imageSrcSet:null,inert:h7,inputMode:null,integrity:null,is:null,isMap:h7,itemId:null,itemProp:b7,itemRef:b7,itemScope:h7,itemType:b7,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:h7,low:y7,manifest:null,max:null,maxLength:y7,media:null,method:null,min:null,minLength:y7,multiple:h7,muted:h7,name:null,nonce:null,noModule:h7,noValidate:h7,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:h7,optimum:y7,pattern:null,ping:b7,placeholder:null,playsInline:h7,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:h7,referrerPolicy:null,rel:b7,required:h7,reversed:h7,rows:y7,rowSpan:y7,sandbox:b7,scope:null,scoped:h7,seamless:h7,selected:h7,shadowRootClonable:h7,shadowRootDelegatesFocus:h7,shadowRootMode:null,shape:null,size:y7,sizes:null,slot:null,span:y7,spellCheck:m7,src:null,srcDoc:null,srcLang:null,srcSet:null,start:y7,step:null,style:null,tabIndex:y7,target:null,title:null,translate:null,type:null,typeMustMatch:h7,useMap:null,value:m7,width:y7,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:b7,axis:null,background:null,bgColor:null,border:y7,borderColor:null,bottomMargin:y7,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:h7,declare:h7,event:null,face:null,frame:null,frameBorder:null,hSpace:y7,leftMargin:y7,link:null,longDesc:null,lowSrc:null,marginHeight:y7,marginWidth:y7,noResize:h7,noHref:h7,noShade:h7,noWrap:h7,object:null,profile:null,prompt:null,rev:null,rightMargin:y7,rules:null,scheme:null,scrolling:m7,standby:null,summary:null,text:null,topMargin:y7,valueType:null,version:null,vAlign:null,vLink:null,vSpace:y7,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:h7,disableRemotePlayback:h7,prefix:null,property:null,results:y7,security:null,unselectable:null},space:"html",transform:N7}),O7=T7({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:k7,accentHeight:y7,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:y7,amplitude:y7,arabicForm:null,ascent:y7,attributeName:null,attributeType:null,azimuth:y7,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:y7,by:null,calcMode:null,capHeight:y7,className:b7,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:y7,diffuseConstant:y7,direction:null,display:null,dur:null,divisor:y7,dominantBaseline:null,download:h7,dx:null,dy:null,edgeMode:null,editable:null,elevation:y7,enableBackground:null,end:null,event:null,exponent:y7,externalResourcesRequired:null,fill:null,fillOpacity:y7,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:v7,g2:v7,glyphName:v7,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:y7,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:y7,horizOriginX:y7,horizOriginY:y7,id:null,ideographic:y7,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:y7,k:y7,k1:y7,k2:y7,k3:y7,k4:y7,kernelMatrix:k7,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:y7,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:y7,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:y7,overlineThickness:y7,paintOrder:null,panose1:null,path:null,pathLength:y7,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:b7,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:y7,pointsAtY:y7,pointsAtZ:y7,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:k7,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:k7,rev:k7,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:k7,requiredFeatures:k7,requiredFonts:k7,requiredFormats:k7,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:y7,specularExponent:y7,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:y7,strikethroughThickness:y7,string:null,stroke:null,strokeDashArray:k7,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:y7,strokeOpacity:y7,strokeWidth:null,style:null,surfaceScale:y7,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:k7,tabIndex:y7,tableValues:null,target:null,targetX:y7,targetY:y7,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:k7,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:y7,underlineThickness:y7,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:y7,values:null,vAlphabetic:y7,vMathematical:y7,vectorEffect:null,vHanging:y7,vIdeographic:y7,version:null,vertAdvY:y7,vertOriginX:y7,vertOriginY:y7,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:y7,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:A7}),R7=T7({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),P7=T7({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:N7}),L7=T7({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),D7={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"},M7=/[A-Z]/g,F7=/-[a-z]/g,j7=/^data[-\w.:]+$/i;function z7(e,t){const n=d7(t);let r=t,a=p7;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&j7.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(F7,H7);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!F7.test(e)){let n=e.replace(M7,B7);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=_7}return new a(r,t)}function B7(e){return"-"+e.toLowerCase()}function H7(e){return e.charAt(1).toUpperCase()}const U7=u7([C7,I7,R7,P7,L7],"html"),$7=u7([C7,O7,R7,P7,L7],"svg");function V7(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function G7(e){return e.join(" ").trim()}var q7={},W7=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Y7=/\n/g,Z7=/^\s*/,K7=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,X7=/^:\s*/,Q7=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,J7=/^[;\s]*/,eee=/^\s+|\s+$/g,tee="";function nee(e){return e?e.replace(eee,tee):tee}var ree=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(e){var t=e.match(Y7);t&&(n+=t.length);var a=e.lastIndexOf("\n");r=~a?e.length-a:r+e.length}function o(){var e={line:n,column:r};return function(t){return t.position=new i(e),c(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(a){var o=new Error(t.source+":"+n+":"+r+": "+a);if(o.reason=a,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var r=n[0];return a(r),e=e.slice(r.length),n}}function c(){l(Z7)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=o();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;tee!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,tee===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return r+=2,a(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function p(){var e=o(),t=l(K7);if(t){if(d(),!l(X7))return s("property missing ':'");var n=l(Q7),r=e({type:"declaration",property:nee(t[0].replace(W7,tee)),value:n?nee(n[0].replace(W7,tee)):tee});return l(J7),r}}return i.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},aee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(q7,"__esModule",{value:!0}),q7.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,oee.default)(e),a="function"==typeof t;return r.forEach((e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;a?t(r,o,e):o&&(n=n||{},n[r]=o)})),n};const oee=aee(ree);var iee={};Object.defineProperty(iee,"__esModule",{value:!0}),iee.camelCase=void 0;var see=/^--[a-zA-Z0-9_-]+$/,lee=/-([a-z])/g,cee=/^[^-]+$/,uee=/^-(webkit|moz|ms|o|khtml)-/,dee=/^-(ms)-/,pee=function(e,t){return t.toUpperCase()},fee=function(e,t){return"".concat(t,"-")};iee.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||cee.test(e)||see.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(dee,fee):e.replace(uee,fee)).replace(lee,pee))};var hee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mee=hee(q7),gee=iee;function yee(e,t){var n={};return e&&"string"==typeof e?((0,mee.default)(e,(function(e,r){e&&r&&(n[(0,gee.camelCase)(e,t)]=r)})),n):n}yee.default=yee;const bee=l(yee),vee=xee("end"),kee=xee("start");function xee(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function wee(e){return e&&"object"==typeof e?"position"in e||"type"in e?_ee(e.position):"start"in e||"end"in e?_ee(e):"line"in e||"column"in e?Eee(e):"":""}function Eee(e){return See(e&&e.line)+":"+See(e&&e.column)}function _ee(e){return Eee(e&&e.start)+"-"+Eee(e&&e.end)}function See(e){return e&&"number"==typeof e?e:1}class Tee extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",a={},o=!1;if(t&&(a="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!a.cause&&e&&(o=!0,r=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?a.ruleId=n:(a.source=n.slice(0,e),a.ruleId=n.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const i=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=wee(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Tee.prototype.file="",Tee.prototype.name="",Tee.prototype.reason="",Tee.prototype.message="",Tee.prototype.stack="",Tee.prototype.column=void 0,Tee.prototype.line=void 0,Tee.prototype.ancestors=void 0,Tee.prototype.cause=void 0,Tee.prototype.fatal=void 0,Tee.prototype.place=void 0,Tee.prototype.ruleId=void 0,Tee.prototype.source=void 0;const Cee={}.hasOwnProperty,Aee=new Map,Nee=/[A-Z]/g,Iee=new Set(["table","tbody","thead","tfoot","tr"]),Oee=new Set(["td","th"]),Ree="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pee(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,a,o){const i=Array.isArray(a.children),s=kee(n);return t(r,a,o,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,a,o){const i=Array.isArray(a.children)?n:t;return o?i(r,a,o):i(r,a)}}(0,t.jsx,t.jsxs)}const a={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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?$7:U7,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=Lee(a,e,void 0);return o&&"string"!=typeof o?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Lee(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(a=$7,e.schema=a);e.ancestors.push(t);const o=zee(e,t.tagName,!1),i=function(e,t){const n={};let r,a;for(a in t.properties)if("children"!==a&&Cee.call(t.properties,a)){const o=jee(e,a,t.properties[a]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&"align"===a&&"string"==typeof i&&Oee.has(t.tagName)?r=i:n[a]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=Fee(e,t);Iee.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&l7(t.value):l7(t));var t})));return Dee(e,i,o,t),Mee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Bee(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.name&&"html"===r.space&&(a=$7,e.schema=a);e.ancestors.push(t);const o=null===t.name?e.Fragment:zee(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const a=t.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Bee(e,t.position);else{const a=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,o=e.evaluater.evaluateExpression(t.expression)}else Bee(e,t.position);else o=null===r.value||r.value;n[a]=o}return n}(e,t),s=Fee(e,t);return Dee(e,i,o,t),Mee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Bee(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Mee(r,Fee(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Dee(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Mee(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Fee(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Aee;for(;++r<t.children.length;){const o=t.children[r];let i;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}const s=Lee(e,o,i);void 0!==s&&n.push(s)}return n}function jee(e,t,n){const r=z7(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?n7(n):G7(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return bee(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Tee("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Ree+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Cee.call(e,n)&&(t[Hee(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?D7[r.property]||r.property:r.attribute,n]}}function zee(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,a=-1;for(;++a<e.length;){const t=i7(e[a])?{type:"Identifier",name:e[a]}:{type:"Literal",value:e[a]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(a&&"Literal"===t.type),optional:!1}:t}r=n}else r=i7(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Cee.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Bee(e)}function Bee(e,t){const n=new Tee("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=Ree+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Hee(e){let t=e.replace(Nee,Uee);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Uee(e){return"-"+e.toLowerCase()}const $ee={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"]},Vee={};function Gee(e,t){return qee(e,"boolean"!=typeof Vee.includeImageAlt||Vee.includeImageAlt,"boolean"!=typeof Vee.includeHtml||Vee.includeHtml)}function qee(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Wee(e.children,t,n)}return Array.isArray(e)?Wee(e,t,n):""}function Wee(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=qee(e[a],t,n);return r.join("")}const Yee=document.createElement("i");function Zee(e){const t="&"+e+";";Yee.innerHTML=t;const n=Yee.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Kee(e,t,n,r){const a=e.length;let o,i=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function Xee(e,t){return e.length>0?(Kee(e,e.length,0,t),e):t}const Qee={}.hasOwnProperty;function Jee(e){const t={};let n=-1;for(;++n<e.length;)ete(t,e[n]);return t}function ete(e,t){let n;for(n in t){const r=(Qee.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Qee.call(r,o)||(r[o]=[]);const e=a[o];tte(r[o],Array.isArray(e)?e:e?[e]:[])}}}function tte(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Kee(e,0,0,r)}function nte(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function rte(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ate=gte(/[A-Za-z]/),ote=gte(/[\dA-Za-z]/),ite=gte(/[#-'*+\--9=?A-Z^-~]/);function ste(e){return null!==e&&(e<32||127===e)}const lte=gte(/\d/),cte=gte(/[\dA-Fa-f]/),ute=gte(/[!-/:-@[-`{-~]/);function dte(e){return null!==e&&e<-2}function pte(e){return null!==e&&(e<0||32===e)}function fte(e){return-2===e||-1===e||32===e}const hte=gte(new RegExp("\\p{P}|\\p{S}","u")),mte=gte(/\s/);function gte(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function yte(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&ote(e.charCodeAt(n+1))&&ote(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),a=1):i="�"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function bte(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(fte(r))return e.enter(n),i(r);return t(r)};function i(r){return fte(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}const vte={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),bte(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,a(t)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):dte(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}};const kte={tokenize:function(e){const t=this,n=[];let r,a,o,i=0;return s;function s(r){if(i<n.length){const a=n[i];return t.containerState=a[1],e.attempt(a[0].continuation,l,c)(r)}return c(r)}function l(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let a,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){a=t.events[o][1].end;break}y(i);let s=n;for(;s<t.events.length;)t.events[s][1].end={...a},s++;return Kee(t.events,o+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(a){if(i===n.length){if(!r)return p(a);if(r.currentConstruct&&r.currentConstruct.concrete)return h(a);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xte,u,d)(a)}function u(e){return r&&b(),y(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(xte,f,h)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:a}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):dte(n)?(e.consume(n),g(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let a,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(a){s=t.events[l][1].end;break}a=!0}for(y(i),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Kee(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let a=n.length;for(;a-- >r;){const r=n[a];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),a=void 0,r=void 0,t.containerState._closeFlow=void 0}}},xte={tokenize:function(e,t,n){return bte(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function wte(e){return null===e||pte(e)||mte(e)?1:hte(e)?2:void 0}function Ete(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const _te={name:"attention",resolveAll:function(e,t){let n,r,a,o,i,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};Ste(d,-s),Ste(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...o.start},end:{...i.end}},e[n][1].end={...o.start},e[u][1].start={...i.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Xee(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Xee(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Xee(l,Ete(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Xee(l,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Xee(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Kee(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=wte(r);let o;return function(t){return o=t,e.enter("attentionSequence"),i(t)};function i(s){if(s===o)return e.consume(s),i;const l=e.exit("attentionSequence"),c=wte(s),u=!c||2===c&&a||n.includes(s),d=!a||2===a&&c||n.includes(r);return l._open=Boolean(42===o?u:u&&(a||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function Ste(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Tte={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a};function a(t){return ate(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||ote(e)?(r=1,i(e)):l(e)}function i(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||ote(t))&&r++<32?(e.consume(t),i):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||ste(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):ite(t)?(e.consume(t),l):n(t)}function c(e){return ote(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||ote(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Cte={partial:!0,tokenize:function(e,t,n){return function(t){return fte(t)?bte(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||dte(e)?t(e):n(e)}}};const Ate={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(fte(t))return bte(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(r){return e.attempt(Ate,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return n(t)};function a(n){return fte(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Nte={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return ute(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Ite={name:"characterReference",tokenize:function(e,t,n){const r=this;let a,o,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=ote,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=cte,c):(e.enter("characterReferenceValue"),a=7,o=lte,c(t))}function c(s){if(59===s&&i){const a=e.exit("characterReferenceValue");return o!==ote||Zee(r.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&i++<a?(e.consume(s),c):n(s)}}};const Ote={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Rte={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),fte(t)?bte(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===o?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===o?(a++,e.consume(t),u):a>=s?(e.exit("codeFencedFenceSequence"),fte(t)?bte(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||dte(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,i=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),fte(t)?bte(e,c,"whitespace")(t):c(t))}function c(n){return null===n||dte(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Ote,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||dte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):fte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),bte(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||dte(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||dte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function f(t){return e.attempt(a,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&fte(t)?bte(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||dte(t)?e.check(Ote,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||dte(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const Pte={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),bte(e,a,"linePrefix",5)(t)};function a(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):dte(t)?e.attempt(Lte,o,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||dte(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},Lte={partial:!0,tokenize:function(e,t,n){const r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):dte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):bte(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):dte(e)?a(e):n(e)}}};const Dte={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,a=3;if(!("lineEnding"!==e[a][1].type&&"space"!==e[a][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}t=a-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(a=e.enter("codeTextSequence"),r=0,c(t)):dte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||dte(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",l(n))}}};class Mte{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Fte(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Fte(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Fte(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Fte(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Fte(this.left,t.reverse())}}}function Fte(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 jte(e){const t={};let n,r,a,o,i,s,l,c=-1;const u=new Mte(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,a=0,a<s.length&&"lineEndingBlank"===s[a][1].type&&(a+=2),a<s.length&&"content"===s[a][1].type))for(;++a<s.length&&"content"!==s[a][1].type;)"chunkText"===s[a][1].type&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,zte(u,c)),c=t[c],l=!0);else if(n[1]._container){for(a=c,r=void 0;a--;)if(o=u.get(a),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=a);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,c),i.unshift(n),u.splice(r,c-r+1,i))}}return Kee(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function zte(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++a)[1]!==f;);o.push(a),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const Bte={resolve:function(e){return jte(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?a(t):dte(t)?e.check(Hte,o,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Hte={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),bte(e,a,"linePrefix")};function a(a){if(null===a||dte(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}};function Ute(e,t,n,r,a,o,i,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(a),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||ste(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||dte(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(a){return u||null!==a&&41!==a&&!pte(a)?u<c&&40===a?(e.consume(a),u++,h):41===a?(e.consume(a),u--,h):null===a||32===a||40===a||ste(a)?n(a):(e.consume(a),92===a?m:h):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(a))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function $te(e,t,n,r,a,o){const i=this;let s,l=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(o),e.enter(a),e.consume(d),e.exit(a),e.exit(r),t):dte(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||dte(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!fte(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Vte(e,t,n,r,a,o){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===i?(e.exit(o),s(i)):null===t?n(t):dte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),bte(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||dte(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function Gte(e,t){let n;return function r(a){if(dte(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r;if(fte(a))return bte(e,r,n?"linePrefix":"lineSuffix")(a);return t(a)}}const qte={name:"definition",tokenize:function(e,t,n){const r=this;let a;return function(t){return e.enter("definition"),function(t){return $te.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return a=rte(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return pte(t)?Gte(e,s)(t):s(t)}function s(t){return Ute(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Wte,c,c)(t)}function c(t){return fte(t)?bte(e,u,"whitespace")(t):u(t)}function u(o){return null===o||dte(o)?(e.exit("definition"),r.parser.defined.push(a),t(o)):n(o)}}},Wte={partial:!0,tokenize:function(e,t,n){return function(t){return pte(t)?Gte(e,r)(t):n(t)};function r(t){return Vte(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return fte(t)?bte(e,o,"whitespace")(t):o(t)}function o(e){return null===e||dte(e)?t(e):n(e)}}};const Yte={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return dte(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Zte={name:"headingAtx",resolve:function(e,t){let n,r,a=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);a-2>o&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4);a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},r={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},Kee(e,o,a-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),a(t)}(t)};function a(t){return 35===t&&r++<6?(e.consume(t),a):null===t||pte(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||dte(n)?(e.exit("atxHeading"),t(n)):fte(n)?bte(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||pte(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};const Kte=["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"],Xte=["pre","script","style","textarea"],Qte={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let a,o,i,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,f):63===s?(e.consume(s),a=3,r.interrupt?t:L):ate(s)?(e.consume(s),i=String.fromCharCode(s),h):n(s)}function u(o){return 45===o?(e.consume(o),a=2,d):91===o?(e.consume(o),a=5,s=0,p):ate(o)?(e.consume(o),a=4,r.interrupt?t:L):n(o)}function d(a){return 45===a?(e.consume(a),r.interrupt?t:L):n(a)}function p(a){const o="CDATA[";return a===o.charCodeAt(s++)?(e.consume(a),6===s?r.interrupt?t:T:p):n(a)}function f(t){return ate(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||pte(s)){const l=47===s,c=i.toLowerCase();return l||o||!Xte.includes(c)?Kte.includes(i.toLowerCase())?(a=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?g(s):y(s)):(a=1,r.interrupt?t(s):T(s))}return 45===s||ote(s)?(e.consume(s),i+=String.fromCharCode(s),h):n(s)}function m(a){return 62===a?(e.consume(a),r.interrupt?t:T):n(a)}function g(t){return fte(t)?(e.consume(t),g):_(t)}function y(t){return 47===t?(e.consume(t),_):58===t||95===t||ate(t)?(e.consume(t),b):fte(t)?(e.consume(t),y):_(t)}function b(t){return 45===t||46===t||58===t||95===t||ote(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),k):fte(t)?(e.consume(t),v):y(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):fte(t)?(e.consume(t),k):w(t)}function x(t){return t===l?(e.consume(t),l=null,E):null===t||dte(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||pte(t)?v(t):(e.consume(t),w)}function E(e){return 47===e||62===e||fte(e)?y(e):n(e)}function _(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||dte(t)?T(t):fte(t)?(e.consume(t),S):n(t)}function T(t){return 45===t&&2===a?(e.consume(t),I):60===t&&1===a?(e.consume(t),O):62===t&&4===a?(e.consume(t),D):63===t&&3===a?(e.consume(t),L):93===t&&5===a?(e.consume(t),P):!dte(t)||6!==a&&7!==a?null===t||dte(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(Jte,M,C)(t))}function C(t){return e.check(ene,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||dte(t)?C(t):(e.enter("htmlFlowData"),T(t))}function I(t){return 45===t?(e.consume(t),L):T(t)}function O(t){return 47===t?(e.consume(t),i="",R):T(t)}function R(t){if(62===t){const n=i.toLowerCase();return Xte.includes(n)?(e.consume(t),D):T(t)}return ate(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),R):T(t)}function P(t){return 93===t?(e.consume(t),L):T(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===a?(e.consume(t),L):T(t)}function D(t){return null===t||dte(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},Jte={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Cte,t,n)}}},ene={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(dte(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a;return n(t)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const tne={name:"htmlText",tokenize:function(e,t,n){const r=this;let a,o,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),k):63===t?(e.consume(t),b):ate(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,f):ate(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):dte(t)?(i=u,R(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?O(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):dte(t)?(i=h,R(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?O(t):dte(t)?(i=y,R(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):dte(t)?(i=b,R(t)):(e.consume(t),b)}function v(e){return 62===e?O(e):b(e)}function k(t){return ate(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||ote(t)?(e.consume(t),x):w(t)}function w(t){return dte(t)?(i=w,R(t)):fte(t)?(e.consume(t),w):O(t)}function E(t){return 45===t||ote(t)?(e.consume(t),E):47===t||62===t||pte(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),O):58===t||95===t||ate(t)?(e.consume(t),S):dte(t)?(i=_,R(t)):fte(t)?(e.consume(t),_):O(t)}function S(t){return 45===t||46===t||58===t||95===t||ote(t)?(e.consume(t),S):T(t)}function T(t){return 61===t?(e.consume(t),C):dte(t)?(i=T,R(t)):fte(t)?(e.consume(t),T):_(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,A):dte(t)?(i=C,R(t)):fte(t)?(e.consume(t),C):(e.consume(t),N)}function A(t){return t===a?(e.consume(t),a=void 0,I):null===t?n(t):dte(t)?(i=A,R(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||pte(t)?_(t):(e.consume(t),N)}function I(e){return 47===e||62===e||pte(e)?_(e):n(e)}function O(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function R(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return fte(t)?bte(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),i(t)}}};const nne={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&Kee(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,a,o,i=e.length,s=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(a){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(a=i);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Xee(o,e.slice(r+1,r+s+3)),o=Xee(o,[["enter",u,t]]),o=Xee(o,Ete(t.parser.constructs.insideSpan.null,e.slice(r+s+4,a-3),t)),o=Xee(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=Xee(o,e.slice(a+1)),o=Xee(o,[["exit",l,t]]),Kee(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let a,o,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return function(t){if(!a)return n(t);if(a._inactive)return u(t);return o=r.parser.defined.includes(rte(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(rne,c,o?c:u)(t):91===t?e.attempt(ane,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(one,c,u)(t)}function c(e){return t(e)}function u(e){return a._balanced=!0,n(e)}}},rne={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return pte(t)?Gte(e,a)(t):a(t)}function a(t){return 41===t?c(t):Ute(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return pte(t)?Gte(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?Vte(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return pte(t)?Gte(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},ane={tokenize:function(e,t,n){const r=this;return function(t){return $te.call(r,e,a,o,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(rte(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},one={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const ine={name:"labelStartImage",resolveAll:nne.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const sne={name:"labelStartLink",resolveAll:nne.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const lne={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),bte(e,t,"linePrefix")}}};const cne={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),i(o)):a>=3&&(null===o||dte(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),fte(t)?bte(e,o,"whitespace")(t):o(t))}}};const une={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Cte,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,bte(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){if(r.containerState.furtherBlankLines||!fte(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(pne,t,a)(n)}));function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,bte(e,e.attempt(une,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){const a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:lte(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(cne,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return lte(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Cte,r.interrupt?n:c,e.attempt(dne,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return fte(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},dne={partial:!0,tokenize:function(e,t,n){const r=this;return bte(e,(function(e){const a=r.events[r.events.length-1];return!fte(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},pne={partial:!0,tokenize:function(e,t,n){const r=this;return bte(e,(function(e){const a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const fne={name:"setextUnderline",resolveTo:function(e,t){let n,r,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),a||"definition"!==e[o][1].type||(a=o);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let a;return function(t){let i,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){i="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),a=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===a?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),fte(t)?bte(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||dte(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const hne={tokenize:function(e){const t=this,n=e.attempt(Cte,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,bte(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Bte,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const mne={resolveAll:vne()},gne=bne("string"),yne=bne("text");function bne(e){return{resolveAll:vne("text"===e?kne:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],a=t.attempt(r,o,i);return o;function o(e){return l(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let a=-1;if(t)for(;++a<t.length;){const e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function vne(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):t[a]&&"data"===t[a][1].type||(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function kne(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],a=t.sliceStream(r);let o,i=a.length,s=-1,l=0;for(;i--;){const e=a[i];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const a={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}const xne={42:une,43:une,45:une,48:une,49:une,50:une,51:une,52:une,53:une,54:une,55:une,56:une,57:une,62:Ate},wne={91:qte},Ene={[-2]:Pte,[-1]:Pte,32:Pte},_ne={35:Zte,42:cne,45:[fne,cne],60:Qte,61:fne,95:cne,96:Rte,126:Rte},Sne={38:Ite,92:Nte},Tne={[-5]:lne,[-4]:lne,[-3]:lne,33:ine,38:Ite,42:_te,60:[Tte,tne],91:sne,92:[Yte,Nte],93:nne,95:_te,96:Dte},Cne={null:[_te,mne]},Ane=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:wne,disable:{null:[]},document:xne,flow:_ne,flowInitial:Ene,insideSpan:Cne,string:Sne,text:Tne},Symbol.toStringTag,{value:"Module"}));function Nne(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 a={},o=[];let i=[],s=[];const l={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){dte(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,b()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let i;if("string"==typeof o)i=o;else switch(o){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&a)continue;i=" ";break;default:i=String.fromCharCode(o)}a=-2===o,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=Xee(i,e),f(),null!==i[i.length-1])return[];return y(t,0),c.events=Ete(o,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let i;if(n===a)i=[e[n].slice(r,o)];else{if(i=e.slice(n,a),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}o>0&&i.push(e[a].slice(0,o))}return i}(i,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:a,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:a,offset:o}}function f(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,a,o){let i,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return i=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,a=c.events.length,o=Array.from(s);return{from:a,restore:i};function i(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=a,s=o,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,f),a}function y(e){return f.restore(),++u<i.length?m(i[u]):o}}}function y(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&Kee(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}const Ine=/[\0\t\n\r]/g;const One=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Rne(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return nte(n.slice(t?2:1),t?16:10)}return Zee(n)||e}const Pne={}.hasOwnProperty;function Lne(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:o(X),blockQuote:o(q),characterEscape:S,characterReference:S,codeFenced:o(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(W,i),codeText:o(Y,i),codeTextData:S,data:S,codeFlowValue:S,definition:o(Z),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(K),hardBreakEscape:o(Q),hardBreakTrailing:o(Q),htmlFlow:o(J,i),htmlFlowData:S,htmlText:o(J,i),htmlTextData:S,image:o(ee),label:i,link:o(te),listItem:o(re),listItemValue:p,listOrdered:o(ne,d),listUnordered:o(ne),paragraph:o(ae),reference:z,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(X),strong:o(oe),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:G,autolinkProtocol:V,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:U,characterReference:$,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(O),codeTextData:T,data:T,definition:l(),definitionDestinationString:k,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:T,htmlText:l(I),htmlTextData:T,image:l(P),label:D,labelText:L,lineEnding:C,link:l(R),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:M,resourceTitleString:F,resource:j,setextHeading:l(_),setextHeadingLineSequence:E,setextHeadingText:w,strong:l(),thematicBreak:l()}};Mne(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:i,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=a(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Pne.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||jne).call(o,void 0,e[0])}for(r.position={start:Dne(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Dne(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function a(e,t,n){let r,a,o,i,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||l||o||(o=s),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=s;for(a=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!a||o<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=a,e.splice(s,0,["enter",a,t[2]]),s++,n++,o=void 0,i=!0}}}return e[t][1]._spread=c,n}function o(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Dne(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+wee({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||jne).call(this,e,r[0])}n.position.end=Dne(e.end)}function u(){return Gee(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rte(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:Dne(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Dne(e.end)}function C(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Dne(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),T.call(this,e))}function A(){this.data.atHardBreak=!0}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function L(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(One,Rne)}(t),n.identifier=rte(t).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function F(){const e=this.resume();this.stack[this.stack.length-1].title=e}function j(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rte(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function H(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=nte(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Zee(t)}this.stack[this.stack.length-1].value+=r}function $(e){this.stack.pop().position.end=Dne(e.end)}function V(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function G(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function X(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!jte(e););return e}(function(e){const t={constructs:Jee([Ane,...(e||{}).extensions||[]]),content:n(vte),defined:[],document:n(kte),flow:n(hne),lazy:{},string:n(gne),text:n(yne)};return t;function n(e){return function(n){return Nne(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(a,o,i){const s=[];let l,c,u,d,p;for(a=n+("string"==typeof a?a.toString():new TextDecoder(o||void 0).decode(a)),u=0,n="",r&&(65279===a.charCodeAt(0)&&u++,r=void 0);u<a.length;){if(Ine.lastIndex=u,l=Ine.exec(a),d=l&&void 0!==l.index?l.index:a.length,p=a.charCodeAt(d),!l){n=a.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(a.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Dne(e){return{line:e.line,column:e.column,offset:e.offset}}function Mne(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Mne(e,r):Fne(e,r)}}function Fne(e,t){let n;for(n in t)if(Pne.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 jne(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+wee({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wee({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+wee({start:t.start,end:t.end})+") is still open")}function zne(e){const t=this;t.parser=function(n){return Lne(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Bne(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),o=a[0];o&&"text"===o.type?o.value="["+o.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&"text"===i.type?i.value+=r:a.push({type:"text",value:r}),a}function Hne(e){const t=e.spread;return null==t?e.children.length>1:t}function Une(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push($ne(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push($ne(t.slice(a),a>0,!1)),o.join("")}function $ne(e,t,n){let r=0,a=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}const Vne={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);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},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=yte(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Bne(e,t);const a={src:yte(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:yte(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Bne(e,t);const a={href:yte(r.url||"")};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:yte(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),a=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Hne(n[r])}return t}(n):Hne(t),o={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(a||0!==s||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?i.push(e):i.push(...e.children)}const l=r[r.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&i.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){const e=r[a];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=kee(t.children[1]),i=vee(t.children[t.children.length-1]);o&&i&&(r.position={start:o,end:i}),a.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,a=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<i;){const n=t.children[s],r={},i=o?o[s]:void 0;i&&(r.align=i);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Une(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Gne,yaml:Gne,definition:Gne,footnoteDefinition:Gne};function Gne(){}const qne="object"==typeof self?self:globalThis,Wne=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=a=>{if(e.has(a))return e.get(a);const[o,i]=t[a];switch(o){case 0:case-1:return n(i,a);case 1:{const e=n([],a);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},a);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),a);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),a)}case 5:{const e=n(new Map,a);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,a);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new qne[e](t),a)}case 8:return n(BigInt(i),a);case"BigInt":return n(Object(BigInt(i)),a);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new qne[o](i),a)};return r})(new Map,e)(0),Yne="",{toString:Zne}={},{keys:Kne}=Object,Xne=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Zne.call(e).slice(8,-1);switch(n){case"Array":return[1,Yne];case"Object":return[2,Yne];case"Date":return[3,Yne];case"RegExp":return[4,Yne];case"Map":return[5,Yne];case"Set":return[6,Yne];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Qne=([e,t])=>0===e&&("function"===t||"symbol"===t),Jne=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const a=(e,t)=>{const a=r.push(e)-1;return n.set(t,a),a},o=r=>{if(n.has(r))return n.get(r);let[i,s]=Xne(r);switch(i){case 0:{let t=r;switch(s){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return a([-1],r)}return a([i,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),a([s,[...e]],r)}const e=[],t=a([i,e],r);for(const n of r)e.push(o(n));return t}case 2:{if(s)switch(s){case"BigInt":return a([s,r.toString()],r);case"Boolean":case"Number":case"String":return a([s,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],l=a([i,n],r);for(const t of Kne(r))!e&&Qne(Xne(r[t]))||n.push([o(t),o(r[t])]);return l}case 3:return a([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return a([i,{source:e,flags:t}],r)}case 5:{const t=[],n=a([i,t],r);for(const[a,i]of r)(e||!Qne(Xne(a))&&!Qne(Xne(i)))&&t.push([o(a),o(i)]);return n}case 6:{const t=[],n=a([i,t],r);for(const a of r)!e&&Qne(Xne(a))||t.push(o(a));return n}}const{message:l}=r;return a([i,{name:s,message:l}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},ere="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Wne(Jne(e,t)):structuredClone(e):(e,t)=>Wne(Jne(e,t));function tre(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 nre(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const rre=function(e){if(null==e)return ore;if("function"==typeof e)return are(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rre(e[n]);return are(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return are(n);function n(n){const r=n;let a;for(a in e)if(r[a]!==t[a])return!1;return!0}}(e);if("string"==typeof e)return function(e){return are(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function are(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function ore(){return!0}const ire=[],sre=!0,lre=!1;function cre(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;const o=rre(a),i=r?-1:1;!function e(a,s,l){const c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=ire;if((!t||o(a,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[sre,e];return null==e?ire:[e]}(n(a,l)),p[0]===lre))return p;if("children"in a&&a.children){const t=a;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+i,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===lre)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function ure(e,t,n,r){let a,o,i;"function"==typeof t&&"function"!=typeof n?(o=void 0,i=t,a=n):(o=t,i=n,a=r),cre(e,o,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)}),a)}const dre={}.hasOwnProperty,pre={};function fre(e,t){e.position&&(t.position=function(e){const t=kee(e),n=vee(e);if(t&&n)return{start:t,end:n}}(e))}function hre(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,a=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&a&&Object.assign(n.properties,ere(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function mre(e,t){const n=t.data||{},r=!("value"in t)||dre.call(n,"hProperties")||dre.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function gre(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function yre(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function bre(e,t){const n=function(e,t){const n=t||pre,r=new Map,a=new Map,o=new Map,i={...Vne,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const a=s.one(n[r],e);if(a){if(r&&"break"===n[r-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=yre(a.value)),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=yre(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:hre,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(dre.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=ere(n);return r.children=s.all(e),r}return ere(e)}return(s.options.unknownHandler||mre)(s,e,t)},options:n,patch:fre,wrap:gre};return ure(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),a=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||tre,r=e.options.footnoteBackLabel||nre,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;const o=e.all(a),i=String(a.identifier).toUpperCase(),c=yte(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=o[o.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else o.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(a,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ere(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:"\n"},a),o}function vre(e,t){return e&&"run"in e?async function(n,r){const a=bre(n,{file:r,...t});await e.run(a,r)}:function(n,r){return bre(n,{file:r,...e||t})}}function kre(e){if(e)throw e}var xre=Object.prototype.hasOwnProperty,wre=Object.prototype.toString,Ere=Object.defineProperty,_re=Object.getOwnPropertyDescriptor,Sre=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===wre.call(e)},Tre=function(e){if(!e||"[object Object]"!==wre.call(e))return!1;var t,n=xre.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&xre.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||xre.call(e,t)},Cre=function(e,t){Ere&&"__proto__"===t.name?Ere(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Are=function(e,t){if("__proto__"===t){if(!xre.call(e,t))return;if(_re)return _re(e,t).value}return e[t]},Nre=function e(){var t,n,r,a,o,i,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=Are(s,n),s!==(a=Are(t,n))&&(u&&a&&(Tre(a)||(o=Sre(a)))?(o?(o=!1,i=r&&Sre(r)?r:[]):i=r&&Tre(r)?r:{},Cre(s,{name:n,newValue:e(u,i,a)})):void 0!==a&&Cre(s,{name:n,newValue:a}));return s};const Ire=l(Nre);function Ore(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Rre(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function a(o,...i){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==i[l]&&void 0!==i[l]||(i[l]=t[l]);t=i,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(a);try{s=e.apply(this,t)}catch(o){if(r&&n)throw o;return a(o)}r||(s&&s.then&&"function"==typeof s.then?s.then(i,a):s instanceof Error?a(s):i(s))}function a(e,...r){n||(n=!0,t(e,...r))}function i(e){a(null,e)}}(s,a)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Pre={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Lre(e);let n,r=0,a=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(a=o):(s=-1,a=i));r===a?a=i:a<0&&(a=e.length);return e.slice(r,a)},dirname:function(e){if(Lre(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Lre(e);let t,n=e.length,r=-1,a=0,o=-1,i=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){a=n+1;break}}if(o<0||r<0||0===i||1===i&&o===r-1&&o===a+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Lre(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Lre(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,a="",o=0,i=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(a.length<2||2!==o||46!==a.codePointAt(a.length-1)||46!==a.codePointAt(a.length-2))if(a.length>2){if(r=a.lastIndexOf("/"),r!==a.length-1){r<0?(a="",o=0):(a=a.slice(0,r),o=a.length-1-a.lastIndexOf("/")),i=l,s=0;continue}}else if(a.length>0){a="",o=0,i=l,s=0;continue}t&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+e.slice(i+1,l):a=e.slice(i+1,l),o=l-i-1;i=l,s=0}else 46===n&&s>-1?s++:s=-1}return a}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Lre(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Dre={cwd:function(){return"/"}};function Mre(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Fre(e){if("string"==typeof e)e=new URL(e);else if(!Mre(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const jre=["history","path","basename","stem","extname","dirname"];class zre{constructor(e){let t;t=e?Mre(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Dre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<jre.length;){const e=jre[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)jre.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Pre.basename(this.path):void 0}set basename(e){Hre(e,"basename"),Bre(e,"basename"),this.path=Pre.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Pre.dirname(this.path):void 0}set dirname(e){Ure(this.basename,"dirname"),this.path=Pre.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Pre.extname(this.path):void 0}set extname(e){if(Bre(e,"extname"),Ure(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Pre.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Mre(e)&&(e=Fre(e)),Hre(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Pre.basename(this.path,this.extname):void 0}set stem(e){Hre(e,"stem"),Bre(e,"stem"),this.path=Pre.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Tee(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function Bre(e,t){if(e&&e.includes(Pre.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Pre.sep+"`")}function Hre(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ure(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const $re=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Vre={}.hasOwnProperty;class Gre extends $re{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=Rre()}copy(){const e=new Gre;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Ire(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Zre("data",this.frozen),this.namespace[e]=t,this):Vre.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Zre("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Qre(e),n=this.parser||this.Parser;return Wre("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Wre("process",this.parser||this.Parser),Yre("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){const o=Qre(e),i=n.parse(o);function s(e,n){e||!n?a(e):r?r(n):t(void 0,n)}n.run(i,o,(function(e,t,r){if(e||!t||!r)return s(e);const a=t,o=n.stringify(a,r);var i;"string"==typeof(i=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=o:r.result=o,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),Wre("processSync",this.parser||this.Parser),Yre("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,kre(e),t=r})),Xre("processSync","process",n),t}run(e,t,n){Kre(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?a(void 0,n):new Promise(a);function a(a,o){const i=Qre(t);r.run(e,i,(function(t,r,i){const s=r||e;t?o(t):a?a(s):n(void 0,s,i)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){kre(e),n=t,r=!0})),Xre("runSync","run",r),n}stringify(e,t){this.freeze();const n=Qre(t),r=this.compiler||this.Compiler;return Yre("stringify",r),Kre(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Zre("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):o(e)}return this;function a(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))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");i(e.plugins),e.settings&&(r.settings=Ire(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){a(e[t])}}}function s(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(-1===a)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const i=n[a][1];Ore(i)&&Ore(r)&&(r=Ire(!0,i,r)),n[a]=[e,r,...o]}}}}const qre=(new Gre).freeze();function Wre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Yre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zre(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 Kre(e){if(!Ore(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Xre(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qre(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new zre(e)}const Jre=[],eae={allowDangerousHtml:!0},tae=/^(https?|ircs?|mailto|xmpp)$/i,nae=[{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:"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 rae(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",a=e.className,o=e.components,i=e.disallowedElements,s=e.rehypePlugins||Jre,l=e.remarkPlugins||Jre,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...eae}:eae,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||aae,f=qre().use(zne).use(l).use(vre,c).use(s),h=new zre;"string"==typeof r&&(h.value=r);for(const y of nae)Object.hasOwn(e,y.from)&&(y.from,y.to&&y.to,y.id);const m=f.parse(h);let g=f.runSync(m,h);return a&&(g={type:"element",tagName:"div",properties:{className:a},children:"root"===g.type?g.children:[g]}),ure(g,(function(e,r,a){if("raw"===e.type&&a&&"number"==typeof r)return u?a.children.splice(r,1):a.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in $ee)if(Object.hasOwn($ee,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=$ee[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=p(String(n||""),t,e))}}if("element"===e.type){let o=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!o&&n&&"number"==typeof r&&(o=!n(e,r,a)),o&&a&&"number"==typeof r)return d&&e.children?a.children.splice(r,1,...e.children):a.children.splice(r,1),r}})),Pee(g,{Fragment:og.Fragment,components:o,ignoreInvalidStyle:!0,jsx:og.jsx,jsxs:og.jsxs,passKeys:!0,passNode:!0})}function aae(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return-1===t||-1!==a&&t>a||-1!==n&&t>n||-1!==r&&t>r||tae.test(e.slice(0,t))?e:""}const oae=/[#.]/g;function iae(e,t,n){const r=n?function(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,a,...o){let i;if(null==n){i={type:"root",children:[]};const e=a;o.unshift(e)}else{i=function(e,t){const n=e||"",r={};let a,o,i=0;for(;i<n.length;){oae.lastIndex=i;const e=oae.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?"#"===a?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}(n,t);const s=i.tagName.toLowerCase(),l=r?r.get(s):void 0;if(i.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const t=e,n=Object.keys(e);for(const r of n){const e=t[r];if(e&&"object"==typeof e){if(!Array.isArray(e))return!0;const t=e;for(const e of t)if("number"!=typeof e&&"string"!=typeof e)return!0}}if("children"in e&&Array.isArray(e.children))return!0;return!1}(a))o.unshift(a);else for(const[t,n]of Object.entries(a))sae(e,i.properties,t,n)}for(const e of o)lae(i.children,e);return"element"===i.type&&"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]),i}}function sae(e,t,n,r){const a=z7(e,n);let o;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;o=r}else o="boolean"==typeof r?r:"string"==typeof r?a.spaceSeparated?V7(r):a.commaSeparated?t7(r):a.commaOrSpaceSeparated?V7(t7(r).join(" ")):cae(a,a.property,r):Array.isArray(r)?[...r]:"style"===a.property?function(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(o)){const e=[];for(const t of o)e.push(cae(a,a.property,t));o=e}"className"===a.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function lae(e,t){if(null==t);else if("number"==typeof t||"string"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)lae(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?lae(e,t.children):e.push(t)}}function cae(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||d7(n)===d7(t)))return!0}return n}const uae=iae(U7,"div"),dae=iae($7,"g",["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"]);function pae(e,t){const n=e.indexOf("\r",t),r=e.indexOf("\n",t);return-1===r?n:-1===n||n+1===r?r:n<r?n:r}const fae={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/"},hae={}.hasOwnProperty,mae=Object.prototype;function gae(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},bae(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r&&("quirks"===r.mode||"limited-quirks"===r.mode);if(n={type:"root",children:yae(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const t=String(e.file),r=function(e){const t=String(e),n=[];return{toOffset:function(e){if(e&&"number"==typeof e.line&&"number"==typeof e.column&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){const e=n[n.length-1],r=pae(t,e),a=-1===r?t.length+1:r+1;if(e===a)break;n.push(a)}const r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}},toPoint:function(e){if("number"==typeof e&&e>-1&&e<=t.length){let r=0;for(;;){let a=n[r];if(void 0===a){const e=pae(t,n[r-1]);a=-1===e?t.length+1:e+1,n[r]=a}if(a>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}}}(t),a=r.toPoint(0),o=r.toPoint(t.length);n.position={start:a,end:o}}return n}case"#documentType":return n={type:"doctype"},bae(e,t,n),n;case"#text":{const r=t;return n={type:"text",value:r.value},bae(e,r,n),n}default:return n=function(e,t){const n=e.schema;e.schema=t.namespaceURI===fae.svg?$7:U7;let r=-1;const a={};for(;++r<t.attrs.length;){const e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;hae.call(mae,n)||(a[n]=e.value)}const o="svg"===e.schema.space?dae:uae,i=o(t.tagName,a,yae(e,t.childNodes));if(bae(e,t,i),"template"===i.tagName){const n=t,r=n.sourceCodeLocation,a=r&&r.startTag&&vae(r.startTag),o=r&&r.endTag&&vae(r.endTag),s=gae(e,n.content);a&&o&&e.file&&(s.position={start:a.end,end:o.start}),i.content=s}return e.schema=n,i}(e,t),n}}function yae(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=gae(e,t[n]);r.push(a)}return r}function bae(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=function(e,t,n){const r=vae(n);if("element"===t.type){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const r={};let a;if(n.attrs)for(a in n.attrs)hae.call(n.attrs,a)&&(r[z7(e.schema,a).property]=vae(n.attrs[a]));n.startTag;const o=vae(n.startTag),i=n.endTag?vae(n.endTag):void 0,s={opening:o};i&&(s.closing=i),s.properties=r,t.data={position:s}}}return r}(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function vae(e){const t=kae({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=kae({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function kae(e){return e.line&&e.column?e:void 0}const xae={}.hasOwnProperty;function wae(e,t){const n=t||{};function r(t,...n){let a=r.invalid;const o=r.handlers;if(t&&xae.call(t,e)){const n=String(t[e]);a=xae.call(o,n)?o[n]:r.unknown}if(a)return a.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Eae={},_ae={}.hasOwnProperty,Sae=wae("type",{handlers:{root:function(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Cae(e.children,n,t),Aae(e,n),n},element:function(e,t){const n=t;let r=n;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===n.space&&(r=$7);const a=[];let o;if(e.properties)for(o in e.properties)if("children"!==o&&_ae.call(e.properties,o)){const t=Tae(r,o,e.properties[o]);t&&a.push(t)}const i=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:fae[i],childNodes:[],parentNode:null};s.childNodes=Cae(e.children,s,r),Aae(e,s),"template"===e.tagName&&e.content&&(s.content=function(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Cae(e.children,n,t),Aae(e,n),n}(e.content,r));return s},text:function(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Aae(e,t),t},comment:function(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Aae(e,t),t},doctype:function(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Aae(e,t),t}}});function Tae(e,t,n){const r=z7(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?n7(n):G7(n));const a={name:r.attribute,value:!0===n?"":String(n)};if(r.space&&"html"!==r.space&&"svg"!==r.space){const e=a.name.indexOf(":");e<0?a.prefix="":(a.name=a.name.slice(e+1),a.prefix=r.attribute.slice(0,e)),a.namespace=fae[r.space]}return a}function Cae(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=Sae(e[r],n);o.parentNode=t,a.push(o)}return a}function Aae(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 Nae=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Iae=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]),Oae="�";var Rae,Pae;(Pae=Rae||(Rae={}))[Pae.EOF=-1]="EOF",Pae[Pae.NULL=0]="NULL",Pae[Pae.TABULATION=9]="TABULATION",Pae[Pae.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",Pae[Pae.LINE_FEED=10]="LINE_FEED",Pae[Pae.FORM_FEED=12]="FORM_FEED",Pae[Pae.SPACE=32]="SPACE",Pae[Pae.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",Pae[Pae.QUOTATION_MARK=34]="QUOTATION_MARK",Pae[Pae.AMPERSAND=38]="AMPERSAND",Pae[Pae.APOSTROPHE=39]="APOSTROPHE",Pae[Pae.HYPHEN_MINUS=45]="HYPHEN_MINUS",Pae[Pae.SOLIDUS=47]="SOLIDUS",Pae[Pae.DIGIT_0=48]="DIGIT_0",Pae[Pae.DIGIT_9=57]="DIGIT_9",Pae[Pae.SEMICOLON=59]="SEMICOLON",Pae[Pae.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",Pae[Pae.EQUALS_SIGN=61]="EQUALS_SIGN",Pae[Pae.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",Pae[Pae.QUESTION_MARK=63]="QUESTION_MARK",Pae[Pae.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",Pae[Pae.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",Pae[Pae.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",Pae[Pae.GRAVE_ACCENT=96]="GRAVE_ACCENT",Pae[Pae.LATIN_SMALL_A=97]="LATIN_SMALL_A",Pae[Pae.LATIN_SMALL_Z=122]="LATIN_SMALL_Z";const Lae="--",Dae="[CDATA[",Mae="doctype",Fae="script",jae="public",zae="system";function Bae(e){return e>=55296&&e<=57343}function Hae(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function Uae(e){return e>=64976&&e<=65007||Iae.has(e)}var $ae,Vae;(Vae=$ae||($ae={})).controlCharacterInInputStream="control-character-in-input-stream",Vae.noncharacterInInputStream="noncharacter-in-input-stream",Vae.surrogateInInputStream="surrogate-in-input-stream",Vae.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",Vae.endTagWithAttributes="end-tag-with-attributes",Vae.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",Vae.unexpectedSolidusInTag="unexpected-solidus-in-tag",Vae.unexpectedNullCharacter="unexpected-null-character",Vae.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",Vae.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",Vae.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",Vae.missingEndTagName="missing-end-tag-name",Vae.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",Vae.unknownNamedCharacterReference="unknown-named-character-reference",Vae.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",Vae.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",Vae.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",Vae.eofBeforeTagName="eof-before-tag-name",Vae.eofInTag="eof-in-tag",Vae.missingAttributeValue="missing-attribute-value",Vae.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",Vae.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",Vae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",Vae.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",Vae.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",Vae.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",Vae.missingDoctypePublicIdentifier="missing-doctype-public-identifier",Vae.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",Vae.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",Vae.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",Vae.cdataInHtmlContent="cdata-in-html-content",Vae.incorrectlyOpenedComment="incorrectly-opened-comment",Vae.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",Vae.eofInDoctype="eof-in-doctype",Vae.nestedComment="nested-comment",Vae.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",Vae.eofInComment="eof-in-comment",Vae.incorrectlyClosedComment="incorrectly-closed-comment",Vae.eofInCdata="eof-in-cdata",Vae.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",Vae.nullCharacterReference="null-character-reference",Vae.surrogateCharacterReference="surrogate-character-reference",Vae.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",Vae.controlCharacterReference="control-character-reference",Vae.noncharacterCharacterReference="noncharacter-character-reference",Vae.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",Vae.missingDoctypeName="missing-doctype-name",Vae.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",Vae.duplicateAttribute="duplicate-attribute",Vae.nonConformingDoctype="non-conforming-doctype",Vae.missingDoctype="missing-doctype",Vae.misplacedDoctype="misplaced-doctype",Vae.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",Vae.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",Vae.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",Vae.openElementsLeftAfterEof="open-elements-left-after-eof",Vae.abandonedHeadElementChild="abandoned-head-element-child",Vae.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",Vae.nestedNoscriptInHead="nested-noscript-in-head",Vae.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class Gae{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:r,offset:a}=this,o=r+t,i=a+t;return{code:e,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:i,endOffset:i}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Rae.EOF;return this._err($ae.surrogateInInputStream),e}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(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++){if((32|this.html.charCodeAt(this.pos+n))!==e.charCodeAt(n))return!1}return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Rae.EOF;const n=this.html.charCodeAt(t);return n===Rae.CARRIAGE_RETURN?Rae.LINE_FEED:n}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,Rae.EOF;let e=this.html.charCodeAt(this.pos);if(e===Rae.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,Rae.LINE_FEED;if(e===Rae.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,Bae(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===Rae.LINE_FEED||e===Rae.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){Hae(e)?this._err($ae.controlCharacterInInputStream):Uae(e)&&this._err($ae.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var qae,Wae;function Yae(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}(Wae=qae||(qae={}))[Wae.CHARACTER=0]="CHARACTER",Wae[Wae.NULL_CHARACTER=1]="NULL_CHARACTER",Wae[Wae.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",Wae[Wae.START_TAG=3]="START_TAG",Wae[Wae.END_TAG=4]="END_TAG",Wae[Wae.COMMENT=5]="COMMENT",Wae[Wae.DOCTYPE=6]="DOCTYPE",Wae[Wae.EOF=7]="EOF",Wae[Wae.HIBERNATION=8]="HIBERNATION";const Zae=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)))),Kae=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]]);var Xae,Qae;(Qae=Xae||(Xae={}))[Qae.NUM=35]="NUM",Qae[Qae.SEMI=59]="SEMI",Qae[Qae.EQUALS=61]="EQUALS",Qae[Qae.ZERO=48]="ZERO",Qae[Qae.NINE=57]="NINE",Qae[Qae.LOWER_A=97]="LOWER_A",Qae[Qae.LOWER_F=102]="LOWER_F",Qae[Qae.LOWER_X=120]="LOWER_X",Qae[Qae.LOWER_Z=122]="LOWER_Z",Qae[Qae.UPPER_A=65]="UPPER_A",Qae[Qae.UPPER_F=70]="UPPER_F",Qae[Qae.UPPER_Z=90]="UPPER_Z";var Jae,eoe,toe,noe,roe,aoe,ooe,ioe,soe,loe,coe,uoe,doe,poe,foe,hoe;function moe(e){return e>=Xae.ZERO&&e<=Xae.NINE}function goe(e){return e===Xae.EQUALS||function(e){return e>=Xae.UPPER_A&&e<=Xae.UPPER_Z||e>=Xae.LOWER_A&&e<=Xae.LOWER_Z||moe(e)}(e)}(eoe=Jae||(Jae={}))[eoe.VALUE_LENGTH=49152]="VALUE_LENGTH",eoe[eoe.BRANCH_LENGTH=16256]="BRANCH_LENGTH",eoe[eoe.JUMP_TABLE=127]="JUMP_TABLE",(noe=toe||(toe={}))[noe.EntityStart=0]="EntityStart",noe[noe.NumericStart=1]="NumericStart",noe[noe.NumericDecimal=2]="NumericDecimal",noe[noe.NumericHex=3]="NumericHex",noe[noe.NamedEntity=4]="NamedEntity",(aoe=roe||(roe={}))[aoe.Legacy=0]="Legacy",aoe[aoe.Strict=1]="Strict",aoe[aoe.Attribute=2]="Attribute";class yoe{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=toe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=roe.Strict}startEntity(e){this.decodeMode=e,this.state=toe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case toe.EntityStart:return e.charCodeAt(t)===Xae.NUM?(this.state=toe.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=toe.NamedEntity,this.stateNamedEntity(e,t));case toe.NumericStart:return this.stateNumericStart(e,t);case toe.NumericDecimal:return this.stateNumericDecimal(e,t);case toe.NumericHex:return this.stateNumericHex(e,t);case toe.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===Xae.LOWER_X?(this.state=toe.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=toe.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const a=n-t;this.result=this.result*Math.pow(r,a)+Number.parseInt(e.substr(t,a),r),this.consumed+=a}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const a=e.charCodeAt(t);if(!(moe(a)||(r=a,r>=Xae.UPPER_A&&r<=Xae.UPPER_F||r>=Xae.LOWER_A&&r<=Xae.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(a,3);t+=1}var r;return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!moe(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Xae.SEMI)this.consumed+=1;else if(this.decodeMode===roe.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=Kae.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==Xae.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],a=(r&Jae.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=boe(n,r,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return 0===this.result||this.decodeMode===roe.Attribute&&(0===a||goe(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],a=(r&Jae.VALUE_LENGTH)>>14,0!==a){if(o===Xae.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==roe.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&Jae.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~Jae.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case toe.NamedEntity:return 0===this.result||this.decodeMode===roe.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case toe.NumericDecimal:return this.emitNumericEntity(0,2);case toe.NumericHex:return this.emitNumericEntity(0,3);case toe.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case toe.EntityStart:return 0}}}function boe(e,t,n,r){const a=(t&Jae.BRANCH_LENGTH)>>7,o=t&Jae.JUMP_TABLE;if(0===a)return 0!==o&&r===o?n:-1;if(o){const t=r-o;return t<0||t>=a?-1:e[n+t]-1}let i=n,s=i+a-1;for(;i<=s;){const t=i+s>>>1,n=e[t];if(n<r)i=t+1;else{if(!(n>r))return e[t+a];s=t-1}}return-1}(ioe=ooe||(ooe={})).HTML="http://www.w3.org/1999/xhtml",ioe.MATHML="http://www.w3.org/1998/Math/MathML",ioe.SVG="http://www.w3.org/2000/svg",ioe.XLINK="http://www.w3.org/1999/xlink",ioe.XML="http://www.w3.org/XML/1998/namespace",ioe.XMLNS="http://www.w3.org/2000/xmlns/",(loe=soe||(soe={})).TYPE="type",loe.ACTION="action",loe.ENCODING="encoding",loe.PROMPT="prompt",loe.NAME="name",loe.COLOR="color",loe.FACE="face",loe.SIZE="size",(uoe=coe||(coe={})).NO_QUIRKS="no-quirks",uoe.QUIRKS="quirks",uoe.LIMITED_QUIRKS="limited-quirks",(poe=doe||(doe={})).A="a",poe.ADDRESS="address",poe.ANNOTATION_XML="annotation-xml",poe.APPLET="applet",poe.AREA="area",poe.ARTICLE="article",poe.ASIDE="aside",poe.B="b",poe.BASE="base",poe.BASEFONT="basefont",poe.BGSOUND="bgsound",poe.BIG="big",poe.BLOCKQUOTE="blockquote",poe.BODY="body",poe.BR="br",poe.BUTTON="button",poe.CAPTION="caption",poe.CENTER="center",poe.CODE="code",poe.COL="col",poe.COLGROUP="colgroup",poe.DD="dd",poe.DESC="desc",poe.DETAILS="details",poe.DIALOG="dialog",poe.DIR="dir",poe.DIV="div",poe.DL="dl",poe.DT="dt",poe.EM="em",poe.EMBED="embed",poe.FIELDSET="fieldset",poe.FIGCAPTION="figcaption",poe.FIGURE="figure",poe.FONT="font",poe.FOOTER="footer",poe.FOREIGN_OBJECT="foreignObject",poe.FORM="form",poe.FRAME="frame",poe.FRAMESET="frameset",poe.H1="h1",poe.H2="h2",poe.H3="h3",poe.H4="h4",poe.H5="h5",poe.H6="h6",poe.HEAD="head",poe.HEADER="header",poe.HGROUP="hgroup",poe.HR="hr",poe.HTML="html",poe.I="i",poe.IMG="img",poe.IMAGE="image",poe.INPUT="input",poe.IFRAME="iframe",poe.KEYGEN="keygen",poe.LABEL="label",poe.LI="li",poe.LINK="link",poe.LISTING="listing",poe.MAIN="main",poe.MALIGNMARK="malignmark",poe.MARQUEE="marquee",poe.MATH="math",poe.MENU="menu",poe.META="meta",poe.MGLYPH="mglyph",poe.MI="mi",poe.MO="mo",poe.MN="mn",poe.MS="ms",poe.MTEXT="mtext",poe.NAV="nav",poe.NOBR="nobr",poe.NOFRAMES="noframes",poe.NOEMBED="noembed",poe.NOSCRIPT="noscript",poe.OBJECT="object",poe.OL="ol",poe.OPTGROUP="optgroup",poe.OPTION="option",poe.P="p",poe.PARAM="param",poe.PLAINTEXT="plaintext",poe.PRE="pre",poe.RB="rb",poe.RP="rp",poe.RT="rt",poe.RTC="rtc",poe.RUBY="ruby",poe.S="s",poe.SCRIPT="script",poe.SEARCH="search",poe.SECTION="section",poe.SELECT="select",poe.SOURCE="source",poe.SMALL="small",poe.SPAN="span",poe.STRIKE="strike",poe.STRONG="strong",poe.STYLE="style",poe.SUB="sub",poe.SUMMARY="summary",poe.SUP="sup",poe.TABLE="table",poe.TBODY="tbody",poe.TEMPLATE="template",poe.TEXTAREA="textarea",poe.TFOOT="tfoot",poe.TD="td",poe.TH="th",poe.THEAD="thead",poe.TITLE="title",poe.TR="tr",poe.TRACK="track",poe.TT="tt",poe.U="u",poe.UL="ul",poe.SVG="svg",poe.VAR="var",poe.WBR="wbr",poe.XMP="xmp",(hoe=foe||(foe={}))[hoe.UNKNOWN=0]="UNKNOWN",hoe[hoe.A=1]="A",hoe[hoe.ADDRESS=2]="ADDRESS",hoe[hoe.ANNOTATION_XML=3]="ANNOTATION_XML",hoe[hoe.APPLET=4]="APPLET",hoe[hoe.AREA=5]="AREA",hoe[hoe.ARTICLE=6]="ARTICLE",hoe[hoe.ASIDE=7]="ASIDE",hoe[hoe.B=8]="B",hoe[hoe.BASE=9]="BASE",hoe[hoe.BASEFONT=10]="BASEFONT",hoe[hoe.BGSOUND=11]="BGSOUND",hoe[hoe.BIG=12]="BIG",hoe[hoe.BLOCKQUOTE=13]="BLOCKQUOTE",hoe[hoe.BODY=14]="BODY",hoe[hoe.BR=15]="BR",hoe[hoe.BUTTON=16]="BUTTON",hoe[hoe.CAPTION=17]="CAPTION",hoe[hoe.CENTER=18]="CENTER",hoe[hoe.CODE=19]="CODE",hoe[hoe.COL=20]="COL",hoe[hoe.COLGROUP=21]="COLGROUP",hoe[hoe.DD=22]="DD",hoe[hoe.DESC=23]="DESC",hoe[hoe.DETAILS=24]="DETAILS",hoe[hoe.DIALOG=25]="DIALOG",hoe[hoe.DIR=26]="DIR",hoe[hoe.DIV=27]="DIV",hoe[hoe.DL=28]="DL",hoe[hoe.DT=29]="DT",hoe[hoe.EM=30]="EM",hoe[hoe.EMBED=31]="EMBED",hoe[hoe.FIELDSET=32]="FIELDSET",hoe[hoe.FIGCAPTION=33]="FIGCAPTION",hoe[hoe.FIGURE=34]="FIGURE",hoe[hoe.FONT=35]="FONT",hoe[hoe.FOOTER=36]="FOOTER",hoe[hoe.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",hoe[hoe.FORM=38]="FORM",hoe[hoe.FRAME=39]="FRAME",hoe[hoe.FRAMESET=40]="FRAMESET",hoe[hoe.H1=41]="H1",hoe[hoe.H2=42]="H2",hoe[hoe.H3=43]="H3",hoe[hoe.H4=44]="H4",hoe[hoe.H5=45]="H5",hoe[hoe.H6=46]="H6",hoe[hoe.HEAD=47]="HEAD",hoe[hoe.HEADER=48]="HEADER",hoe[hoe.HGROUP=49]="HGROUP",hoe[hoe.HR=50]="HR",hoe[hoe.HTML=51]="HTML",hoe[hoe.I=52]="I",hoe[hoe.IMG=53]="IMG",hoe[hoe.IMAGE=54]="IMAGE",hoe[hoe.INPUT=55]="INPUT",hoe[hoe.IFRAME=56]="IFRAME",hoe[hoe.KEYGEN=57]="KEYGEN",hoe[hoe.LABEL=58]="LABEL",hoe[hoe.LI=59]="LI",hoe[hoe.LINK=60]="LINK",hoe[hoe.LISTING=61]="LISTING",hoe[hoe.MAIN=62]="MAIN",hoe[hoe.MALIGNMARK=63]="MALIGNMARK",hoe[hoe.MARQUEE=64]="MARQUEE",hoe[hoe.MATH=65]="MATH",hoe[hoe.MENU=66]="MENU",hoe[hoe.META=67]="META",hoe[hoe.MGLYPH=68]="MGLYPH",hoe[hoe.MI=69]="MI",hoe[hoe.MO=70]="MO",hoe[hoe.MN=71]="MN",hoe[hoe.MS=72]="MS",hoe[hoe.MTEXT=73]="MTEXT",hoe[hoe.NAV=74]="NAV",hoe[hoe.NOBR=75]="NOBR",hoe[hoe.NOFRAMES=76]="NOFRAMES",hoe[hoe.NOEMBED=77]="NOEMBED",hoe[hoe.NOSCRIPT=78]="NOSCRIPT",hoe[hoe.OBJECT=79]="OBJECT",hoe[hoe.OL=80]="OL",hoe[hoe.OPTGROUP=81]="OPTGROUP",hoe[hoe.OPTION=82]="OPTION",hoe[hoe.P=83]="P",hoe[hoe.PARAM=84]="PARAM",hoe[hoe.PLAINTEXT=85]="PLAINTEXT",hoe[hoe.PRE=86]="PRE",hoe[hoe.RB=87]="RB",hoe[hoe.RP=88]="RP",hoe[hoe.RT=89]="RT",hoe[hoe.RTC=90]="RTC",hoe[hoe.RUBY=91]="RUBY",hoe[hoe.S=92]="S",hoe[hoe.SCRIPT=93]="SCRIPT",hoe[hoe.SEARCH=94]="SEARCH",hoe[hoe.SECTION=95]="SECTION",hoe[hoe.SELECT=96]="SELECT",hoe[hoe.SOURCE=97]="SOURCE",hoe[hoe.SMALL=98]="SMALL",hoe[hoe.SPAN=99]="SPAN",hoe[hoe.STRIKE=100]="STRIKE",hoe[hoe.STRONG=101]="STRONG",hoe[hoe.STYLE=102]="STYLE",hoe[hoe.SUB=103]="SUB",hoe[hoe.SUMMARY=104]="SUMMARY",hoe[hoe.SUP=105]="SUP",hoe[hoe.TABLE=106]="TABLE",hoe[hoe.TBODY=107]="TBODY",hoe[hoe.TEMPLATE=108]="TEMPLATE",hoe[hoe.TEXTAREA=109]="TEXTAREA",hoe[hoe.TFOOT=110]="TFOOT",hoe[hoe.TD=111]="TD",hoe[hoe.TH=112]="TH",hoe[hoe.THEAD=113]="THEAD",hoe[hoe.TITLE=114]="TITLE",hoe[hoe.TR=115]="TR",hoe[hoe.TRACK=116]="TRACK",hoe[hoe.TT=117]="TT",hoe[hoe.U=118]="U",hoe[hoe.UL=119]="UL",hoe[hoe.SVG=120]="SVG",hoe[hoe.VAR=121]="VAR",hoe[hoe.WBR=122]="WBR",hoe[hoe.XMP=123]="XMP";const voe=new Map([[doe.A,foe.A],[doe.ADDRESS,foe.ADDRESS],[doe.ANNOTATION_XML,foe.ANNOTATION_XML],[doe.APPLET,foe.APPLET],[doe.AREA,foe.AREA],[doe.ARTICLE,foe.ARTICLE],[doe.ASIDE,foe.ASIDE],[doe.B,foe.B],[doe.BASE,foe.BASE],[doe.BASEFONT,foe.BASEFONT],[doe.BGSOUND,foe.BGSOUND],[doe.BIG,foe.BIG],[doe.BLOCKQUOTE,foe.BLOCKQUOTE],[doe.BODY,foe.BODY],[doe.BR,foe.BR],[doe.BUTTON,foe.BUTTON],[doe.CAPTION,foe.CAPTION],[doe.CENTER,foe.CENTER],[doe.CODE,foe.CODE],[doe.COL,foe.COL],[doe.COLGROUP,foe.COLGROUP],[doe.DD,foe.DD],[doe.DESC,foe.DESC],[doe.DETAILS,foe.DETAILS],[doe.DIALOG,foe.DIALOG],[doe.DIR,foe.DIR],[doe.DIV,foe.DIV],[doe.DL,foe.DL],[doe.DT,foe.DT],[doe.EM,foe.EM],[doe.EMBED,foe.EMBED],[doe.FIELDSET,foe.FIELDSET],[doe.FIGCAPTION,foe.FIGCAPTION],[doe.FIGURE,foe.FIGURE],[doe.FONT,foe.FONT],[doe.FOOTER,foe.FOOTER],[doe.FOREIGN_OBJECT,foe.FOREIGN_OBJECT],[doe.FORM,foe.FORM],[doe.FRAME,foe.FRAME],[doe.FRAMESET,foe.FRAMESET],[doe.H1,foe.H1],[doe.H2,foe.H2],[doe.H3,foe.H3],[doe.H4,foe.H4],[doe.H5,foe.H5],[doe.H6,foe.H6],[doe.HEAD,foe.HEAD],[doe.HEADER,foe.HEADER],[doe.HGROUP,foe.HGROUP],[doe.HR,foe.HR],[doe.HTML,foe.HTML],[doe.I,foe.I],[doe.IMG,foe.IMG],[doe.IMAGE,foe.IMAGE],[doe.INPUT,foe.INPUT],[doe.IFRAME,foe.IFRAME],[doe.KEYGEN,foe.KEYGEN],[doe.LABEL,foe.LABEL],[doe.LI,foe.LI],[doe.LINK,foe.LINK],[doe.LISTING,foe.LISTING],[doe.MAIN,foe.MAIN],[doe.MALIGNMARK,foe.MALIGNMARK],[doe.MARQUEE,foe.MARQUEE],[doe.MATH,foe.MATH],[doe.MENU,foe.MENU],[doe.META,foe.META],[doe.MGLYPH,foe.MGLYPH],[doe.MI,foe.MI],[doe.MO,foe.MO],[doe.MN,foe.MN],[doe.MS,foe.MS],[doe.MTEXT,foe.MTEXT],[doe.NAV,foe.NAV],[doe.NOBR,foe.NOBR],[doe.NOFRAMES,foe.NOFRAMES],[doe.NOEMBED,foe.NOEMBED],[doe.NOSCRIPT,foe.NOSCRIPT],[doe.OBJECT,foe.OBJECT],[doe.OL,foe.OL],[doe.OPTGROUP,foe.OPTGROUP],[doe.OPTION,foe.OPTION],[doe.P,foe.P],[doe.PARAM,foe.PARAM],[doe.PLAINTEXT,foe.PLAINTEXT],[doe.PRE,foe.PRE],[doe.RB,foe.RB],[doe.RP,foe.RP],[doe.RT,foe.RT],[doe.RTC,foe.RTC],[doe.RUBY,foe.RUBY],[doe.S,foe.S],[doe.SCRIPT,foe.SCRIPT],[doe.SEARCH,foe.SEARCH],[doe.SECTION,foe.SECTION],[doe.SELECT,foe.SELECT],[doe.SOURCE,foe.SOURCE],[doe.SMALL,foe.SMALL],[doe.SPAN,foe.SPAN],[doe.STRIKE,foe.STRIKE],[doe.STRONG,foe.STRONG],[doe.STYLE,foe.STYLE],[doe.SUB,foe.SUB],[doe.SUMMARY,foe.SUMMARY],[doe.SUP,foe.SUP],[doe.TABLE,foe.TABLE],[doe.TBODY,foe.TBODY],[doe.TEMPLATE,foe.TEMPLATE],[doe.TEXTAREA,foe.TEXTAREA],[doe.TFOOT,foe.TFOOT],[doe.TD,foe.TD],[doe.TH,foe.TH],[doe.THEAD,foe.THEAD],[doe.TITLE,foe.TITLE],[doe.TR,foe.TR],[doe.TRACK,foe.TRACK],[doe.TT,foe.TT],[doe.U,foe.U],[doe.UL,foe.UL],[doe.SVG,foe.SVG],[doe.VAR,foe.VAR],[doe.WBR,foe.WBR],[doe.XMP,foe.XMP]]);function koe(e){var t;return null!==(t=voe.get(e))&&void 0!==t?t:foe.UNKNOWN}const xoe=foe,woe={[ooe.HTML]:new Set([xoe.ADDRESS,xoe.APPLET,xoe.AREA,xoe.ARTICLE,xoe.ASIDE,xoe.BASE,xoe.BASEFONT,xoe.BGSOUND,xoe.BLOCKQUOTE,xoe.BODY,xoe.BR,xoe.BUTTON,xoe.CAPTION,xoe.CENTER,xoe.COL,xoe.COLGROUP,xoe.DD,xoe.DETAILS,xoe.DIR,xoe.DIV,xoe.DL,xoe.DT,xoe.EMBED,xoe.FIELDSET,xoe.FIGCAPTION,xoe.FIGURE,xoe.FOOTER,xoe.FORM,xoe.FRAME,xoe.FRAMESET,xoe.H1,xoe.H2,xoe.H3,xoe.H4,xoe.H5,xoe.H6,xoe.HEAD,xoe.HEADER,xoe.HGROUP,xoe.HR,xoe.HTML,xoe.IFRAME,xoe.IMG,xoe.INPUT,xoe.LI,xoe.LINK,xoe.LISTING,xoe.MAIN,xoe.MARQUEE,xoe.MENU,xoe.META,xoe.NAV,xoe.NOEMBED,xoe.NOFRAMES,xoe.NOSCRIPT,xoe.OBJECT,xoe.OL,xoe.P,xoe.PARAM,xoe.PLAINTEXT,xoe.PRE,xoe.SCRIPT,xoe.SECTION,xoe.SELECT,xoe.SOURCE,xoe.STYLE,xoe.SUMMARY,xoe.TABLE,xoe.TBODY,xoe.TD,xoe.TEMPLATE,xoe.TEXTAREA,xoe.TFOOT,xoe.TH,xoe.THEAD,xoe.TITLE,xoe.TR,xoe.TRACK,xoe.UL,xoe.WBR,xoe.XMP]),[ooe.MATHML]:new Set([xoe.MI,xoe.MO,xoe.MN,xoe.MS,xoe.MTEXT,xoe.ANNOTATION_XML]),[ooe.SVG]:new Set([xoe.TITLE,xoe.FOREIGN_OBJECT,xoe.DESC]),[ooe.XLINK]:new Set,[ooe.XML]:new Set,[ooe.XMLNS]:new Set},Eoe=new Set([xoe.H1,xoe.H2,xoe.H3,xoe.H4,xoe.H5,xoe.H6]);var _oe,Soe;doe.STYLE,doe.SCRIPT,doe.XMP,doe.IFRAME,doe.NOEMBED,doe.NOFRAMES,doe.PLAINTEXT,(Soe=_oe||(_oe={}))[Soe.DATA=0]="DATA",Soe[Soe.RCDATA=1]="RCDATA",Soe[Soe.RAWTEXT=2]="RAWTEXT",Soe[Soe.SCRIPT_DATA=3]="SCRIPT_DATA",Soe[Soe.PLAINTEXT=4]="PLAINTEXT",Soe[Soe.TAG_OPEN=5]="TAG_OPEN",Soe[Soe.END_TAG_OPEN=6]="END_TAG_OPEN",Soe[Soe.TAG_NAME=7]="TAG_NAME",Soe[Soe.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",Soe[Soe.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",Soe[Soe.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",Soe[Soe.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",Soe[Soe.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",Soe[Soe.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",Soe[Soe.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",Soe[Soe.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",Soe[Soe.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",Soe[Soe.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",Soe[Soe.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",Soe[Soe.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",Soe[Soe.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",Soe[Soe.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",Soe[Soe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",Soe[Soe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",Soe[Soe.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",Soe[Soe.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",Soe[Soe.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",Soe[Soe.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",Soe[Soe.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",Soe[Soe.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",Soe[Soe.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",Soe[Soe.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",Soe[Soe.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",Soe[Soe.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",Soe[Soe.BOGUS_COMMENT=40]="BOGUS_COMMENT",Soe[Soe.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",Soe[Soe.COMMENT_START=42]="COMMENT_START",Soe[Soe.COMMENT_START_DASH=43]="COMMENT_START_DASH",Soe[Soe.COMMENT=44]="COMMENT",Soe[Soe.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",Soe[Soe.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",Soe[Soe.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",Soe[Soe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",Soe[Soe.COMMENT_END_DASH=49]="COMMENT_END_DASH",Soe[Soe.COMMENT_END=50]="COMMENT_END",Soe[Soe.COMMENT_END_BANG=51]="COMMENT_END_BANG",Soe[Soe.DOCTYPE=52]="DOCTYPE",Soe[Soe.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",Soe[Soe.DOCTYPE_NAME=54]="DOCTYPE_NAME",Soe[Soe.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",Soe[Soe.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",Soe[Soe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",Soe[Soe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",Soe[Soe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",Soe[Soe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",Soe[Soe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",Soe[Soe.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",Soe[Soe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",Soe[Soe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",Soe[Soe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",Soe[Soe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",Soe[Soe.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",Soe[Soe.CDATA_SECTION=68]="CDATA_SECTION",Soe[Soe.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",Soe[Soe.CDATA_SECTION_END=70]="CDATA_SECTION_END",Soe[Soe.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",Soe[Soe.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND";const Toe={DATA:_oe.DATA,RCDATA:_oe.RCDATA,RAWTEXT:_oe.RAWTEXT,SCRIPT_DATA:_oe.SCRIPT_DATA,PLAINTEXT:_oe.PLAINTEXT,CDATA_SECTION:_oe.CDATA_SECTION};function Coe(e){return e>=Rae.LATIN_CAPITAL_A&&e<=Rae.LATIN_CAPITAL_Z}function Aoe(e){return function(e){return e>=Rae.LATIN_SMALL_A&&e<=Rae.LATIN_SMALL_Z}(e)||Coe(e)}function Noe(e){return Aoe(e)||function(e){return e>=Rae.DIGIT_0&&e<=Rae.DIGIT_9}(e)}function Ioe(e){return e+32}function Ooe(e){return e===Rae.SPACE||e===Rae.LINE_FEED||e===Rae.TABULATION||e===Rae.FORM_FEED}function Roe(e){return Ooe(e)||e===Rae.SOLIDUS||e===Rae.GREATER_THAN_SIGN}class Poe{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=_oe.DATA,this.returnState=_oe.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Gae(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new yoe(Zae,((e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)}),t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err($ae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err($ae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{const t=function(e){return e===Rae.NULL?$ae.nullCharacterReference:e>1114111?$ae.characterReferenceOutsideUnicodeRange:Bae(e)?$ae.surrogateCharacterReference:Uae(e)?$ae.noncharacterCharacterReference:Hae(e)||e===Rae.CARRIAGE_RETURN?$ae.controlCharacterReference:null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;null===(r=(n=this.handler).onParseError)||void 0===r||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:qae.START_TAG,tagName:"",tagID:foe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qae.END_TAG,tagName:"",tagID:foe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:qae.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:qae.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;if(null===Yae(n,this.currentAttr.name)){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){(null!==(e=(t=n.location).attrs)&&void 0!==e?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err($ae.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=koe(e.tagName),e.type===qae.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err($ae.endTagWithAttributes),e.selfClosing&&this._err($ae.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case qae.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case qae.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case qae.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:qae.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=Ooe(e)?qae.WHITESPACE_CHARACTER:e===Rae.NULL?qae.NULL_CHARACTER:qae.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(qae.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=_oe.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?roe.Attribute:roe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===_oe.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===_oe.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===_oe.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case _oe.DATA:this._stateData(e);break;case _oe.RCDATA:this._stateRcdata(e);break;case _oe.RAWTEXT:this._stateRawtext(e);break;case _oe.SCRIPT_DATA:this._stateScriptData(e);break;case _oe.PLAINTEXT:this._statePlaintext(e);break;case _oe.TAG_OPEN:this._stateTagOpen(e);break;case _oe.END_TAG_OPEN:this._stateEndTagOpen(e);break;case _oe.TAG_NAME:this._stateTagName(e);break;case _oe.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case _oe.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case _oe.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case _oe.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case _oe.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case _oe.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case _oe.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case _oe.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case _oe.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case _oe.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case _oe.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case _oe.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case _oe.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case _oe.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case _oe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case _oe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case _oe.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case _oe.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case _oe.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case _oe.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case _oe.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case _oe.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case _oe.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case _oe.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case _oe.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case _oe.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case _oe.BOGUS_COMMENT:this._stateBogusComment(e);break;case _oe.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case _oe.COMMENT_START:this._stateCommentStart(e);break;case _oe.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case _oe.COMMENT:this._stateComment(e);break;case _oe.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case _oe.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case _oe.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case _oe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case _oe.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case _oe.COMMENT_END:this._stateCommentEnd(e);break;case _oe.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case _oe.DOCTYPE:this._stateDoctype(e);break;case _oe.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case _oe.DOCTYPE_NAME:this._stateDoctypeName(e);break;case _oe.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case _oe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case _oe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case _oe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case _oe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case _oe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case _oe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case _oe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case _oe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case _oe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case _oe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case _oe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case _oe.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case _oe.CDATA_SECTION:this._stateCdataSection(e);break;case _oe.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case _oe.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case _oe.CHARACTER_REFERENCE:this._stateCharacterReference();break;case _oe.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Rae.LESS_THAN_SIGN:this.state=_oe.TAG_OPEN;break;case Rae.AMPERSAND:this._startCharacterReference();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitCodePoint(e);break;case Rae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Rae.AMPERSAND:this._startCharacterReference();break;case Rae.LESS_THAN_SIGN:this.state=_oe.RCDATA_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Rae.LESS_THAN_SIGN:this.state=_oe.RAWTEXT_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Aoe(e))this._createStartTagToken(),this.state=_oe.TAG_NAME,this._stateTagName(e);else switch(e){case Rae.EXCLAMATION_MARK:this.state=_oe.MARKUP_DECLARATION_OPEN;break;case Rae.SOLIDUS:this.state=_oe.END_TAG_OPEN;break;case Rae.QUESTION_MARK:this._err($ae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=_oe.BOGUS_COMMENT,this._stateBogusComment(e);break;case Rae.EOF:this._err($ae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err($ae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=_oe.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Aoe(e))this._createEndTagToken(),this.state=_oe.TAG_NAME,this._stateTagName(e);else switch(e){case Rae.GREATER_THAN_SIGN:this._err($ae.missingEndTagName),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err($ae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=_oe.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.BEFORE_ATTRIBUTE_NAME;break;case Rae.SOLIDUS:this.state=_oe.SELF_CLOSING_START_TAG;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentTagToken();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.tagName+=Oae;break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Coe(e)?Ioe(e):e)}}_stateRcdataLessThanSign(e){e===Rae.SOLIDUS?this.state=_oe.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=_oe.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Aoe(e)?(this.state=_oe.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=_oe.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();this.currentToken.tagName=this.lastStartTagName;switch(this.preprocessor.peek(this.lastStartTagName.length)){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=_oe.BEFORE_ATTRIBUTE_NAME,!1;case Rae.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=_oe.SELF_CLOSING_START_TAG,!1;case Rae.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=_oe.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=_oe.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Rae.SOLIDUS?this.state=_oe.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=_oe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Aoe(e)?(this.state=_oe.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=_oe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=_oe.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Rae.SOLIDUS:this.state=_oe.SCRIPT_DATA_END_TAG_OPEN;break;case Rae.EXCLAMATION_MARK:this.state=_oe.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=_oe.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Aoe(e)?(this.state=_oe.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=_oe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=_oe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Rae.HYPHEN_MINUS?(this.state=_oe.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=_oe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Rae.HYPHEN_MINUS?(this.state=_oe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=_oe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.state=_oe.SCRIPT_DATA_ESCAPED,this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_oe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Rae.HYPHEN_MINUS:this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.SCRIPT_DATA,this._emitChars(">");break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.state=_oe.SCRIPT_DATA_ESCAPED,this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_oe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Rae.SOLIDUS?this.state=_oe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Aoe(e)?(this._emitChars("<"),this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=_oe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Aoe(e)?(this.state=_oe.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=_oe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=_oe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Fae,!1)&&Roe(this.preprocessor.peek(Fae.length))){this._emitCodePoint(e);for(let e=0;e<Fae.length;e++)this._emitCodePoint(this._consume());this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=_oe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Rae.HYPHEN_MINUS:this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Rae.GREATER_THAN_SIGN:this.state=_oe.SCRIPT_DATA,this._emitChars(">");break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Rae.SOLIDUS?(this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Fae,!1)&&Roe(this.preprocessor.peek(Fae.length))){this._emitCodePoint(e);for(let e=0;e<Fae.length;e++)this._emitCodePoint(this._consume());this.state=_oe.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.SOLIDUS:case Rae.GREATER_THAN_SIGN:case Rae.EOF:this.state=_oe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Rae.EQUALS_SIGN:this._err($ae.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=_oe.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=_oe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:case Rae.SOLIDUS:case Rae.GREATER_THAN_SIGN:case Rae.EOF:this._leaveAttrName(),this.state=_oe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Rae.EQUALS_SIGN:this._leaveAttrName(),this.state=_oe.BEFORE_ATTRIBUTE_VALUE;break;case Rae.QUOTATION_MARK:case Rae.APOSTROPHE:case Rae.LESS_THAN_SIGN:this._err($ae.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.currentAttr.name+=Oae;break;default:this.currentAttr.name+=String.fromCodePoint(Coe(e)?Ioe(e):e)}}_stateAfterAttributeName(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.SOLIDUS:this.state=_oe.SELF_CLOSING_START_TAG;break;case Rae.EQUALS_SIGN:this.state=_oe.BEFORE_ATTRIBUTE_VALUE;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentTagToken();break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=_oe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.QUOTATION_MARK:this.state=_oe.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:this.state=_oe.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Rae.GREATER_THAN_SIGN:this._err($ae.missingAttributeValue),this.state=_oe.DATA,this.emitCurrentTagToken();break;default:this.state=_oe.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Rae.QUOTATION_MARK:this.state=_oe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Rae.AMPERSAND:this._startCharacterReference();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.currentAttr.value+=Oae;break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Rae.APOSTROPHE:this.state=_oe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Rae.AMPERSAND:this._startCharacterReference();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.currentAttr.value+=Oae;break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this._leaveAttrValue(),this.state=_oe.BEFORE_ATTRIBUTE_NAME;break;case Rae.AMPERSAND:this._startCharacterReference();break;case Rae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=_oe.DATA,this.emitCurrentTagToken();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.currentAttr.value+=Oae;break;case Rae.QUOTATION_MARK:case Rae.APOSTROPHE:case Rae.LESS_THAN_SIGN:case Rae.EQUALS_SIGN:case Rae.GRAVE_ACCENT:this._err($ae.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this._leaveAttrValue(),this.state=_oe.BEFORE_ATTRIBUTE_NAME;break;case Rae.SOLIDUS:this._leaveAttrValue(),this.state=_oe.SELF_CLOSING_START_TAG;break;case Rae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=_oe.DATA,this.emitCurrentTagToken();break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this._err($ae.missingWhitespaceBetweenAttributes),this.state=_oe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Rae.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=_oe.DATA,this.emitCurrentTagToken();break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this._err($ae.unexpectedSolidusInTag),this.state=_oe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentComment(t);break;case Rae.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.data+=Oae;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Lae,!0)?(this._createCommentToken(Lae.length+1),this.state=_oe.COMMENT_START):this._consumeSequenceIfMatch(Mae,!1)?(this.currentLocation=this.getCurrentLocation(Mae.length+1),this.state=_oe.DOCTYPE):this._consumeSequenceIfMatch(Dae,!0)?this.inForeignNode?this.state=_oe.CDATA_SECTION:(this._err($ae.cdataInHtmlContent),this._createCommentToken(Dae.length+1),this.currentToken.data="[CDATA[",this.state=_oe.BOGUS_COMMENT):this._ensureHibernation()||(this._err($ae.incorrectlyOpenedComment),this._createCommentToken(2),this.state=_oe.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.COMMENT_START_DASH;break;case Rae.GREATER_THAN_SIGN:{this._err($ae.abruptClosingOfEmptyComment),this.state=_oe.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=_oe.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.COMMENT_END;break;case Rae.GREATER_THAN_SIGN:this._err($ae.abruptClosingOfEmptyComment),this.state=_oe.DATA,this.emitCurrentComment(t);break;case Rae.EOF:this._err($ae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=_oe.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.COMMENT_END_DASH;break;case Rae.LESS_THAN_SIGN:t.data+="<",this.state=_oe.COMMENT_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.data+=Oae;break;case Rae.EOF:this._err($ae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case Rae.EXCLAMATION_MARK:t.data+="!",this.state=_oe.COMMENT_LESS_THAN_SIGN_BANG;break;case Rae.LESS_THAN_SIGN:t.data+="<";break;default:this.state=_oe.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Rae.HYPHEN_MINUS?this.state=_oe.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=_oe.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Rae.HYPHEN_MINUS?this.state=_oe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=_oe.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Rae.GREATER_THAN_SIGN&&e!==Rae.EOF&&this._err($ae.nestedComment),this.state=_oe.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.COMMENT_END;break;case Rae.EOF:this._err($ae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=_oe.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentComment(t);break;case Rae.EXCLAMATION_MARK:this.state=_oe.COMMENT_END_BANG;break;case Rae.HYPHEN_MINUS:t.data+="-";break;case Rae.EOF:this._err($ae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=_oe.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case Rae.HYPHEN_MINUS:t.data+="--!",this.state=_oe.COMMENT_END_DASH;break;case Rae.GREATER_THAN_SIGN:this._err($ae.incorrectlyClosedComment),this.state=_oe.DATA,this.emitCurrentComment(t);break;case Rae.EOF:this._err($ae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=_oe.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.BEFORE_DOCTYPE_NAME;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Rae.EOF:{this._err($ae.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err($ae.missingWhitespaceBeforeDoctypeName),this.state=_oe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Coe(e))this._createDoctypeToken(String.fromCharCode(Ioe(e))),this.state=_oe.DOCTYPE_NAME;else switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._createDoctypeToken(Oae),this.state=_oe.DOCTYPE_NAME;break;case Rae.GREATER_THAN_SIGN:{this._err($ae.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=_oe.DATA;break}case Rae.EOF:{this._err($ae.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=_oe.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.AFTER_DOCTYPE_NAME;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.name+=Oae;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Coe(e)?Ioe(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(jae,!1)?this.state=_oe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(zae,!1)?this.state=_oe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err($ae.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Rae.QUOTATION_MARK:this._err($ae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=_oe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:this._err($ae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=_oe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Rae.GREATER_THAN_SIGN:this._err($ae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.QUOTATION_MARK:t.publicId="",this.state=_oe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:t.publicId="",this.state=_oe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Rae.GREATER_THAN_SIGN:this._err($ae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Rae.QUOTATION_MARK:this.state=_oe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.publicId+=Oae;break;case Rae.GREATER_THAN_SIGN:this._err($ae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Rae.APOSTROPHE:this.state=_oe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.publicId+=Oae;break;case Rae.GREATER_THAN_SIGN:this._err($ae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.QUOTATION_MARK:this._err($ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:this._err($ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.QUOTATION_MARK:t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Rae.QUOTATION_MARK:this._err($ae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:this._err($ae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Rae.GREATER_THAN_SIGN:this._err($ae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.QUOTATION_MARK:t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Rae.GREATER_THAN_SIGN:this._err($ae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Rae.QUOTATION_MARK:this.state=_oe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.systemId+=Oae;break;case Rae.GREATER_THAN_SIGN:this._err($ae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Rae.APOSTROPHE:this.state=_oe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.systemId+=Oae;break;case Rae.GREATER_THAN_SIGN:this._err($ae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case Rae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter);break;case Rae.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Rae.RIGHT_SQUARE_BRACKET:this.state=_oe.CDATA_SECTION_BRACKET;break;case Rae.EOF:this._err($ae.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Rae.RIGHT_SQUARE_BRACKET?this.state=_oe.CDATA_SECTION_END:(this._emitChars("]"),this.state=_oe.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA;break;case Rae.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=_oe.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(!this.preprocessor.lastChunkWritten)return this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,void(this.preprocessor.endOfChunkHit=!0);e=this.entityDecoder.end()}0===e?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(Rae.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Noe(this.preprocessor.peek(1))?_oe.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Noe(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Rae.SEMICOLON&&this._err($ae.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const Loe=new Set([foe.DD,foe.DT,foe.LI,foe.OPTGROUP,foe.OPTION,foe.P,foe.RB,foe.RP,foe.RT,foe.RTC]),Doe=new Set([...Loe,foe.CAPTION,foe.COLGROUP,foe.TBODY,foe.TD,foe.TFOOT,foe.TH,foe.THEAD,foe.TR]),Moe=new Set([foe.APPLET,foe.CAPTION,foe.HTML,foe.MARQUEE,foe.OBJECT,foe.TABLE,foe.TD,foe.TEMPLATE,foe.TH]),Foe=new Set([...Moe,foe.OL,foe.UL]),joe=new Set([...Moe,foe.BUTTON]),zoe=new Set([foe.ANNOTATION_XML,foe.MI,foe.MN,foe.MO,foe.MS,foe.MTEXT]),Boe=new Set([foe.DESC,foe.FOREIGN_OBJECT,foe.TITLE]),Hoe=new Set([foe.TR,foe.TEMPLATE,foe.HTML]),Uoe=new Set([foe.TBODY,foe.TFOOT,foe.THEAD,foe.TEMPLATE,foe.HTML]),$oe=new Set([foe.TABLE,foe.TEMPLATE,foe.HTML]),Voe=new Set([foe.TD,foe.TH]);class Goe{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=foe.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===foe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ooe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&void 0!==this.currentTagId&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==ooe.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Eoe,ooe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Voe,ooe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo($oe,ooe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Uoe,ooe.HTML)}clearBackToTableRowContext(){this.clearBackTo(Hoe,ooe.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===foe.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===foe.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case ooe.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case ooe.SVG:if(Boe.has(r))return!1;break;case ooe.MATHML:if(zoe.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Moe)}hasInListItemScope(e){return this.hasInDynamicScope(e,Foe)}hasInButtonScope(e){return this.hasInDynamicScope(e,joe)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case ooe.HTML:if(Eoe.has(t))return!0;if(Moe.has(t))return!1;break;case ooe.SVG:if(Boe.has(t))return!1;break;case ooe.MATHML:if(zoe.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ooe.HTML)switch(this.tagIDs[t]){case e:return!0;case foe.TABLE:case foe.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===ooe.HTML)switch(this.tagIDs[e]){case foe.TBODY:case foe.THEAD:case foe.TFOOT:return!0;case foe.TABLE:case foe.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ooe.HTML)switch(this.tagIDs[t]){case e:return!0;case foe.OPTION:case foe.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&Loe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&Doe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&Doe.has(this.currentTagId);)this.pop()}}var qoe,Woe;(Woe=qoe||(qoe={}))[Woe.Marker=0]="Marker",Woe[Woe.Element=1]="Element";const Yoe={type:qoe.Marker};class Zoe{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,a=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let i=0;i<this.entries.length;i++){const e=this.entries[i];if(e.type===qoe.Marker)break;const{element:t}=e;if(this.treeAdapter.getTagName(t)===a&&this.treeAdapter.getNamespaceURI(t)===o){const e=this.treeAdapter.getAttrList(t);e.length===r&&n.push({idx:i,attrs:e})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;const r=new Map(t.map((e=>[e.name,e.value])));let a=0;for(let o=0;o<n.length;o++){const e=n[o];e.attrs.every((e=>r.get(e.name)===e.value))&&(a+=1,a>=3&&this.entries.splice(e.idx,1))}}insertMarker(){this.entries.unshift(Yoe)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:qoe.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:qoe.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);-1!==t&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(Yoe);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===qoe.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===qoe.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===qoe.Element&&t.element===e))}}const Koe={createDocument:()=>({nodeName:"#document",mode:coe.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),createTextNode:e=>({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=>e.content,setDocumentType(e,t,n,r){const a=e.childNodes.find((e=>"#documentType"===e.nodeName));if(a)a.name=t,a.publicId=n,a.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Koe.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>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(Koe.isTextNode(n))return void(n.value+=t)}Koe.appendChild(e,Koe.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Koe.isTextNode(r)?r.value+=t:Koe.insertBefore(e,Koe.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Xoe="html",Qoe=["+//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//"],Joe=[...Qoe,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],eie=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),tie=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],nie=[...tie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function rie(e,t){return t.some((t=>e.startsWith(t)))}const aie="text/html",oie="application/xhtml+xml",iie=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]))),sie=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ooe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ooe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ooe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ooe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ooe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ooe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ooe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ooe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ooe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ooe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ooe.XMLNS}]]),lie=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]))),cie=new Set([foe.B,foe.BIG,foe.BLOCKQUOTE,foe.BODY,foe.BR,foe.CENTER,foe.CODE,foe.DD,foe.DIV,foe.DL,foe.DT,foe.EM,foe.EMBED,foe.H1,foe.H2,foe.H3,foe.H4,foe.H5,foe.H6,foe.HEAD,foe.HR,foe.I,foe.IMG,foe.LI,foe.LISTING,foe.MENU,foe.META,foe.NOBR,foe.OL,foe.P,foe.PRE,foe.RUBY,foe.S,foe.SMALL,foe.SPAN,foe.STRONG,foe.STRIKE,foe.SUB,foe.SUP,foe.TABLE,foe.TT,foe.U,foe.UL,foe.VAR]);function uie(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function die(e){for(let t=0;t<e.attrs.length;t++){const n=iie.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function pie(e){for(let t=0;t<e.attrs.length;t++){const n=sie.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 fie(e,t,n,r){return(!r||r===ooe.HTML)&&function(e,t,n){if(t===ooe.MATHML&&e===foe.ANNOTATION_XML)for(let r=0;r<n.length;r++)if(n[r].name===soe.ENCODING){const e=n[r].value.toLowerCase();return e===aie||e===oie}return t===ooe.SVG&&(e===foe.FOREIGN_OBJECT||e===foe.DESC||e===foe.TITLE)}(e,t,n)||(!r||r===ooe.MATHML)&&function(e,t){return t===ooe.MATHML&&(e===foe.MI||e===foe.MO||e===foe.MN||e===foe.MS||e===foe.MTEXT)}(e,t)}var hie,mie;(mie=hie||(hie={}))[mie.INITIAL=0]="INITIAL",mie[mie.BEFORE_HTML=1]="BEFORE_HTML",mie[mie.BEFORE_HEAD=2]="BEFORE_HEAD",mie[mie.IN_HEAD=3]="IN_HEAD",mie[mie.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",mie[mie.AFTER_HEAD=5]="AFTER_HEAD",mie[mie.IN_BODY=6]="IN_BODY",mie[mie.TEXT=7]="TEXT",mie[mie.IN_TABLE=8]="IN_TABLE",mie[mie.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",mie[mie.IN_CAPTION=10]="IN_CAPTION",mie[mie.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",mie[mie.IN_TABLE_BODY=12]="IN_TABLE_BODY",mie[mie.IN_ROW=13]="IN_ROW",mie[mie.IN_CELL=14]="IN_CELL",mie[mie.IN_SELECT=15]="IN_SELECT",mie[mie.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",mie[mie.IN_TEMPLATE=17]="IN_TEMPLATE",mie[mie.AFTER_BODY=18]="AFTER_BODY",mie[mie.IN_FRAMESET=19]="IN_FRAMESET",mie[mie.AFTER_FRAMESET=20]="AFTER_FRAMESET",mie[mie.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",mie[mie.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";const gie={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},yie=new Set([foe.TABLE,foe.TBODY,foe.TFOOT,foe.THEAD,foe.TR]),bie={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Koe,onParseError:null};class vie{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=hie.INITIAL,this.originalInsertionMode=hie.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={...bie,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new Poe(this.options,this),this.activeFormattingElements=new Zoe(this.treeAdapter),this.fragmentContextID=n?koe(this.treeAdapter.getTagName(n)):foe.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new Goe(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n={...bie,...t};null!=e||(e=n.treeAdapter.createElement(doe.TEMPLATE,ooe.HTML,[]));const r=n.treeAdapter.createElement("documentmock",ooe.HTML,[]),a=new this(n,r,e);return a.fragmentContextID===foe.TEMPLATE&&a.tmplInsertionModeStack.unshift(hie.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const a=null!==(r=e.location)&&void 0!==r?r:gie,o={code:t,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(e,t,n){var r,a;null===(a=(r=this.treeAdapter).onItemPush)||void 0===a||a.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===ooe.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,ooe.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=hie.TEXT}switchToPlaintextParsing(){this.insertionMode=hie.TEXT,this.originalInsertionMode=hie.IN_BODY,this.tokenizer.state=Toe.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===doe.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===ooe.HTML)switch(this.fragmentContextID){case foe.TITLE:case foe.TEXTAREA:this.tokenizer.state=Toe.RCDATA;break;case foe.STYLE:case foe.XMP:case foe.IFRAME:case foe.NOEMBED:case foe.NOFRAMES:case foe.NOSCRIPT:this.tokenizer.state=Toe.RAWTEXT;break;case foe.SCRIPT:this.tokenizer.state=Toe.SCRIPT_DATA;break;case foe.PLAINTEXT:this.tokenizer.state=Toe.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(null!=t?t:this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,ooe.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,ooe.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(doe.HTML,ooe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,foe.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),a=n?r.lastIndexOf(n):r.length,o=r[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),a=t.type===qae.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==foe.SVG||this.treeAdapter.getTagName(t)!==doe.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==ooe.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===foe.MGLYPH||e.tagID===foe.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,ooe.HTML))}_processToken(e){switch(e.type){case qae.CHARACTER:this.onCharacter(e);break;case qae.NULL_CHARACTER:this.onNullCharacter(e);break;case qae.COMMENT:this.onComment(e);break;case qae.DOCTYPE:this.onDoctype(e);break;case qae.START_TAG:this._processStartTag(e);break;case qae.END_TAG:this.onEndTag(e);break;case qae.EOF:this.onEof(e);break;case qae.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return fie(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===qoe.Marker||this.openElements.contains(e.element)));for(let n=-1===t?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=hie.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(foe.P),this.openElements.popUntilTagNamePopped(foe.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case foe.TR:return void(this.insertionMode=hie.IN_ROW);case foe.TBODY:case foe.THEAD:case foe.TFOOT:return void(this.insertionMode=hie.IN_TABLE_BODY);case foe.CAPTION:return void(this.insertionMode=hie.IN_CAPTION);case foe.COLGROUP:return void(this.insertionMode=hie.IN_COLUMN_GROUP);case foe.TABLE:return void(this.insertionMode=hie.IN_TABLE);case foe.BODY:return void(this.insertionMode=hie.IN_BODY);case foe.FRAMESET:return void(this.insertionMode=hie.IN_FRAMESET);case foe.SELECT:return void this._resetInsertionModeForSelect(e);case foe.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case foe.HTML:return void(this.insertionMode=this.headElement?hie.AFTER_HEAD:hie.BEFORE_HEAD);case foe.TD:case foe.TH:if(e>0)return void(this.insertionMode=hie.IN_CELL);break;case foe.HEAD:if(e>0)return void(this.insertionMode=hie.IN_HEAD)}this.insertionMode=hie.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===foe.TEMPLATE)break;if(e===foe.TABLE)return void(this.insertionMode=hie.IN_SELECT_IN_TABLE)}this.insertionMode=hie.IN_SELECT}_isElementCausesFosterParenting(e){return yie.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&void 0!==this.openElements.currentTagId&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case foe.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===ooe.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case foe.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return woe[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case hie.INITIAL:Nie(this,e);break;case hie.BEFORE_HTML:Iie(this,e);break;case hie.BEFORE_HEAD:Oie(this,e);break;case hie.IN_HEAD:Lie(this,e);break;case hie.IN_HEAD_NO_SCRIPT:Die(this,e);break;case hie.AFTER_HEAD:Mie(this,e);break;case hie.IN_BODY:case hie.IN_CAPTION:case hie.IN_CELL:case hie.IN_TEMPLATE:zie(this,e);break;case hie.TEXT:case hie.IN_SELECT:case hie.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case hie.IN_TABLE:case hie.IN_TABLE_BODY:case hie.IN_ROW:Yie(this,e);break;case hie.IN_TABLE_TEXT:Jie(this,e);break;case hie.IN_COLUMN_GROUP:rse(this,e);break;case hie.AFTER_BODY:pse(this,e);break;case hie.AFTER_AFTER_BODY:fse(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=Oae,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case hie.INITIAL:Nie(this,e);break;case hie.BEFORE_HTML:Iie(this,e);break;case hie.BEFORE_HEAD:Oie(this,e);break;case hie.IN_HEAD:Lie(this,e);break;case hie.IN_HEAD_NO_SCRIPT:Die(this,e);break;case hie.AFTER_HEAD:Mie(this,e);break;case hie.TEXT:this._insertCharacters(e);break;case hie.IN_TABLE:case hie.IN_TABLE_BODY:case hie.IN_ROW:Yie(this,e);break;case hie.IN_COLUMN_GROUP:rse(this,e);break;case hie.AFTER_BODY:pse(this,e);break;case hie.AFTER_AFTER_BODY:fse(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Cie(this,e);else switch(this.insertionMode){case hie.INITIAL:case hie.BEFORE_HTML:case hie.BEFORE_HEAD:case hie.IN_HEAD:case hie.IN_HEAD_NO_SCRIPT:case hie.AFTER_HEAD:case hie.IN_BODY:case hie.IN_TABLE:case hie.IN_CAPTION:case hie.IN_COLUMN_GROUP:case hie.IN_TABLE_BODY:case hie.IN_ROW:case hie.IN_CELL:case hie.IN_SELECT:case hie.IN_SELECT_IN_TABLE:case hie.IN_TEMPLATE:case hie.IN_FRAMESET:case hie.AFTER_FRAMESET:Cie(this,e);break;case hie.IN_TABLE_TEXT:ese(this,e);break;case hie.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case hie.AFTER_AFTER_BODY:case hie.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case hie.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?coe.QUIRKS:function(e){if(e.name!==Xoe)return coe.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return coe.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),eie.has(n))return coe.QUIRKS;let e=null===t?Joe:Qoe;if(rie(n,e))return coe.QUIRKS;if(e=null===t?tie:nie,rie(n,e))return coe.LIMITED_QUIRKS}return coe.NO_QUIRKS}(t);(function(e){return e.name===Xoe&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,$ae.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=hie.BEFORE_HTML}(this,e);break;case hie.BEFORE_HEAD:case hie.IN_HEAD:case hie.IN_HEAD_NO_SCRIPT:case hie.AFTER_HEAD:this._err(e,$ae.misplacedDoctype);break;case hie.IN_TABLE_TEXT:ese(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,$ae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID;return t===foe.FONT&&e.attrs.some((({name:e})=>e===soe.COLOR||e===soe.SIZE||e===soe.FACE))||cie.has(t)}(t))hse(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ooe.MATHML?uie(t):r===ooe.SVG&&(!function(e){const t=lie.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=koe(e.tagName))}(t),die(t)),pie(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case hie.INITIAL:Nie(this,e);break;case hie.BEFORE_HTML:!function(e,t){t.tagID===foe.HTML?(e._insertElement(t,ooe.HTML),e.insertionMode=hie.BEFORE_HEAD):Iie(e,t)}(this,e);break;case hie.BEFORE_HEAD:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.HEAD:e._insertElement(t,ooe.HTML),e.headElement=e.openElements.current,e.insertionMode=hie.IN_HEAD;break;default:Oie(e,t)}}(this,e);break;case hie.IN_HEAD:Rie(this,e);break;case hie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.BASEFONT:case foe.BGSOUND:case foe.HEAD:case foe.LINK:case foe.META:case foe.NOFRAMES:case foe.STYLE:Rie(e,t);break;case foe.NOSCRIPT:e._err(t,$ae.nestedNoscriptInHead);break;default:Die(e,t)}}(this,e);break;case hie.AFTER_HEAD:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.BODY:e._insertElement(t,ooe.HTML),e.framesetOk=!1,e.insertionMode=hie.IN_BODY;break;case foe.FRAMESET:e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_FRAMESET;break;case foe.BASE:case foe.BASEFONT:case foe.BGSOUND:case foe.LINK:case foe.META:case foe.NOFRAMES:case foe.SCRIPT:case foe.STYLE:case foe.TEMPLATE:case foe.TITLE:e._err(t,$ae.abandonedHeadElementChild),e.openElements.push(e.headElement,foe.HEAD),Rie(e,t),e.openElements.remove(e.headElement);break;case foe.HEAD:e._err(t,$ae.misplacedStartTagForHeadElement);break;default:Mie(e,t)}}(this,e);break;case hie.IN_BODY:Vie(this,e);break;case hie.IN_TABLE:Zie(this,e);break;case hie.IN_TABLE_TEXT:ese(this,e);break;case hie.IN_CAPTION:!function(e,t){const n=t.tagID;tse.has(n)?e.openElements.hasInTableScope(foe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(foe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=hie.IN_TABLE,Zie(e,t)):Vie(e,t)}(this,e);break;case hie.IN_COLUMN_GROUP:nse(this,e);break;case hie.IN_TABLE_BODY:ase(this,e);break;case hie.IN_ROW:ise(this,e);break;case hie.IN_CELL:!function(e,t){const n=t.tagID;tse.has(n)?(e.openElements.hasInTableScope(foe.TD)||e.openElements.hasInTableScope(foe.TH))&&(e._closeTableCell(),ise(e,t)):Vie(e,t)}(this,e);break;case hie.IN_SELECT:lse(this,e);break;case hie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===foe.CAPTION||n===foe.TABLE||n===foe.TBODY||n===foe.TFOOT||n===foe.THEAD||n===foe.TR||n===foe.TD||n===foe.TH?(e.openElements.popUntilTagNamePopped(foe.SELECT),e._resetInsertionMode(),e._processStartTag(t)):lse(e,t)}(this,e);break;case hie.IN_TEMPLATE:!function(e,t){switch(t.tagID){case foe.BASE:case foe.BASEFONT:case foe.BGSOUND:case foe.LINK:case foe.META:case foe.NOFRAMES:case foe.SCRIPT:case foe.STYLE:case foe.TEMPLATE:case foe.TITLE:Rie(e,t);break;case foe.CAPTION:case foe.COLGROUP:case foe.TBODY:case foe.TFOOT:case foe.THEAD:e.tmplInsertionModeStack[0]=hie.IN_TABLE,e.insertionMode=hie.IN_TABLE,Zie(e,t);break;case foe.COL:e.tmplInsertionModeStack[0]=hie.IN_COLUMN_GROUP,e.insertionMode=hie.IN_COLUMN_GROUP,nse(e,t);break;case foe.TR:e.tmplInsertionModeStack[0]=hie.IN_TABLE_BODY,e.insertionMode=hie.IN_TABLE_BODY,ase(e,t);break;case foe.TD:case foe.TH:e.tmplInsertionModeStack[0]=hie.IN_ROW,e.insertionMode=hie.IN_ROW,ise(e,t);break;default:e.tmplInsertionModeStack[0]=hie.IN_BODY,e.insertionMode=hie.IN_BODY,Vie(e,t)}}(this,e);break;case hie.AFTER_BODY:!function(e,t){t.tagID===foe.HTML?Vie(e,t):pse(e,t)}(this,e);break;case hie.IN_FRAMESET:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.FRAMESET:e._insertElement(t,ooe.HTML);break;case foe.FRAME:e._appendElement(t,ooe.HTML),t.ackSelfClosing=!0;break;case foe.NOFRAMES:Rie(e,t)}}(this,e);break;case hie.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.NOFRAMES:Rie(e,t)}}(this,e);break;case hie.AFTER_AFTER_BODY:!function(e,t){t.tagID===foe.HTML?Vie(e,t):fse(e,t)}(this,e);break;case hie.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.NOFRAMES:Rie(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===foe.P||t.tagID===foe.BR)return hse(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ooe.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case hie.INITIAL:Nie(this,e);break;case hie.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==foe.HTML&&n!==foe.HEAD&&n!==foe.BODY&&n!==foe.BR||Iie(e,t)}(this,e);break;case hie.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===foe.HEAD||n===foe.BODY||n===foe.HTML||n===foe.BR?Oie(e,t):e._err(t,$ae.endTagWithoutMatchingOpenElement)}(this,e);break;case hie.IN_HEAD:!function(e,t){switch(t.tagID){case foe.HEAD:e.openElements.pop(),e.insertionMode=hie.AFTER_HEAD;break;case foe.BODY:case foe.BR:case foe.HTML:Lie(e,t);break;case foe.TEMPLATE:Pie(e,t);break;default:e._err(t,$ae.endTagWithoutMatchingOpenElement)}}(this,e);break;case hie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case foe.NOSCRIPT:e.openElements.pop(),e.insertionMode=hie.IN_HEAD;break;case foe.BR:Die(e,t);break;default:e._err(t,$ae.endTagWithoutMatchingOpenElement)}}(this,e);break;case hie.AFTER_HEAD:!function(e,t){switch(t.tagID){case foe.BODY:case foe.HTML:case foe.BR:Mie(e,t);break;case foe.TEMPLATE:Pie(e,t);break;default:e._err(t,$ae.endTagWithoutMatchingOpenElement)}}(this,e);break;case hie.IN_BODY:qie(this,e);break;case hie.TEXT:!function(e,t){var n;t.tagID===foe.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current));e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case hie.IN_TABLE:Kie(this,e);break;case hie.IN_TABLE_TEXT:ese(this,e);break;case hie.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case foe.CAPTION:case foe.TABLE:e.openElements.hasInTableScope(foe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(foe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=hie.IN_TABLE,n===foe.TABLE&&Kie(e,t));break;case foe.BODY:case foe.COL:case foe.COLGROUP:case foe.HTML:case foe.TBODY:case foe.TD:case foe.TFOOT:case foe.TH:case foe.THEAD:case foe.TR:break;default:qie(e,t)}}(this,e);break;case hie.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case foe.COLGROUP:e.openElements.currentTagId===foe.COLGROUP&&(e.openElements.pop(),e.insertionMode=hie.IN_TABLE);break;case foe.TEMPLATE:Pie(e,t);break;case foe.COL:break;default:rse(e,t)}}(this,e);break;case hie.IN_TABLE_BODY:ose(this,e);break;case hie.IN_ROW:sse(this,e);break;case hie.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case foe.TD:case foe.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=hie.IN_ROW);break;case foe.TABLE:case foe.TBODY:case foe.TFOOT:case foe.THEAD:case foe.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),sse(e,t));break;case foe.BODY:case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.HTML:break;default:qie(e,t)}}(this,e);break;case hie.IN_SELECT:cse(this,e);break;case hie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===foe.CAPTION||n===foe.TABLE||n===foe.TBODY||n===foe.TFOOT||n===foe.THEAD||n===foe.TR||n===foe.TD||n===foe.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(foe.SELECT),e._resetInsertionMode(),e.onEndTag(t)):cse(e,t)}(this,e);break;case hie.IN_TEMPLATE:!function(e,t){t.tagID===foe.TEMPLATE&&Pie(e,t)}(this,e);break;case hie.AFTER_BODY:dse(this,e);break;case hie.IN_FRAMESET:!function(e,t){t.tagID!==foe.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===foe.FRAMESET||(e.insertionMode=hie.AFTER_FRAMESET))}(this,e);break;case hie.AFTER_FRAMESET:!function(e,t){t.tagID===foe.HTML&&(e.insertionMode=hie.AFTER_AFTER_FRAMESET)}(this,e);break;case hie.AFTER_AFTER_BODY:fse(this,e)}}onEof(e){switch(this.insertionMode){case hie.INITIAL:Nie(this,e);break;case hie.BEFORE_HTML:Iie(this,e);break;case hie.BEFORE_HEAD:Oie(this,e);break;case hie.IN_HEAD:Lie(this,e);break;case hie.IN_HEAD_NO_SCRIPT:Die(this,e);break;case hie.AFTER_HEAD:Mie(this,e);break;case hie.IN_BODY:case hie.IN_TABLE:case hie.IN_CAPTION:case hie.IN_COLUMN_GROUP:case hie.IN_TABLE_BODY:case hie.IN_ROW:case hie.IN_CELL:case hie.IN_SELECT:case hie.IN_SELECT_IN_TABLE:Wie(this,e);break;case hie.TEXT:!function(e,t){e._err(t,$ae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case hie.IN_TABLE_TEXT:ese(this,e);break;case hie.IN_TEMPLATE:use(this,e);break;case hie.AFTER_BODY:case hie.IN_FRAMESET:case hie.AFTER_FRAMESET:case hie.AFTER_AFTER_BODY:case hie.AFTER_AFTER_FRAMESET:Aie(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Rae.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case hie.IN_HEAD:case hie.IN_HEAD_NO_SCRIPT:case hie.AFTER_HEAD:case hie.TEXT:case hie.IN_COLUMN_GROUP:case hie.IN_SELECT:case hie.IN_SELECT_IN_TABLE:case hie.IN_FRAMESET:case hie.AFTER_FRAMESET:this._insertCharacters(e);break;case hie.IN_BODY:case hie.IN_CAPTION:case hie.IN_CELL:case hie.IN_TEMPLATE:case hie.AFTER_BODY:case hie.AFTER_AFTER_BODY:case hie.AFTER_AFTER_FRAMESET:jie(this,e);break;case hie.IN_TABLE:case hie.IN_TABLE_BODY:case hie.IN_ROW:Yie(this,e);break;case hie.IN_TABLE_TEXT:Qie(this,e)}}}function kie(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):Gie(e,t),n}function xie(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function wie(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let o=0,i=a;i!==n;o++,i=a){a=e.openElements.getCommonAncestor(i);const n=e.activeFormattingElements.getElementEntry(i),s=n&&o>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(i)):(i=Eie(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function Eie(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 _ie(e,t,n){const r=koe(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);r===foe.TEMPLATE&&a===ooe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Sie(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function Tie(e,t){for(let n=0;n<8;n++){const n=kie(e,t);if(!n)break;const r=xie(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const a=wie(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&_ie(e,o,a),Sie(e,r,n)}}function Cie(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Aie(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 n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Nie(e,t){e._err(t,$ae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,coe.QUIRKS),e.insertionMode=hie.BEFORE_HTML,e._processToken(t)}function Iie(e,t){e._insertFakeRootElement(),e.insertionMode=hie.BEFORE_HEAD,e._processToken(t)}function Oie(e,t){e._insertFakeElement(doe.HEAD,foe.HEAD),e.headElement=e.openElements.current,e.insertionMode=hie.IN_HEAD,e._processToken(t)}function Rie(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.BASE:case foe.BASEFONT:case foe.BGSOUND:case foe.LINK:case foe.META:e._appendElement(t,ooe.HTML),t.ackSelfClosing=!0;break;case foe.TITLE:e._switchToTextParsing(t,Toe.RCDATA);break;case foe.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Toe.RAWTEXT):(e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_HEAD_NO_SCRIPT);break;case foe.NOFRAMES:case foe.STYLE:e._switchToTextParsing(t,Toe.RAWTEXT);break;case foe.SCRIPT:e._switchToTextParsing(t,Toe.SCRIPT_DATA);break;case foe.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=hie.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(hie.IN_TEMPLATE);break;case foe.HEAD:e._err(t,$ae.misplacedStartTagForHeadElement);break;default:Lie(e,t)}}function Pie(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==foe.TEMPLATE&&e._err(t,$ae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(foe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,$ae.endTagWithoutMatchingOpenElement)}function Lie(e,t){e.openElements.pop(),e.insertionMode=hie.AFTER_HEAD,e._processToken(t)}function Die(e,t){const n=t.type===qae.EOF?$ae.openElementsLeftAfterEof:$ae.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=hie.IN_HEAD,e._processToken(t)}function Mie(e,t){e._insertFakeElement(doe.BODY,foe.BODY),e.insertionMode=hie.IN_BODY,Fie(e,t)}function Fie(e,t){switch(t.type){case qae.CHARACTER:zie(e,t);break;case qae.WHITESPACE_CHARACTER:jie(e,t);break;case qae.COMMENT:Cie(e,t);break;case qae.START_TAG:Vie(e,t);break;case qae.END_TAG:qie(e,t);break;case qae.EOF:Wie(e,t)}}function jie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function zie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Bie(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ooe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Hie(e){const t=Yae(e,soe.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function Uie(e,t){e._switchToTextParsing(t,Toe.RAWTEXT)}function $ie(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML)}function Vie(e,t){switch(t.tagID){case foe.I:case foe.S:case foe.B:case foe.U:case foe.EM:case foe.TT:case foe.BIG:case foe.CODE:case foe.FONT:case foe.SMALL:case foe.STRIKE:case foe.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case foe.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(doe.A);n&&(Tie(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case foe.H1:case foe.H2:case foe.H3:case foe.H4:case foe.H5:case foe.H6:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&Eoe.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.P:case foe.DL:case foe.OL:case foe.UL:case foe.DIV:case foe.DIR:case foe.NAV:case foe.MAIN:case foe.MENU:case foe.ASIDE:case foe.CENTER:case foe.FIGURE:case foe.FOOTER:case foe.HEADER:case foe.HGROUP:case foe.DIALOG:case foe.DETAILS:case foe.ADDRESS:case foe.ARTICLE:case foe.SEARCH:case foe.SECTION:case foe.SUMMARY:case foe.FIELDSET:case foe.BLOCKQUOTE:case foe.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.LI:case foe.DD:case foe.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const t=e.openElements.tagIDs[r];if(n===foe.LI&&t===foe.LI||(n===foe.DD||n===foe.DT)&&(t===foe.DD||t===foe.DT)){e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t);break}if(t!==foe.ADDRESS&&t!==foe.DIV&&t!==foe.P&&e._isSpecialElement(e.openElements.items[r],t))break}e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.BR:case foe.IMG:case foe.WBR:case foe.AREA:case foe.EMBED:case foe.KEYGEN:Bie(e,t);break;case foe.HR:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._appendElement(t,ooe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case foe.RB:case foe.RTC:!function(e,t){e.openElements.hasInScope(foe.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.RT:case foe.RP:!function(e,t){e.openElements.hasInScope(foe.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(foe.RTC),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.PRE:case foe.LISTING:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case foe.XMP:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Toe.RAWTEXT)}(e,t);break;case foe.SVG:!function(e,t){e._reconstructActiveFormattingElements(),die(t),pie(t),t.selfClosing?e._appendElement(t,ooe.SVG):e._insertElement(t,ooe.SVG),t.ackSelfClosing=!0}(e,t);break;case foe.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case foe.BASE:case foe.LINK:case foe.META:case foe.STYLE:case foe.TITLE:case foe.SCRIPT:case foe.BGSOUND:case foe.BASEFONT:case foe.TEMPLATE:Rie(e,t);break;case foe.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case foe.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case foe.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(foe.NOBR)&&(Tie(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ooe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case foe.MATH:!function(e,t){e._reconstructActiveFormattingElements(),uie(t),pie(t),t.selfClosing?e._appendElement(t,ooe.MATHML):e._insertElement(t,ooe.MATHML),t.ackSelfClosing=!0}(e,t);break;case foe.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==coe.QUIRKS&&e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML),e.framesetOk=!1,e.insertionMode=hie.IN_TABLE}(e,t);break;case foe.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ooe.HTML),Hie(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case foe.PARAM:case foe.TRACK:case foe.SOURCE:!function(e,t){e._appendElement(t,ooe.HTML),t.ackSelfClosing=!0}(e,t);break;case foe.IMAGE:!function(e,t){t.tagName=doe.IMG,t.tagID=foe.IMG,Bie(e,t)}(e,t);break;case foe.BUTTON:!function(e,t){e.openElements.hasInScope(foe.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(foe.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML),e.framesetOk=!1}(e,t);break;case foe.APPLET:case foe.OBJECT:case foe.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case foe.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Toe.RAWTEXT)}(e,t);break;case foe.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===hie.IN_TABLE||e.insertionMode===hie.IN_CAPTION||e.insertionMode===hie.IN_TABLE_BODY||e.insertionMode===hie.IN_ROW||e.insertionMode===hie.IN_CELL?hie.IN_SELECT_IN_TABLE:hie.IN_SELECT}(e,t);break;case foe.OPTION:case foe.OPTGROUP:!function(e,t){e.openElements.currentTagId===foe.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.NOEMBED:case foe.NOFRAMES:Uie(e,t);break;case foe.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_FRAMESET)}(e,t);break;case foe.TEXTAREA:!function(e,t){e._insertElement(t,ooe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Toe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=hie.TEXT}(e,t);break;case foe.NOSCRIPT:e.options.scriptingEnabled?Uie(e,t):$ie(e,t);break;case foe.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML),e.tokenizer.state=Toe.PLAINTEXT}(e,t);break;case foe.COL:case foe.TH:case foe.TD:case foe.TR:case foe.HEAD:case foe.FRAME:case foe.TBODY:case foe.TFOOT:case foe.THEAD:case foe.CAPTION:case foe.COLGROUP:break;default:$ie(e,t)}}function Gie(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const t=e.openElements.items[a],o=e.openElements.tagIDs[a];if(r===o&&(r!==foe.UNKNOWN||e.treeAdapter.getTagName(t)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(t,o))break}}function qie(e,t){switch(t.tagID){case foe.A:case foe.B:case foe.I:case foe.S:case foe.U:case foe.EM:case foe.TT:case foe.BIG:case foe.CODE:case foe.FONT:case foe.NOBR:case foe.SMALL:case foe.STRIKE:case foe.STRONG:Tie(e,t);break;case foe.P:!function(e){e.openElements.hasInButtonScope(foe.P)||e._insertFakeElement(doe.P,foe.P),e._closePElement()}(e);break;case foe.DL:case foe.UL:case foe.OL:case foe.DIR:case foe.DIV:case foe.NAV:case foe.PRE:case foe.MAIN:case foe.MENU:case foe.ASIDE:case foe.BUTTON:case foe.CENTER:case foe.FIGURE:case foe.FOOTER:case foe.HEADER:case foe.HGROUP:case foe.DIALOG:case foe.ADDRESS:case foe.ARTICLE:case foe.DETAILS:case foe.SEARCH:case foe.SECTION:case foe.SUMMARY:case foe.LISTING:case foe.FIELDSET:case foe.BLOCKQUOTE:case foe.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case foe.LI:!function(e){e.openElements.hasInListItemScope(foe.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(foe.LI),e.openElements.popUntilTagNamePopped(foe.LI))}(e);break;case foe.DD:case foe.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case foe.H1:case foe.H2:case foe.H3:case foe.H4:case foe.H5:case foe.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case foe.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(doe.BR,foe.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case foe.BODY:!function(e,t){if(e.openElements.hasInScope(foe.BODY)&&(e.insertionMode=hie.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case foe.HTML:!function(e,t){e.openElements.hasInScope(foe.BODY)&&(e.insertionMode=hie.AFTER_BODY,dse(e,t))}(e,t);break;case foe.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(foe.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(foe.FORM):n&&e.openElements.remove(n))}(e);break;case foe.APPLET:case foe.OBJECT:case foe.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case foe.TEMPLATE:Pie(e,t);break;default:Gie(e,t)}}function Wie(e,t){e.tmplInsertionModeStack.length>0?use(e,t):Aie(e,t)}function Yie(e,t){if(void 0!==e.openElements.currentTagId&&yie.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=hie.IN_TABLE_TEXT,t.type){case qae.CHARACTER:Jie(e,t);break;case qae.WHITESPACE_CHARACTER:Qie(e,t)}else Xie(e,t)}function Zie(e,t){switch(t.tagID){case foe.TD:case foe.TH:case foe.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(doe.TBODY,foe.TBODY),e.insertionMode=hie.IN_TABLE_BODY,ase(e,t)}(e,t);break;case foe.STYLE:case foe.SCRIPT:case foe.TEMPLATE:Rie(e,t);break;case foe.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(doe.COLGROUP,foe.COLGROUP),e.insertionMode=hie.IN_COLUMN_GROUP,nse(e,t)}(e,t);break;case foe.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,ooe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case foe.TABLE:!function(e,t){e.openElements.hasInTableScope(foe.TABLE)&&(e.openElements.popUntilTagNamePopped(foe.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case foe.TBODY:case foe.TFOOT:case foe.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_TABLE_BODY}(e,t);break;case foe.INPUT:!function(e,t){Hie(t)?e._appendElement(t,ooe.HTML):Xie(e,t),t.ackSelfClosing=!0}(e,t);break;case foe.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_CAPTION}(e,t);break;case foe.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_COLUMN_GROUP}(e,t);break;default:Xie(e,t)}}function Kie(e,t){switch(t.tagID){case foe.TABLE:e.openElements.hasInTableScope(foe.TABLE)&&(e.openElements.popUntilTagNamePopped(foe.TABLE),e._resetInsertionMode());break;case foe.TEMPLATE:Pie(e,t);break;case foe.BODY:case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.HTML:case foe.TBODY:case foe.TD:case foe.TFOOT:case foe.TH:case foe.THEAD:case foe.TR:break;default:Xie(e,t)}}function Xie(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Fie(e,t),e.fosterParentingEnabled=n}function Qie(e,t){e.pendingCharacterTokens.push(t)}function Jie(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ese(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Xie(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const tse=new Set([foe.CAPTION,foe.COL,foe.COLGROUP,foe.TBODY,foe.TD,foe.TFOOT,foe.TH,foe.THEAD,foe.TR]);function nse(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.COL:e._appendElement(t,ooe.HTML),t.ackSelfClosing=!0;break;case foe.TEMPLATE:Rie(e,t);break;default:rse(e,t)}}function rse(e,t){e.openElements.currentTagId===foe.COLGROUP&&(e.openElements.pop(),e.insertionMode=hie.IN_TABLE,e._processToken(t))}function ase(e,t){switch(t.tagID){case foe.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_ROW;break;case foe.TH:case foe.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(doe.TR,foe.TR),e.insertionMode=hie.IN_ROW,ise(e,t);break;case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.TBODY:case foe.TFOOT:case foe.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE,Zie(e,t));break;default:Zie(e,t)}}function ose(e,t){const n=t.tagID;switch(t.tagID){case foe.TBODY:case foe.TFOOT:case foe.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE);break;case foe.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE,Kie(e,t));break;case foe.BODY:case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.HTML:case foe.TD:case foe.TH:case foe.TR:break;default:Kie(e,t)}}function ise(e,t){switch(t.tagID){case foe.TH:case foe.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_CELL,e.activeFormattingElements.insertMarker();break;case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.TBODY:case foe.TFOOT:case foe.THEAD:case foe.TR:e.openElements.hasInTableScope(foe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE_BODY,ase(e,t));break;default:Zie(e,t)}}function sse(e,t){switch(t.tagID){case foe.TR:e.openElements.hasInTableScope(foe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE_BODY);break;case foe.TABLE:e.openElements.hasInTableScope(foe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE_BODY,ose(e,t));break;case foe.TBODY:case foe.TFOOT:case foe.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(foe.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE_BODY,ose(e,t));break;case foe.BODY:case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.HTML:case foe.TD:case foe.TH:break;default:Kie(e,t)}}function lse(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.OPTION:e.openElements.currentTagId===foe.OPTION&&e.openElements.pop(),e._insertElement(t,ooe.HTML);break;case foe.OPTGROUP:e.openElements.currentTagId===foe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===foe.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ooe.HTML);break;case foe.HR:e.openElements.currentTagId===foe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===foe.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ooe.HTML),t.ackSelfClosing=!0;break;case foe.INPUT:case foe.KEYGEN:case foe.TEXTAREA:case foe.SELECT:e.openElements.hasInSelectScope(foe.SELECT)&&(e.openElements.popUntilTagNamePopped(foe.SELECT),e._resetInsertionMode(),t.tagID!==foe.SELECT&&e._processStartTag(t));break;case foe.SCRIPT:case foe.TEMPLATE:Rie(e,t)}}function cse(e,t){switch(t.tagID){case foe.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===foe.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===foe.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===foe.OPTGROUP&&e.openElements.pop();break;case foe.OPTION:e.openElements.currentTagId===foe.OPTION&&e.openElements.pop();break;case foe.SELECT:e.openElements.hasInSelectScope(foe.SELECT)&&(e.openElements.popUntilTagNamePopped(foe.SELECT),e._resetInsertionMode());break;case foe.TEMPLATE:Pie(e,t)}}function use(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(foe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Aie(e,t)}function dse(e,t){var n;if(t.tagID===foe.HTML){if(e.fragmentContext||(e.insertionMode=hie.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===foe.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else pse(e,t)}function pse(e,t){e.insertionMode=hie.IN_BODY,Fie(e,t)}function fse(e,t){e.insertionMode=hie.IN_BODY,Fie(e,t)}function hse(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ooe.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}doe.AREA,doe.BASE,doe.BASEFONT,doe.BGSOUND,doe.BR,doe.COL,doe.EMBED,doe.FRAME,doe.HR,doe.IMG,doe.INPUT,doe.KEYGEN,doe.LINK,doe.META,doe.PARAM,doe.SOURCE,doe.TRACK,doe.WBR;const mse=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,gse=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),yse={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function bse(e,t){const n=function(e){const t="root"===e.type?e.children[0]:e;return Boolean(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName.toLowerCase()))}(e),r=wae("type",{handlers:{root:kse,element:xse,text:wse,comment:Sse,doctype:Ese,raw:Tse},unknown:Cse}),a={parser:n?new vie(yse):vie.getFragmentParser(void 0,yse),handle(e){r(e,a)},stitches:!1,options:t||{}};r(e,a),Ase(a,kee());const o=function(e,t){const n=t||{};return gae({file:n.file||void 0,location:!1,schema:"svg"===n.space?$7:U7,verbose:n.verbose||!1},e)}(n?a.parser.document:a.parser.getFragment(),{file:a.options.file});return a.stitches&&ure(o,"comment",(function(e,t,n){const r=e;if(r.value.stitch&&n&&void 0!==t){return n.children[t]=r.value.stitch,t}})),"root"===o.type&&1===o.children.length&&o.children[0].type===e.type?o.children[0]:o}function vse(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function kse(e,t){vse(e.children,t)}function xse(e,t){!function(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Toe.PLAINTEXT)return;Ase(t,kee(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:fae.html;a===fae.html&&"svg"===n&&(a=fae.svg);const o=function(e,t){const n=(t||Eae).space;return Sae(e,"svg"===n?$7:U7)}({...e,children:[]},{space:a===fae.svg?"svg":"html"}),i={type:qae.START_TAG,tagName:n,tagID:koe(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:Ise(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}(e,t),vse(e.children,t),function(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Nae.includes(n))return;if(t.parser.tokenizer.state===Toe.PLAINTEXT)return;Ase(t,vee(e));const r={type:qae.END_TAG,tagName:n,tagID:koe(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ise(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n!==t.parser.tokenizer.lastStartTagName||t.parser.tokenizer.state!==Toe.RCDATA&&t.parser.tokenizer.state!==Toe.RAWTEXT&&t.parser.tokenizer.state!==Toe.SCRIPT_DATA||(t.parser.tokenizer.state=Toe.DATA)}(e,t)}function wse(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qae.CHARACTER,chars:e.value,location:Ise(e)};Ase(t,kee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ese(e,t){const n={type:qae.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ise(e)};Ase(t,kee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _se(e,t){t.stitches=!0;const n=function(e){return ere("children"in e?{...e,children:[]}:e)}(e);if("children"in e&&"children"in n){const r=bse({type:"root",children:e.children},t.options);n.children=r.children}Sse({type:"comment",value:{stitch:n}},t)}function Sse(e,t){const n=e.value,r={type:qae.COMMENT,data:n,location:Ise(e)};Ase(t,kee(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Tse(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,Nse(t,kee(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(mse,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),72===t.parser.tokenizer.state||78===t.parser.tokenizer.state){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function Cse(e,t){const n=e;if(!t.options.passThrough||!t.options.passThrough.includes(n.type)){let e="";throw gse.has(n.type)&&(e=". 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"+e)}_se(n,t)}function Ase(e,t){Nse(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=Toe.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 Nse(e,t){if(t&&void 0!==t.offset){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=1-t.column,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Ise(e){const t=kee(e)||{line:void 0,column:void 0,offset:void 0},n=vee(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 Ose(e){return function(t,n){return bse(t,{...e,file:n})}}function Rse(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;-1!==a;)r++,a=n.indexOf(t,a+t.length);return r}function Pse(e,t,n){const r=rre((n||{}).ignore||[]),a=function(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 e=n[r];t.push([Lse(e[0]),Dse(e[1])])}return t}(t);let o=-1;for(;++o<a.length;)cre(e,"text",i);function i(e,t){let n,i=-1;for(;++i<t.length;){const e=t[i],a=n?n.children:void 0;if(r(e,a?a.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=a[o][0],i=a[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,a={index:d.index,input:d.input,stack:[...t,e]};let o=i(...d,a);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Lse(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Dse(e){return"function"==typeof e?e:function(){return e}}const Mse="phrasing",Fse=["autolink","link","image","label"];function jse(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function zse(e){this.config.enter.autolinkProtocol.call(this,e)}function Bse(e){this.config.exit.autolinkProtocol.call(this,e)}function Hse(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 Use(e){this.config.exit.autolinkEmail.call(this,e)}function $se(e){this.exit(e)}function Vse(e){Pse(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Gse],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),qse]],{ignore:["link","linkReference"]})}function Gse(e,t,n,r,a){let o="";if(!Wse(a))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");if(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])))return!1;return!0}(n))return!1;const i=function(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 a=Rse(e,"(");let o=Rse(e,")");for(;-1!==r&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:o+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function qse(e,t,n,r){return!(!Wse(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Wse(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||mte(n)||hte(n))&&(!t||47!==n)}function Yse(){this.buffer()}function Zse(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Kse(){this.buffer()}function Xse(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Qse(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=rte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Jse(e){this.exit(e)}function ele(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=rte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tle(e){this.exit(e)}function nle(e,t,n,r){const a=n.createTracker(r);let o=a.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),i(),o+=a.move("]"),o}function rle(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,a){const o=r.createTracker(a);let i=o.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");i+=o.move(r.safe(r.associationId(e),{before:i,after:"]"})),l(),i+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),i+=o.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,o.current()),t?ole:ale)));return s(),i},footnoteReference:nle},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ale(e,t,n){return 0===t?e:ole(e,t,n)}function ole(e,t,n){return(n?"":" ")+e}nle.peek=function(){return"["};const ile=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function sle(e){this.enter({type:"delete",children:[]},e)}function lle(e){this.exit(e)}function cle(e,t,n,r){const a=n.createTracker(r),o=n.enter("strikethrough");let i=a.move("~~");return i+=n.containerPhrasing(e,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),o(),i}function ule(e){return e.length}function dle(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function ple(e,t,n){return">"+(n?"":" ")+e}function fle(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function hle(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if("\n"===n.unsafe[a].character&&(o=n.stack,i=n.unsafe[a],fle(o,i.inConstruct,!0)&&!fle(o,i.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var o,i;return"\\\n"}function mle(e,t,n){return(n?"":" ")+e}function gle(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 yle(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ble(e,t,n){const r=wte(e),a=wte(t);return void 0===r?void 0===a?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function vle(e,t,n,r){const a=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),i=n.createTracker(r),s=i.move(a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=ble(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=yle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=ble(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+yle(d));const f=i.move(a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function kle(e){return e.value||""}function xle(e,t,n,r){const a=gle(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),c+=l.move(")"),i(),c}function wle(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ele(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let a;if(e.atBreak)for(;a=t.exec(r);){let e=a.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(a.index+1)}}return a+r+a}function _le(e,t){const n=Gee(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Sle(e,t,n,r){const a=gle(n),o='"'===a?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(_le(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=i.move("<");return r+=i.move(n.containerPhrasing(e,{before:r,after:">",...i.current()})),r+=i.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=i.move("[");return c+=i.move(n.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(n.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(l=n.enter("destinationRaw"),c+=i.move(n.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=i.move(" "+a),c+=i.move(n.safe(e.title,{before:c,after:a,...i.current()})),c+=i.move(a),l()),c+=i.move(")"),s(),c}function Tle(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Cle(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 Ale(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}cle.peek=function(){return"~"},vle.peek=function(e,t,n){return n.options.emphasis||"*"},kle.peek=function(){return"<"},xle.peek=function(){return"!"},wle.peek=function(){return"!"},Ele.peek=function(){return"`"},Sle.peek=function(e,t,n){return _le(e,n)?"<":"["},Tle.peek=function(){return"["};const Nle=rre(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ile(e,t,n,r){const a=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),i=n.createTracker(r),s=i.move(a+a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=ble(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=yle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=ble(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+yle(d));const f=i.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}Ile.peek=function(e,t,n){return n.options.strong||"*"};const Ole={blockquote:function(e,t,n,r){const a=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const i=n.indentLines(n.containerFlow(e,o.current()),ple);return a(),i},break:hle,code:function(e,t,n,r){const a=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",i="`"===a?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,mle);return e(),t}const s=n.createTracker(r),l=a.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),a=r,o=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===a?++o>i&&(i=o):o=1,a=r+t.length,r=n.indexOf(t,a);return i}(o,a)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${i}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${i}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),o&&(u+=s.move(o+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const a=gle(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),i(),c},emphasis:vle,hardBreak:hle,heading:function(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return ure(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,lre})),Boolean((!e.depth||e.depth<3)&&Gee(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),i=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),i+"\n"+(1===a?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(a),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(i+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=yle(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:kle,image:xle,imageReference:wle,inlineCode:Ele,link:Sle,linkReference:Tle,list:function(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Cle(n);const s=e.ordered?"."===i?")":".":function(e){const t=Cle(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}(n);let l=!(!t||!n.bulletLastUsed)&&i===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Ale(n)===i&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const c=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=o,a(),c},listItem:function(e,t,n,r){const a=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||Cle(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let i=o.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const s=n.createTracker(r);s.move(o+" ".repeat(i-o.length)),s.shift(i);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?o:o+" ".repeat(i-o.length))+e}));return l(),c},paragraph:function(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),i=n.containerPhrasing(e,r);return o(),a(),i},root:function(e,t,n,r){return(e.children.some((function(e){return Nle(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Ile,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ale(n)+(n.options.ruleSpaces?" ":"")).repeat(function(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}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Rle(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function Ple(e){this.exit(e),this.data.inTable=void 0}function Lle(e){this.enter({type:"tableRow",children:[]},e)}function Dle(e){this.exit(e)}function Mle(e){this.enter({type:"tableCell",children:[]},e)}function Fle(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,jle));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function jle(e,t){return"|"===t?t:e}function zle(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Ole.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let a=-1;const o=[],i=t.enter("table");for(;++a<r.length;)o[a]=l(r[a],t,n);return i(),o}(e,n,r),e.align)},tableCell:i,tableRow:function(e,t,n,r){const a=s([l(e,n,r)]);return a.slice(0,a.indexOf("\n"))}}};function i(e,t,n,r){const a=n.enter("tableCell"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:o,after:o});return i(),a(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||ule,o=[],i=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const i=null==(d=e[u][o])?"":String(d);if(!1!==n.alignDelimiters){const e=a(i);r[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(i)}i[u]=t,s[u]=r}var d;let p=-1;if("object"==typeof r&&"length"in r)for(;++p<c;)o[p]=dle(r[p]);else{const e=dle(r);for(;++p<c;)o[p]=e}p=-1;const f=[],h=[];for(;++p<c;){const e=o[p];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let a=!1===n.alignDelimiters?1:Math.max(1,l[p]-t.length-r.length);const i=t+"-".repeat(a)+r;!1!==n.alignDelimiters&&(a=t.length+a+r.length,a>l[p]&&(l[p]=a),h[p]=a),f[p]=i}i.splice(1,0,f),s.splice(1,0,h),u=-1;const m=[];for(;++u<i.length;){const e=i[u],t=s[u];p=-1;const r=[];for(;++p<c;){const a=e[p]||"";let i="",s="";if(!1!==n.alignDelimiters){const e=l[p]-(t[p]||0),n=o[p];114===n?i=" ".repeat(e):99===n?e%2?(i=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),s=i):s=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===a||!1===n.delimiterStart&&!p||r.push(" "),!1!==n.alignDelimiters&&r.push(i),r.push(a),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&p===c-1||r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:a})}function l(e,t,n){const r=e.children;let a=-1;const o=[],s=t.enter("tableRow");for(;++a<r.length;)o[a]=i(r[a],0,t,n);return s(),o}}function Ble(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Hle(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let a,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){a=e;break}}a===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Ule(e,t,n,r){const a=e.children[0],o="boolean"==typeof e.checked&&a&&"paragraph"===a.type,i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(i);let l=Ole.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+i}))),l}const $le={tokenize:function(e,t,n){let r=0;return function t(o){if((87===o||119===o)&&r<3)return r++,e.consume(o),t;if(46===o&&3===r)return e.consume(o),a;return n(o)};function a(e){return null===e?n(e):t(e)}},partial:!0},Vle={tokenize:function(e,t,n){let r,a,o;return i;function i(t){return 46===t||95===t?e.check(qle,l,s)(t):null===t||pte(t)||mte(t)||45!==t&&hte(t)?l(t):(o=!0,e.consume(t),i)}function s(t){return 95===t?r=!0:(a=r,r=void 0),e.consume(t),i}function l(e){return a||r||!o?n(e):t(e)}},partial:!0},Gle={tokenize:function(e,t){let n=0,r=0;return a;function a(i){return 40===i?(n++,e.consume(i),a):41===i&&r<n?o(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(qle,t,o)(i):null===i||pte(i)||mte(i)?t(i):(e.consume(i),a)}function o(t){return 41===t&&r++,e.consume(t),a}},partial:!0},qle={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),o):93===i?(e.consume(i),a):60===i||null===i||pte(i)||mte(i)?t(i):n(i)}function a(e){return null===e||40===e||91===e||pte(e)||mte(e)?t(e):r(e)}function o(e){return ate(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):ate(t)?(e.consume(t),i):n(t)}},partial:!0},Wle={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return ote(e)?n(e):t(e)}},partial:!0},Yle={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!Jle.call(r,r.previous)||rce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($le,e.attempt(Vle,e.attempt(Gle,a),n),n)(t)};function a(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:Jle},Zle={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let a="",o=!1;return function(t){if((72===t||104===t)&&ece.call(r,r.previous)&&!rce(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(ate(t)&&a.length<5)return a+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=a.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||ste(t)||pte(t)||mte(t)||hte(t)?n(t):e.attempt(Vle,e.attempt(Gle,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:ece},Kle={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let a,o;return function(t){if(!nce(t)||!tce.call(r,r.previous)||rce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return nce(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(Wle,c,l)(t):45===t||95===t||ote(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),a=!0,s}function c(i){return o&&a&&ate(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:tce},Xle={};let Qle=48;for(;Qle<123;)Xle[Qle]=Kle,Qle++,58===Qle?Qle=65:91===Qle&&(Qle=97);function Jle(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||pte(e)}function ece(e){return!ate(e)}function tce(e){return!(47===e||nce(e))}function nce(e){return 43===e||45===e||46===e||95===e||ote(e)}function rce(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Xle[43]=Kle,Xle[45]=Kle,Xle[46]=Kle,Xle[95]=Kle,Xle[72]=[Kle,Zle],Xle[104]=[Kle,Zle],Xle[87]=[Kle,Yle],Xle[119]=[Kle,Yle];const ace={tokenize:function(e,t,n){const r=this;return bte(e,(function(e){const a=r.events[r.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function oce(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;a--;){const e=r.events[a][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!i||!i._balanced)return n(a);const s=rte(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return n(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function ice(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){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)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function sce(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(i>999||93===s&&!o||null===s||91===s||pte(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return a.includes(rte(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return pte(s)||(o=!0),i++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,l):l(t)}}function lce(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!i||null===t||91===t||pte(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=rte(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return pte(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(o)||a.push(o),bte(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function cce(e,t,n){return e.check(Cte,t,e.attempt(ace,t,n))}function uce(e){e.exit("gfmFootnoteDefinition")}function dce(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const a=this.previous,o=this.events;let i=0;return function(t){if(126===a&&"characterEscape"!==o[o.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const l=wte(a);if(126===o)return i>1?r(o):(e.consume(o),i++,s);if(i<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=wte(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const a={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&Kee(i,i.length,0,Ete(s,e.slice(r+1,n),t)),Kee(i,i.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]),Kee(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class pce{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let a=0;if(0===n&&0===r.length)return;for(;a<e.map.length;){if(e.map[a][0]===t)return e.map[a][1]+=n,void e.map[a][2].push(...r);a+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function fce(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if("enter"===a[0])"tableContent"===a[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===a[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===a[1].type)break}else"enter"===a[0]&&"tableDelimiterRow"===a[1].type&&(n=!0);t+=1}return r}function hce(e,t,n){const r=this;let a,o=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const a=t>-1?r.events[t][1].type:null,o="tableHead"===a||"tableRow"===a?k:s;if(o===k&&r.parser.lazy[r.now().line])return n(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return a=!0,i+=1,l(e)}(t)}function l(t){return null===t?n(t):dte(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):fte(t)?bte(e,l,"whitespace")(t):(i+=1,a&&(a=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||pte(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),a=!1,fte(t)?bte(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(a=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return fte(t)?bte(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||dte(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return fte(t)?bte(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||dte(n))&&a&&o===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function k(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||dte(n)?(e.exit("tableRow"),t(n)):fte(n)?bte(e,x,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||pte(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?E:w)}function E(t){return 92===t||124===t?(e.consume(t),w):w(t)}}function mce(e,t){let n,r,a,o=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new pce;for(;++o<e.length;){const f=e[o],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(yce(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(i=!0,a=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(i?i=!1:(0!==l[1]&&(c[0]=c[1],a=gce(p,t,l,s,void 0,a)),l=c,c=[l[1],o,0,0])):(i=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],a=gce(p,t,l,s,void 0,a),l=[0,0,0,0]),c[2]=o)):"tableHead"===h.type?(u=!0,d=o):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=o,0!==l[1]?(c[0]=c[1],a=gce(p,t,l,s,o,a)):0!==c[1]&&(a=gce(p,t,c,s,o,a)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=o)}for(0!==d&&yce(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=fce(t.events,o))}return e}function gce(e,t,n,r,a,o){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},bce(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=bce(t.events,n[1]);if(o={type:i,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const a=bce(t.events,n[2]),o=bce(t.events,n[3]),i={type:"tableContent",start:Object.assign({},a),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],a=t.events[n[3]];if(r[1].end=Object.assign({},a[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==a&&(o.end=Object.assign({},bce(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function yce(e,t,n,r,a){const o=[],i=bce(t.events,n);a&&(a.end=Object.assign({},i),o.push(["exit",a,t])),r.end=Object.assign({},i),o.push(["exit",r,t]),e.add(n+1,0,o)}function bce(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const vce={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a};function a(t){return pte(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return dte(r)?t(r):fte(r)?e.check({tokenize:kce},t,n)(r):n(r)}}};function kce(e,t,n){return bte(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const xce={};function wce(e){const t=e||xce,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Jee([{text:Xle},{document:{91:{name:"gfmFootnoteDefinition",tokenize:lce,continuation:{tokenize:cce},exit:uce}},text:{91:{name:"gfmFootnoteCall",tokenize:sce},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oce,resolveTo:ice}}},dce(e),{flow:{null:{name:"table",tokenize:hce,resolveAll:mce}}},{text:{91:vce}}])}(t)),a.push([{transforms:[Vse],enter:{literalAutolink:jse,literalAutolinkEmail:zse,literalAutolinkHttp:zse,literalAutolinkWww:zse},exit:{literalAutolink:$se,literalAutolinkEmail:Use,literalAutolinkHttp:Bse,literalAutolinkWww:Hse}},{enter:{gfmFootnoteCallString:Yse,gfmFootnoteCall:Zse,gfmFootnoteDefinitionLabelString:Kse,gfmFootnoteDefinition:Xse},exit:{gfmFootnoteCallString:Qse,gfmFootnoteCall:Jse,gfmFootnoteDefinitionLabelString:ele,gfmFootnoteDefinition:tle}},{canContainEols:["delete"],enter:{strikethrough:sle},exit:{strikethrough:lle}},{enter:{table:Rle,tableData:Mle,tableHeader:Mle,tableRow:Lle},exit:{codeText:Fle,table:Ple,tableData:Dle,tableHeader:Dle,tableRow:Dle}},{exit:{taskListCheckValueChecked:Ble,taskListCheckValueUnchecked:Ble,paragraph:Hle}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mse,notInConstruct:Fse},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mse,notInConstruct:Fse},{character:":",before:"[ps]",after:"\\/",inConstruct:Mse,notInConstruct:Fse}]},rle(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ile}],handlers:{delete:cle}},zle(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ule}}]}}(t))}const Ece=function(e){if(null==e)return Sce;if("string"==typeof e)return function(e){return _ce(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ece(e[n]);return _ce(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}}(e):function(e){return _ce(t);function t(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return _ce(e);throw new Error("Expected function, string, or object as test")};function _ce(e){return function(t,...n){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...n)))}}function Sce(){return!0}const Tce=!0,Cce=!1,Ace=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);const a=Ece(t),o=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=[];if((!t||a(i,s,l[l.length-1]||null))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Tce,e];return[e]}(n(i,l)),p[0]===Cce))return p;if(i.children&&"skip"!==p[0])for(u=(r?i.children.length:-1)+o,d=l.concat(i);u>-1&&u<i.children.length;){if(c=e(i.children[u],u,d)(),c[0]===Cce)return c;u="number"==typeof c[1]?c[1]:u+o}return p}}(e,void 0,[])()};const Nce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),Ace(e,t,(function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)};function Ice(){return e=>{Nce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\^/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"superscript",data:{hName:"sup"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)})),Nce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\~/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"subscript",data:{hName:"sub"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)}))}}function Oce(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Oce(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Rce(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Oce(e))&&(r&&(r+=" "),r+=t);return r}var Pce,Lce,Dce,Mce,Fce,jce,zce,Bce=Object.create,Hce=Object.defineProperty,Uce=Object.defineProperties,$ce=Object.getOwnPropertyDescriptor,Vce=Object.getOwnPropertyDescriptors,Gce=Object.getOwnPropertyNames,qce=Object.getOwnPropertySymbols,Wce=Object.getPrototypeOf,Yce=Object.prototype.hasOwnProperty,Zce=Object.prototype.propertyIsEnumerable,Kce=(e,t,n)=>t in e?Hce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xce=(e,t)=>{for(var n in t||(t={}))Yce.call(t,n)&&Kce(e,n,t[n]);if(qce)for(var n of qce(t))Zce.call(t,n)&&Kce(e,n,t[n]);return e},Qce=(e,t)=>Uce(e,Vce(t)),Jce=(e,t)=>{var n={};for(var r in e)Yce.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&qce)for(var r of qce(e))t.indexOf(r)<0&&Zce.call(e,r)&&(n[r]=e[r]);return n},eue=(Pce={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var a,o;switch(n=n||{},r.util.type(t)){case"Object":if(o=r.util.objId(t),n[o])return n[o];for(var i in a={},n[o]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return o=r.util.objId(t),n[o]?n[o]:(a=[],n[o]=a,t.forEach((function(t,r){a[r]=e(t,n)})),a);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var o=(a=a||r.languages)[e],i={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=o[s])}var c=a[e];return a[e]=i,r.languages.DFS(r.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,o){o=o||{};var i=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],a||s);var l=t[s],c=r.util.type(l);"Object"!==c||o[i(l)]?"Array"!==c||o[i(l)]||(o[i(l)]=!0,e(l,n,s,o)):(o[i(l)]=!0,e(l,n,null,o))}}},plugins:{},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=r.tokenize(o.code,o.grammar),r.hooks.run("after-tokenize",o),a.stringify(r.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new s;return l(a,a.head,e),i(e,a,t,a.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,o=0;a=n[o++];)a(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function i(e,t,n,s,u,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var h=0;h<f.length;++h){if(d&&d.cause==p+","+h)return;var m=f[h],g=m.inside,y=!!m.lookbehind,b=!!m.greedy,v=m.alias;if(b&&!m.pattern.global){var k=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,k+"g")}for(var x=m.pattern||m,w=s.next,E=u;w!==t.tail&&!(d&&E>=d.reach);E+=w.value.length,w=w.next){var _=w.value;if(t.length>e.length)return;if(!(_ instanceof a)){var S,T=1;if(b){if(!(S=o(x,E,e,y))||S.index>=e.length)break;var C=S.index,A=S.index+S[0].length,N=E;for(N+=w.value.length;C>=N;)N+=(w=w.next).value.length;if(E=N-=w.value.length,w.value instanceof a)continue;for(var I=w;I!==t.tail&&(N<A||"string"==typeof I.value);I=I.next)T++,N+=I.value.length;T--,_=e.slice(E,N),S.index-=E}else if(!(S=o(x,0,_,y)))continue;C=S.index;var O=S[0],R=_.slice(0,C),P=_.slice(C+O.length),L=E+_.length;d&&L>d.reach&&(d.reach=L);var D=w.prev;if(R&&(D=l(t,D,R),E+=R.length),c(t,D,T),w=l(t,D,new a(p,g?r.tokenize(O,g):O,v,O)),P&&l(t,w,P),T>1){var M={cause:p+","+h,reach:L};i(e,t,n,w.prev,E,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function c(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}return a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),r.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},r}();t.exports=n,n.default=n}},function(){return Lce||(0,Pce[Gce(Pce)[0]])((Lce={exports:{}}).exports,Lce),Lce.exports}),tue=((e,t,n)=>(n=null!=e?Bce(Wce(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of Gce(t))Yce.call(e,a)||a===n||Hce(e,a,{get:()=>t[a],enumerable:!(r=$ce(t,a))||r.enumerable});return e})(e&&e.__esModule?n:Hce(n,"default",{value:e,enumerable:!0}),e)))(eue());tue.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},tue.languages.markup.tag.inside["attr-value"].inside.entity=tue.languages.markup.entity,tue.languages.markup.doctype.inside["internal-subset"].inside=tue.languages.markup,tue.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(tue.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:tue.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:tue.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},tue.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(tue.languages.markup.tag,"addAttribute",{value:function(e,t){tue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:tue.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),tue.languages.html=tue.languages.markup,tue.languages.mathml=tue.languages.markup,tue.languages.svg=tue.languages.markup,tue.languages.xml=tue.languages.extend("markup",{}),tue.languages.ssml=tue.languages.xml,tue.languages.atom=tue.languages.xml,tue.languages.rss=tue.languages.xml,Dce=tue,Mce={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},jce="(?:[^\\\\-]|"+(Fce=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",jce=RegExp(jce+"-"+jce),zce={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},Dce.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:jce,inside:{escape:Fce,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":Mce,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:Fce}},"special-escape":Mce,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":zce}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:Fce,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":zce}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},tue.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},tue.languages.javascript=tue.languages.extend("clike",{"class-name":[tue.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),tue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,tue.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:tue.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:tue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:tue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:tue.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:tue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),tue.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:tue.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),tue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),tue.languages.markup&&(tue.languages.markup.tag.addInlined("script","javascript"),tue.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),tue.languages.js=tue.languages.javascript,tue.languages.actionscript=tue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),tue.languages.actionscript["class-name"].alias="function",delete tue.languages.actionscript.parameter,delete tue.languages.actionscript["literal-property"],tue.languages.markup&&tue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:tue.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(tue),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach((function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var s=0,l=i.length;s<l;s++)i[s]instanceof RegExp&&(i[s]={pattern:i[s]}),r(i[s]);else r(i)}}))}}),t.addSupport(["java","javascript","php"],t)}(tue),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;(t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup))&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(tue),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(tue),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(tue),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var a,o=t[n];"code"!==o.type?e(o.content):(a=o.content[1],o=o.content[3],a&&o&&"code-language"===a.type&&"code-block"===o.type&&"string"==typeof a.content&&(a=a.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),a="language-"+(a=(/[a-z][\w-]*/i.exec(a)||[""])[0].toLowerCase()),o.alias?"string"==typeof o.alias?o.alias=[o.alias,a]:o.alias.push(a):o.alias=[a]))}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,a=t.classes.length;r<a;r++){var o=t.classes[r];if(o=/language-(.+)/.exec(o)){n=o[1];break}}var c,u=e.languages[n];u?t.content=e.highlight(t.content.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n)):s[t]||e})),u,n):n&&"none"!==n&&e.plugins.autoloader&&(c="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random()),t.attributes.id=c,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(c);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})))}})),RegExp(e.languages.markup.tag.pattern.source,"gi")),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(tue),tue.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:tue.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},tue.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var a=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var o=p(/^\($/,/^\)$/);if(-1===o)continue;for(;n<o;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),a.push(i.content))}n=o+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),0<a.length)){var s=p(/^\{$/,/^\}$/);if(-1!==s)for(var l=n;l<s;l++){var c=t[l];"variable"===c.type&&0<=a.indexOf(c.content)&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function p(e,r){for(var a=1,o=n;o<t.length;o++){var i=t[o],s=i.content;if("punctuation"===i.type&&"string"==typeof s)if(e.test(s))a++;else if(r.test(s)&&0==--a)return o}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),tue.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function l(t,n,i){var l=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),c=0,u={},d=(l=s(l.map((function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=c++,n="___"+i.toUpperCase()+"_"+r+"___")););return u[n]=e,n})).join(""),n,i),Object.keys(u));return c=0,function t(n){for(var o=0;o<n.length;o++){if(c>=d.length)return;var i,l,p,f,h,m,g,y=n[o];"string"==typeof y||"string"==typeof y.content?(i=d[c],-1!==(g=(m="string"==typeof y?y:y.content).indexOf(i))&&(++c,l=m.substring(0,g),h=u[i],p=void 0,(f={})["interpolation-punctuation"]=a,3===(f=e.tokenize(h,f)).length&&((p=[1,1]).push.apply(p,s(f[1],e.languages.javascript,"javascript")),f.splice.apply(f,p)),p=new e.Token("interpolation",f,r.alias,h),f=m.substring(g+i.length),h=[],l&&h.push(l),h.push(p),f&&(t(m=[f]),h.push.apply(h,m)),"string"==typeof y?(n.splice.apply(n,[o,1].concat(h)),o+=h.length-1):y.content=h)):(g=y.content,Array.isArray(g)?t(g):t([g]))}}(l),new e.Token(i,l,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return"string"==typeof e?e:Array.isArray(e)?e.map(u).join(""):u(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in c&&function t(n){for(var r=0,a=n.length;r<a;r++){var o,i,s,c=n[r];"string"!=typeof c&&(o=c.content,Array.isArray(o)?"template-string"===c.type?(c=o[1],3===o.length&&"string"!=typeof c&&"embedded-code"===c.type&&(i=u(c),c=c.alias,c=Array.isArray(c)?c[0]:c,s=e.languages[c])&&(o[1]=l(i,s,c))):t(o):"string"!=typeof o&&t([o]))}}(t.tokens)}))}(tue),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(tue),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,(function(){return n}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(tue),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(tue),tue.languages.n4js=tue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),tue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),tue.languages.n4jsd=tue.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],o=e.languages.javascript[a];a=(o="RegExp"===e.util.type(o)?e.languages.javascript[a]={pattern:o}:o).inside||{};(o.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(tue),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return a})),RegExp(e,t)}function i(t){for(var n=[],r=0;r<t.length;r++){var a=t[r],o=!1;"string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?0<n.length&&n[n.length-1].tagName===s(a.content[0].content[1])&&n.pop():"/>"!==a.content[a.content.length-1].content&&n.push({tagName:s(a.content[0].content[1]),openedBraces:0}):0<n.length&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&0<n.length&&0===n[n.length-1].openedBraces&&(o=s(a),r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(o+=s(t[r+1]),t.splice(r+1,1)),0<r&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(o=s(t[r-1])+o,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",o,null,o)),a.content&&"string"!=typeof a.content&&i(a.content)}}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join(""):""};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)}))}(tue),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(tue),tue.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},tue.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=tue.languages.swift})),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(tue),tue.languages.c=tue.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),tue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),tue.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},tue.languages.c.string],char:tue.languages.c.char,comment:tue.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:tue.languages.c}}}}),tue.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete tue.languages.c.boolean,tue.languages.objectivec=tue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete tue.languages.objectivec["class-name"],tue.languages.objc=tue.languages.objectivec,tue.languages.reason=tue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),tue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete tue.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(tue),tue.languages.go=tue.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),tue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete tue.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(tue),tue.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},tue.languages.python["string-interpolation"].inside.interpolation.inside.rest=tue.languages.python,tue.languages.py=tue.languages.python,tue.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},tue.languages.webmanifest=tue.languages.json;var nue={};((e,t)=>{for(var n in t)Hce(e,n,{get:t[n],enumerable:!0})})(nue,{dracula:()=>rue,duotoneDark:()=>aue,duotoneLight:()=>oue,github:()=>iue,gruvboxMaterialDark:()=>Eue,gruvboxMaterialLight:()=>_ue,jettwaveDark:()=>vue,jettwaveLight:()=>kue,nightOwl:()=>sue,nightOwlLight:()=>lue,oceanicNext:()=>due,okaidia:()=>pue,oneDark:()=>xue,oneLight:()=>wue,palenight:()=>fue,shadesOfPurple:()=>hue,synthwave84:()=>mue,ultramin:()=>gue,vsDark:()=>yue,vsLight:()=>bue});var rue={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},aue={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},oue={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},iue={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},sue={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},lue={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},cue="#c5a5c5",uue="#8dc891",due={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:cue}},{types:["attr-value"],style:{color:uue}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:uue}},{types:["punctuation"],style:{color:uue}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:cue}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},pue={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},fue={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},hue={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},mue={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},gue={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},yue={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},bue={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},vue={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},kue={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},xue={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},wue={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},Eue={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},_ue={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},Sue=/\r\n|\r|\n/,Tue=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},Cue=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},Aue=e=>{const t=[[]],n=[e],r=[0],a=[e.length];let o=0,i=0,s=[];const l=[s];for(;i>-1;){for(;(o=r[i]++)<a[i];){let e,c=t[i];const u=n[i][o];if("string"==typeof u?(c=i>0?c:["plain"],e=u):(c=Cue(c,u.type),u.alias&&(c=Cue(c,u.alias)),e=u.content),"string"!=typeof e){i++,t.push(c),n.push(e),r.push(0),a.push(e.length);continue}const d=e.split(Sue),p=d.length;s.push({types:c,content:d[0]});for(let t=1;t<p;t++)Tue(s),l.push(s=[]),s.push({types:c,content:d[t]})}i--,t.pop(),n.pop(),r.pop(),a.pop()}return Tue(s),l},Nue=(e,t)=>{const{plain:n}=e,r=e.styles.reduce(((e,n)=>{const{languages:r,style:a}=n;return r&&!r.includes(t)||n.types.forEach((t=>{const n=Xce(Xce({},e[t]),a);e[t]=n})),e}),{});return r.root=n,r.plain=Qce(Xce({},n),{backgroundColor:void 0}),r},Iue=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=Nue(r,o),s=(e=>X.useCallback((t=>{var n=t,{className:r,style:a,line:o}=n,i=Jce(n,["className","style","line"]);const s=Qce(Xce({},i),{className:Rce("token-line",r)});return"object"==typeof e&&"plain"in e&&(s.style=e.plain),"object"==typeof a&&(s.style=Xce(Xce({},s.style||{}),a)),s}),[e]))(i),l=(e=>{const t=X.useCallback((({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map((t=>e[t])))}),[e]);return X.useCallback((e=>{var n=e,{token:r,className:a,style:o}=n,i=Jce(n,["token","className","style"]);const s=Qce(Xce({},i),{className:Rce("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(s.style=Xce(Xce({},s.style||{}),o)),s}),[t])})(i),c=(({prism:e,code:t,grammar:n,language:r})=>X.useMemo((()=>{if(null==n)return Aue([t]);const a={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",a),Aue(a.tokens)}),[t,n,r,e]))({prism:a,language:o,code:n,grammar:a.languages[o]});return e({tokens:c,className:`prism-code language-${o}`,style:null!=i?i.root:{},getLineProps:s,getTokenProps:l})},Oue=e=>X.createElement(Iue,Qce(Xce({},e),{prism:e.prism||tue,theme:e.theme||yue,code:e.code,language:e.language}))
|
|
70
|
+
*/const vG={search:"IoSearch",thumbsUp:"LuThumbsUp",thumbsDown:"LuThumbsDown",messageCopy:"LuCopy",messageCopied:"LuCheck",messageRevise:"FiEdit",codeCopy:"LuCopy",codeCopied:"LuCheck",openLinkInNewTab:"LuArrowUpRight",openLinkInSameTab:"LuCornerDownLeft",newLine:"LuCornerDownRight",breadcrumbSeparator:"FaChevronRight",switchToSearch:"IoSearch",switchToChat:"LuSparkles",chatSubmit:"LuSend",close:"IoCloseOutline",info:"IoInformationCircleOutline",command:"LuCommand",chatButtonClose:"LuChevronDown",chatHistory:"LuHistory",chatHistoryPanel:"LuPanelLeft",backToChat:"LuArrowLeft",fileUpload:"LuPaperclip",filePdf:"FaRegFilePdf",fileText:"PiFileText",fileMarkdown:"PiFileMarkdown",fileHtml:"PiFileHtml",fileCsv:"PiFileCsv",fileLog:"PiFileLog",fileJson:"PiFileJson",file:"PiFile",fileSql:"PiFileSql",filePy:"PiFilePy"};function kG({iconKey:e,...t}){var n;const r=vG[e],a=r?{builtIn:r}:{custom:""},{baseSettings:o}=oR(),i=(null==(n=o.customIcons)?void 0:n[e])||a;return og.jsx(bG,{"data-icon":e,iconSettings:i,...t})}const xG=X.createContext(void 0),wG=({children:e})=>{const[t,n]=X.useState(null),r=X.useCallback((e=>{n(e)}),[]),a=X.useCallback((()=>{n(null)}),[]),o=X.useMemo((()=>({imagePreview:t,openImagePreview:r,closeImagePreview:a})),[t,r,a]);return og.jsx(xG.Provider,{value:o,children:e})},EG=()=>{const e=X.useContext(xG);if(!e)throw new Error("useImagePreview must be used within an ImagePreviewProvider");return e},_G=X.createContext(void 0),SG=({children:e,message:t})=>og.jsx(_G.Provider,{value:{message:t},children:e}),TG=()=>{const e=X.useContext(_G);if(!e)throw new Error("useMessage must be used within a MessageProvider");return e};var CG=(e,t=[])=>({parts:(...n)=>{if(NG(t))return CG(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>CG(e,[...t,...n]),omit:(...n)=>CG(e,t.filter((e=>!n.includes(e)))),rename:e=>CG(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${AG(e)}"][data-part="${AG(n)}"]`,`& [data-scope="${AG(e)}"][data-part="${AG(n)}"]`].join(", "),attrs:{"data-scope":AG(e),"data-part":AG(n)}}})),{})}),AG=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),NG=e=>0===e.length,IG=CG("file-upload").parts("root","dropzone","item","itemDeleteTrigger","itemGroup","itemName","itemPreview","itemPreviewImage","itemSizeText","label","trigger","clearTrigger").build(),OG=Object.defineProperty,RG=(e,t,n)=>((e,t,n)=>t in e?OG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),PG=e=>"object"==typeof e&&null!==e,LG=e=>e?"":void 0,DG=e=>PG(e)&&1===e.nodeType&&"string"==typeof e.nodeName,MG=e=>PG(e)&&void 0!==e.nodeType,FG=e=>MG(e)&&11===e.nodeType&&"host"in e;function jG(e,t){var n;if(!e||!t)return!1;if(!DG(e)||!MG(t))return!1;if(DG(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&FG(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function zG(e){var t;return FG(e)?zG(e.host):(e=>PG(e)&&9===e.nodeType)(e)?e.defaultView??window:DG(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function BG(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}var HG=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},UG=class e{constructor(){RG(this,"id",null),RG(this,"fn_cleanup"),RG(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};var $G={border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},VG=e=>e.isDirectory,GG=e=>e.isFile,qG=(e,t)=>(Object.defineProperty(e,"relativePath",{value:t?`${t}/${e.name}`:e.name}),e),WG=(e,t="")=>new Promise((n=>{const r=[],a=()=>{e.readEntries((e=>{if(0===e.length)return void n(Promise.all(r).then((e=>e.flat())));const o=e.map((e=>e?VG(e)?WG(e.createReader(),`${t}${e.name}`):GG(e)?new Promise((n=>{e.file((e=>{n(qG(e,t))}))})):void 0:null)).filter((e=>e));r.push(Promise.all(o)),a()}))};a()}));var YG=e=>function(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}(e)||function(e){return/^.*\.[\w]+$/.test(e)}(e);var ZG=(e,t)=>e.name===t.name&&e.size===t.size&&e.type===t.type,KG=e=>null!=e;var XG=new Map("3g2_video/3gpp2[3gp,3gpp_video/3gpp[3mf_model/3mf[7z_application/x-7z-compressed[aac_audio/aac[ac_application/pkix-attr-cert[adp_audio/adpcm[adts_audio/aac[ai_application/postscript[aml_application/automationml-aml+xml[amlx_application/automationml-amlx+zip[amr_audio/amr[apk_application/vnd.android.package-archive[apng_image/apng[appcache,manifest_text/cache-manifest[appinstaller_application/appinstaller[appx_application/appx[appxbundle_application/appxbundle[asc_application/pgp-keys[atom_application/atom+xml[atomcat_application/atomcat+xml[atomdeleted_application/atomdeleted+xml[atomsvc_application/atomsvc+xml[au,snd_audio/basic[avi_video/x-msvideo[avci_image/avci[avcs_image/avcs[avif_image/avif[aw_application/applixware[bdoc_application/bdoc[bin,bpk,buffer,deb,deploy,dist,distz,dll,dmg,dms,dump,elc,exe,img,iso,lrf,mar,msi,msm,msp,pkg,so_application/octet-stream[bmp,dib_image/bmp[btf,btif_image/prs.btif[bz2_application/x-bzip2[c_text/x-c[ccxml_application/ccxml+xml[cdfx_application/cdfx+xml[cdmia_application/cdmi-capability[cdmic_application/cdmi-container[cdmid_application/cdmi-domain[cdmio_application/cdmi-object[cdmiq_application/cdmi-queue[cer_application/pkix-cert[cgm_image/cgm[cjs_application/node[class_application/java-vm[coffee,litcoffee_text/coffeescript[conf,def,in,ini,list,log,text,txt_text/plain[cpp,cxx,cc_text/x-c++src[cpl_application/cpl+xml[cpt_application/mac-compactpro[crl_application/pkix-crl[css_text/css[csv_text/csv[cu_application/cu-seeme[cwl_application/cwl[cww_application/prs.cww[davmount_application/davmount+xml[dbk_application/docbook+xml[doc_application/msword[docx_application/vnd.openxmlformats-officedocument.wordprocessingml.document[dsc_text/prs.lines.tag[dssc_application/dssc+der[dtd_application/xml-dtd[dwd_application/atsc-dwd+xml[ear,jar,war_application/java-archive[ecma_application/ecmascript[emf_image/emf[eml,mime_message/rfc822[emma_application/emma+xml[emotionml_application/emotionml+xml[eot_application/vnd.ms-fontobject[eps,ps_application/postscript[epub_application/epub+zip[exi_application/exi[exp_application/express[exr_image/aces[ez_application/andrew-inset[fdf_application/fdf[fdt_application/fdt+xml[fits_image/fits[flac_audio/flac[flv_video/x-flv[g3_image/g3fax[geojson_application/geo+json[gif_image/gif[glb_model/gltf-binary[gltf_model/gltf+json[gml_application/gml+xml[go_text/x-go[gpx_application/gpx+xml[gz_application/gzip[h_text/x-h[h261_video/h261[h263_video/h263[h264_video/h264[heic_image/heic[heics_image/heic-sequence[heif_image/heif[heifs_image/heif-sequence[htm,html,shtml_text/html[ico_image/x-icon[icns_image/x-icns[ics,ifb_text/calendar[iges,igs_model/iges[ink,inkml_application/inkml+xml[ipa_application/octet-stream[java_text/x-java-source[jp2,jpg2_image/jp2[jpeg,jpe,jpg_image/jpeg[jpf,jpx_image/jpx[jpm,jpgm_image/jpm[jpgv_video/jpeg[jph_image/jph[js,mjs_text/javascript[json_application/json[json5_application/json5[jsonld_application/ld+json[jsx_text/jsx[jxl_image/jxl[jxr_image/jxr[ktx_image/ktx[ktx2_image/ktx2[less_text/less[m1v,m2v,mpe,mpeg,mpg_video/mpeg[m4a_audio/mp4[m4v_video/x-m4v[md,markdown_text/markdown[mid,midi,kar,rmi_audio/midi[mkv_video/x-matroska[mp2,mp2a,mp3,mpga,m3a,m2a_audio/mpeg[mp4,mp4v,mpg4_video/mp4[mp4a_audio/mp4[mp4s,m4p_application/mp4[odp_application/vnd.oasis.opendocument.presentation[oda_application/oda[ods_application/vnd.oasis.opendocument.spreadsheet[odt_application/vnd.oasis.opendocument.text[oga,ogg,opus,spx_audio/ogg[ogv_video/ogg[ogx_application/ogg[otf_font/otf[p12,pfx_application/x-pkcs12[pdf_application/pdf[pem_application/x-pem-file[php_text/x-php[png_image/png[ppt_application/vnd.ms-powerpoint[pptx_application/vnd.openxmlformats-officedocument.presentationml.presentation[pskcxml_application/pskc+xml[psd_image/vnd.adobe.photoshop[py_text/x-python[qt,mov_video/quicktime[rar_application/vnd.rar[rdf_application/rdf+xml[rtf_text/rtf[sass_text/x-sass[scss_text/x-scss[sgm,sgml_text/sgml[sh_application/x-sh[svg,svgz_image/svg+xml[swf_application/x-shockwave-flash[tar_application/x-tar[tif,tiff_image/tiff[toml_application/toml[ts_video/mp2t[tsx_text/tsx[tsv_text/tab-separated-values[ttc_font/collection[ttf_font/ttf[vtt_text/vtt[wasm_application/wasm[wav_audio/wav[weba_audio/webm[webm_video/webm[webmanifest_application/manifest+json[webp_image/webp[wma_audio/x-ms-wma[wmv_video/x-ms-wmv[woff_font/woff[woff2_font/woff2[xls_application/vnd.ms-excel[xlsx_application/vnd.openxmlformats-officedocument.spreadsheetml.sheet[xml_application/xml[xz_application/x-xz[yaml,yml_text/yaml[zip_application/zip".split("[").flatMap((e=>{const[t,n]=e.split("_");return t.split(",").map((e=>[e,n]))})));function QG(e,t){if(e&&t){const n=Array.isArray(t)?t:"string"==typeof t?t.split(","):[];if(0===n.length)return!0;const r=e.name||"",a=(e.type||function(e){const t=e.split(".").pop();return t&&XG.get(t)||null}(r)||"").toLowerCase(),o=a.replace(/\/.*$/,"");return n.some((e=>{const t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?o===t.replace(/\/.*$/,""):a===t}))}return!0}var JG=function(e){const t=new Map;return function(n,r){const a=n+(r?Object.entries(r).sort(((e,t)=>e[0]<t[0]?-1:1)).join():"");if(t.has(a))return t.get(a);let o=new e(n,r);return t.set(a,o),o}}(Intl.NumberFormat);var eq=["","kilo","mega","giga","tera"],tq=["","kilo","mega","giga","tera","peta"],nq=(e,t="en-US",n={})=>{if(Number.isNaN(e))return"";if(0===e)return"0 B";const{unitSystem:r="decimal",precision:a=3,unit:o="byte",unitDisplay:i="short"}=n,s="binary"===r?1024:1e3,l="bit"===o?eq:tq,c=e<0;let u=Math.abs(e),d=0;for(;u>=s&&d<l.length-1;)u/=s,d++;const p=parseFloat(u.toPrecision(a));return function(e,t,n={}){return JG(t,n).format(e)}(c?-p:p,t,{style:"unit",unit:l[d]+o,unitDisplay:i})};function rq(e){return e.reduce(((e,t)=>Array.isArray(t)?e.concat(rq(t)):e.concat(t)),[])}var aq=e=>String.fromCharCode(e+(e>25?39:97));var oq=e=>function(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=aq(t%52)+n;return aq(t%52)+n}(function(e,t){let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e}(5381,e)>>>0);function iq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}var sq=e=>{var t;return(null==(t=e.ids)?void 0:t.root)??`file:${e.id}`},lq=e=>{var t;return(null==(t=e.ids)?void 0:t.dropzone)??`file:${e.id}:dropzone`},cq=e=>{var t;return(null==(t=e.ids)?void 0:t.hiddenInput)??`file:${e.id}:input`},uq=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemDeleteTrigger)?void 0:r.call(n,t))??`file:${e.id}:item-delete:${t}`},dq=e=>oq(`${e.name}-${e.size}`),pq=e=>e.getById(cq(e));function fq(e){const t=BG(e);return e.dataTransfer?e.dataTransfer.types.some((e=>"Files"===e||"application/x-moz-file"===e)):!!t&&"files"in t}function hq(e,t,n=[],r=[]){const{prop:a,computed:o}=e,i=[],s=[],l={acceptedFiles:n,rejectedFiles:r};return t.forEach((e=>{var t;const[r,c]=function(e,t){const n="application/x-moz-file"===e.type||QG(e,t);return[n,n?null:"FILE_INVALID_TYPE"]}(e,o("acceptAttr")),[u,d]=function(e,t,n){if(KG(e.size))if(KG(t)&&KG(n)){if(e.size>n)return[!1,"FILE_TOO_LARGE"];if(e.size<t)return[!1,"FILE_TOO_SMALL"]}else{if(KG(t)&&e.size<t)return[!1,"FILE_TOO_SMALL"];if(KG(n)&&e.size>n)return[!1,"FILE_TOO_LARGE"]}return[!0,null]}(e,a("minFileSize"),a("maxFileSize")),p=n.some((t=>ZG(t,e)))||i.some((t=>ZG(t,e))),f=null==(t=a("validate"))?void 0:t(e,l),h=!f||0===f.length;if(r&&u&&h&&!p)i.push(e);else{const t=[c,d];p&&t.push("FILE_EXISTS"),h||t.push(...f??[]),s.push({file:e,errors:t.filter(Boolean)})}})),function(e,t,n){const{prop:r,computed:a}=e;return!(!a("multiple")&&t>1||(a("multiple")||t+n.length!==2)&&t+n.length>r("maxFiles"))}(e,i.length,n)||(i.forEach((e=>{s.push({file:e,errors:["TOO_MANY_FILES"]})})),i.splice(0)),{acceptedFiles:i,rejectedFiles:s}}var mq="accepted";function gq(e,t){if(!e||"file"===e.getAttribute("type"))return!1;const n=e.closest("button, a[href], input:not([type='file']), select, textarea, [tabindex], [contenteditable]");return n!=t&&jG(t,n)}function yq(e,t){const{state:n,send:r,prop:a,computed:o,scope:i,context:s}=e,l=!!a("disabled"),c=!!a("readOnly"),u=!!a("required"),d=a("allowDrop"),p=a("translations"),f=n.matches("dragging"),h=n.matches("focused")&&!l,m=s.get("acceptedFiles"),g=a("maxFiles");return{dragging:f,focused:h,disabled:l,readOnly:c,transforming:s.get("transforming"),maxFilesReached:m.length>=g,remainingFiles:Math.max(0,g-m.length),openFilePicker(){l||c||r({type:"OPEN"})},deleteFile(e,t=mq){l||c||r({type:"FILE.DELETE",file:e,itemType:t})},acceptedFiles:m,rejectedFiles:s.get("rejectedFiles"),setFiles(e){l||c||r({type:"FILES.SET",files:e,count:e.length})},clearRejectedFiles(){l||c||r({type:"REJECTED_FILES.CLEAR"})},clearFiles(){l||c||r({type:"FILES.CLEAR"})},getFileSize:e=>nq(e.size,a("locale")),createFileUrl(e,t){const n=i.getWin(),r=n.URL.createObjectURL(e);return t(r),()=>n.URL.revokeObjectURL(r)},setClipboardFiles(e){if(l||c)return!1;const t=Array.from((null==e?void 0:e.items)??[]).reduce(((e,t)=>{if("file"!==t.kind)return e;const n=t.getAsFile();return n?[...e,n]:e}),[]);return!!t.length&&(r({type:"FILE.SELECT",files:t}),!0)},getRootProps:()=>t.element({...IG.root.attrs,dir:a("dir"),id:sq(i),"data-disabled":LG(l),"data-readonly":LG(c),"data-dragging":LG(f)}),getDropzoneProps:(e={})=>t.element({...IG.dropzone.attrs,dir:a("dir"),id:lq(i),tabIndex:l||c||e.disableClick?void 0:0,role:e.disableClick?"application":"button","aria-label":p.dropzone,"aria-disabled":l||c||void 0,"data-invalid":LG(a("invalid")),"data-disabled":LG(l),"data-readonly":LG(c),"data-dragging":LG(f),onKeyDown(t){if(l||c)return;if(t.defaultPrevented)return;const n=BG(t);jG(t.currentTarget,n)&&(gq(n,t.currentTarget)||e.disableClick||"Enter"!==t.key&&" "!==t.key||r({type:"DROPZONE.CLICK",src:"keydown"}))},onClick(t){if(l||c)return;if(t.defaultPrevented)return;if(e.disableClick)return;const n=BG(t);jG(t.currentTarget,n)&&(gq(n,t.currentTarget)||("label"===t.currentTarget.localName&&t.preventDefault(),r({type:"DROPZONE.CLICK"})))},onDragOver(e){if(l||c)return;if(!d)return;e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect="copy"}catch{}if(!fq(e))return;const t=e.dataTransfer.items.length;r({type:"DROPZONE.DRAG_OVER",count:t})},onDragLeave(e){l||c||d&&(jG(e.currentTarget,e.relatedTarget)||r({type:"DROPZONE.DRAG_LEAVE"}))},onDrop(e){if(l||c)return;d&&(e.preventDefault(),e.stopPropagation());var t,n;fq(e)&&(t=e.dataTransfer.items,n=a("directory"),Promise.all(Array.from(t).filter((e=>"file"===e.kind)).map((e=>{const t=(e=>"function"==typeof e.getAsEntry?e.getAsEntry():"function"==typeof e.webkitGetAsEntry?e.webkitGetAsEntry():null)(e);if(!t)return null;if(VG(t)&&n)return WG(t.createReader(),`${t.name}`);if(GG(t)&&"function"==typeof e.getAsFile){const t=e.getAsFile();return Promise.resolve(t?qG(t,""):null)}return GG(t)?new Promise((e=>{t.file((t=>{e(qG(t,""))}))})):void 0})).filter((e=>e)))).then((e=>{r({type:"DROPZONE.DROP",files:rq(e)})}))},onFocus(){l||c||r({type:"DROPZONE.FOCUS"})},onBlur(){l||c||r({type:"DROPZONE.BLUR"})}}),getTriggerProps(){return t.button({...IG.trigger.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.trigger)??`file:${e.id}:trigger`),disabled:l||c,"data-disabled":LG(l),"data-readonly":LG(c),"data-invalid":LG(a("invalid")),type:"button",onClick(e){l||c||(jG((e=>e.getById(lq(e)))(i),e.currentTarget)&&e.stopPropagation(),r({type:"OPEN"}))}});var e,n},getHiddenInputProps:()=>t.input({id:cq(i),tabIndex:-1,disabled:l||c,type:"file",required:a("required"),capture:a("capture"),name:a("name"),accept:o("acceptAttr"),webkitdirectory:a("directory")?"":void 0,multiple:o("multiple")||a("maxFiles")>1,"aria-hidden":!0,onClick(e){e.stopPropagation(),e.currentTarget.value=""},onInput(e){if(l||c)return;const{files:t}=e.currentTarget;r({type:"FILE.SELECT",files:t?Array.from(t):[]})},style:$G}),getItemGroupProps(e={}){const{type:n=mq}=e;return t.element({...IG.itemGroup.attrs,dir:a("dir"),"data-disabled":LG(l),"data-type":n})},getItemProps(e){const{file:n,type:r=mq}=e;return t.element({...IG.item.attrs,dir:a("dir"),id:(o=i,s=dq(n),(null==(u=null==(c=o.ids)?void 0:c.item)?void 0:u.call(c,s))??`file:${o.id}:item:${s}`),"data-disabled":LG(l),"data-type":r});var o,s,c,u},getItemNameProps(e){const{file:n,type:r=mq}=e;return t.element({...IG.itemName.attrs,dir:a("dir"),id:(o=i,s=dq(n),(null==(u=null==(c=o.ids)?void 0:c.itemName)?void 0:u.call(c,s))??`file:${o.id}:item-name:${s}`),"data-disabled":LG(l),"data-type":r});var o,s,c,u},getItemSizeTextProps(e){const{file:n,type:r=mq}=e;return t.element({...IG.itemSizeText.attrs,dir:a("dir"),id:(o=i,s=dq(n),(null==(u=null==(c=o.ids)?void 0:c.itemSizeText)?void 0:u.call(c,s))??`file:${o.id}:item-size:${s}`),"data-disabled":LG(l),"data-type":r});var o,s,c,u},getItemPreviewProps(e){const{file:n,type:r=mq}=e;return t.element({...IG.itemPreview.attrs,dir:a("dir"),id:(o=i,s=dq(n),(null==(u=null==(c=o.ids)?void 0:c.itemPreview)?void 0:u.call(c,s))??`file:${o.id}:item-preview:${s}`),"data-disabled":LG(l),"data-type":r});var o,s,c,u},getItemPreviewImageProps(e){var n;const{file:r,url:a,type:o=mq}=e;if(!r.type.startsWith("image/"))throw new Error("Preview Image is only supported for image files");return t.img({...IG.itemPreviewImage.attrs,alt:null==(n=p.itemPreview)?void 0:n.call(p,r),src:a,"data-disabled":LG(l),"data-type":o})},getItemDeleteTriggerProps(e){var n;const{file:o,type:s=mq}=e;return t.button({...IG.itemDeleteTrigger.attrs,dir:a("dir"),id:uq(i,dq(o)),type:"button",disabled:l||c,"data-disabled":LG(l),"data-readonly":LG(c),"data-type":s,"aria-label":null==(n=p.deleteFile)?void 0:n.call(p,o),onClick(){l||c||r({type:"FILE.DELETE",file:o,itemType:s})}})},getLabelProps(){return t.label({...IG.label.attrs,dir:a("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.label)??`file:${e.id}:label`),htmlFor:cq(i),"data-disabled":LG(l),"data-required":LG(u)});var e,n},getClearTriggerProps:()=>t.button({...IG.clearTrigger.attrs,dir:a("dir"),type:"button",disabled:l||c,hidden:0===m.length,"data-disabled":LG(l),"data-readonly":LG(c),onClick(e){e.defaultPrevented||l||c||r({type:"FILES.CLEAR"})}})}}var bq=new WeakMap,vq=new WeakMap;function kq(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&iq(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){!function(e,t){if(null==e)throw new Error(t())}(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||iq(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=(l=t,(s=e)?`${s}.${l}`:l);r(a,n)}var s,l}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}var xq,wq=(xq={props:({props:e})=>({minFileSize:0,maxFileSize:Number.POSITIVE_INFINITY,maxFiles:1,allowDrop:!0,preventDocumentDrop:!0,defaultAcceptedFiles:[],...e,translations:{dropzone:"dropzone",itemPreview:e=>`preview of ${e.name}`,deleteFile:e=>`delete file ${e.name}`,...e.translations}}),initialState:()=>"idle",context:({prop:e,bindable:t,getContext:n})=>({acceptedFiles:t((()=>({defaultValue:e("defaultAcceptedFiles"),value:e("acceptedFiles"),isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>ZG(e,t[n]))),hash:e=>e.map((e=>`${e.name}-${e.size}`)).join(","),onChange(t){var r,a;const o=n();null==(r=e("onFileAccept"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:t,rejectedFiles:o.get("rejectedFiles")})}}))),rejectedFiles:t((()=>({defaultValue:[],isEqual:(e,t)=>e.length===(null==t?void 0:t.length)&&e.every(((e,n)=>ZG(e.file,t[n].file))),onChange(t){var r,a;const o=n();null==(r=e("onFileReject"))||r({files:t}),null==(a=e("onFileChange"))||a({acceptedFiles:o.get("acceptedFiles"),rejectedFiles:t})}}))),transforming:t((()=>({defaultValue:!1})))}),computed:{acceptAttr:({prop:e})=>function(e){if(null!=e)return"string"==typeof e?e:Array.isArray(e)?e.filter(YG).join(","):Object.entries(e).reduce(((e,[t,n])=>[...e,t,...n]),[]).filter(YG).join(",")}(e("accept")),multiple:({prop:e})=>e("maxFiles")>1},watch({track:e,context:t,action:n}){e([()=>t.hash("acceptedFiles")],(()=>{n(["syncInputElement"])}))},on:{"FILES.SET":{actions:["setFiles"]},"FILE.SELECT":{actions:["setEventFiles"]},"FILE.DELETE":{actions:["removeFile"]},"FILES.CLEAR":{actions:["clearFiles"]},"REJECTED_FILES.CLEAR":{actions:["clearRejectedFiles"]}},effects:["preventDocumentDrop"],states:{idle:{on:{OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.FOCUS":{target:"focused"},"DROPZONE.DRAG_OVER":{target:"dragging"}}},focused:{on:{"DROPZONE.BLUR":{target:"idle"},OPEN:{actions:["openFilePicker"]},"DROPZONE.CLICK":{actions:["openFilePicker"]},"DROPZONE.DRAG_OVER":{target:"dragging"}}},dragging:{on:{"DROPZONE.DROP":{target:"idle",actions:["setEventFiles"]},"DROPZONE.DRAG_LEAVE":{target:"idle"}}}},implementations:{effects:{preventDocumentDrop({prop:e,scope:t}){if(!e("preventDocumentDrop"))return;if(!e("allowDrop"))return;if(e("disabled"))return;const n=t.getDoc();return((...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))})(HG(n,"dragover",(e=>{null==e||e.preventDefault()}),!1),HG(n,"drop",(e=>{var n;jG((n=t).getById(sq(n)),BG(e))||e.preventDefault()}),!1))}},actions:{syncInputElement({scope:e,context:t}){queueMicrotask((()=>{const n=pq(e);if(!n)return;!function(e,t){const n=zG(e);try{if("DataTransfer"in n){const r=new n.DataTransfer;t.forEach((e=>{r.items.add(e)})),e.files=r.files}}catch{}}(n,t.get("acceptedFiles"));const r=e.getWin();n.dispatchEvent(new r.Event("change",{bubbles:!0}))}))},openFilePicker({scope:e}){!function(e){const t=UG.create();t.request(e),t.cleanup}((()=>{var t;null==(t=pq(e))||t.click()}))},setFiles(e){const{computed:t,context:n,event:r}=e,{acceptedFiles:a,rejectedFiles:o}=hq(e,r.files);n.set("acceptedFiles",t("multiple")?a:a.length>0?[a[0]]:[]),n.set("rejectedFiles",o)},setEventFiles(e){const{computed:t,context:n,event:r,prop:a}=e,o=n.get("acceptedFiles"),i=n.get("rejectedFiles"),{acceptedFiles:s,rejectedFiles:l}=hq(e,r.files,o,i),c=e=>t("multiple")?(n.set("acceptedFiles",(t=>[...t,...e])),void n.set("rejectedFiles",l)):e.length?(n.set("acceptedFiles",[e[0]]),void n.set("rejectedFiles",l)):void(l.length&&(n.set("acceptedFiles",n.get("acceptedFiles")),n.set("rejectedFiles",l))),u=a("transformFiles");u?(n.set("transforming",!0),u(s).then(c).catch((e=>{!function(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}(`[zag-js/file-upload] error transforming files\n${e}`)})).finally((()=>{n.set("transforming",!1)}))):c(s)},removeFile({context:e,event:t}){if("rejected"===t.itemType){const n=e.get("rejectedFiles").filter((e=>!ZG(e.file,t.file)));e.set("rejectedFiles",n)}else{const n=e.get("acceptedFiles").filter((e=>!ZG(e,t.file)));e.set("acceptedFiles",n)}},clearRejectedFiles({context:e}){e.set("rejectedFiles",[])},clearFiles({context:e}){e.set("acceptedFiles",[]),e.set("rejectedFiles",[])}}}},function(e){const t=bq.get(e);if(t)return t;const{index:n,idIndex:r}=kq(e);bq.set(e,n),vq.set(e,r)}(xq),xq);var Eq=(e,...t)=>e.filter((e=>!t.includes(e))),_q=(e,t)=>((e,t)=>-1!==e.indexOf(t))(e,t)?Eq(e,t):((e,...t)=>e.concat(t))(e,t),Sq=e=>"Array"===(null==e?void 0:e.constructor.name),Tq=(e,t)=>{if(Object.is(e,t))return!0;if(null==e&&null!=t||null!=e&&null==t)return!1;if("function"==typeof(null==e?void 0:e.isEqual)&&"function"==typeof(null==t?void 0:t.isEqual))return e.isEqual(t);if("function"==typeof e&&"function"==typeof t)return e.toString()===t.toString();if(Sq(e)&&Sq(t))return((e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Tq(e[n],t[n]))return!1;return!0})(Array.from(e),Array.from(t));if("object"!=typeof e||"object"!=typeof t)return!1;const n=Object.keys(t??Object.create(null)),r=n.length;for(let a=0;a<r;a++){if(!Reflect.has(e,n[a]))return!1}for(let a=0;a<r;a++){const r=n[a];if(!Tq(e[r],t[r]))return!1}return!0},Cq=e=>null!=e&&"object"==typeof e,Aq=e=>Cq(e)&&!(e=>Array.isArray(e))(e),Nq=e=>"function"==typeof e,Iq=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Oq=Function.prototype.toString,Rq=Oq.call(Object),Pq=e=>{if(!Cq(e)||"[object Object]"!=(e=>Object.prototype.toString.call(e))(e)||Lq(e))return!1;const t=Object.getPrototypeOf(e);if(null===t)return!0;const n=Iq(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oq.call(n)==Rq},Lq=e=>(e=>"object"==typeof e&&null!==e&&"$$typeof"in e&&"props"in e)(e)||(e=>"object"==typeof e&&null!==e&&"__v_isVNode"in e)(e),Dq=e=>e(),Mq=()=>{},Fq=(...e)=>(...t)=>{e.forEach((function(e){null==e||e(...t)}))};function jq(e,t,...n){var r;if(e in t){const r=t[e];return Nq(r)?r(...n):r}const a=new Error(`No matching key: ${JSON.stringify(e)} in ${JSON.stringify(Object.keys(t))}`);throw null==(r=Error.captureStackTrace)||r.call(Error,a,jq),a}function zq(e){if(!Pq(e)||void 0===e)return e;const t=Reflect.ownKeys(e).filter((e=>"string"==typeof e)),n={};for(const r of t){const t=e[r];void 0!==t&&(n[r]=zq(t))}return n}function Bq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function Hq(...e){1===e.length?e[0]:e[1],2!==e.length||e[0]}function Uq(e,t){if(null==e)throw new Error(t())}var $q=".",Vq=new WeakMap,Gq=new WeakMap;function qq(e){return e.join($q)}function Wq(e){return e.startsWith("#")}function Yq(e,t){return e?`${e}${$q}${t}`:t}function Zq(e){const t=Vq.get(e);if(t)return t;const{index:n,idIndex:r}=function(e){const t=new Map,n=new Map,r=(e,a)=>{t.set(e,a);const o=a.id;o&&(n.has(o)&&Hq(`[zag-js] Duplicate state id: "${o}"`),n.set(o,e));const i=a.states;if(i){Uq(a.initial,(()=>`[zag-js] Compound state "${e}" has child states but no "initial" property`)),a.initial in i||Hq(`[zag-js] Compound state "${e}" has initial "${String(a.initial)}" which is not a child state`);for(const[t,n]of Object.entries(i)){if(!n)continue;const a=Yq(e,t);r(a,n)}}};for(const[a,o]of Object.entries(e.states))o&&r(a,o);return{index:t,idIndex:n}}(e);return Vq.set(e,n),Gq.set(e,r),n}function Kq(e){return e?String(e).split($q).filter(Boolean):[]}function Xq(e,t){if(!t)return[];const n=Zq(e),r=Kq(t),a=[],o=[];for(const i of r){o.push(i);const e=qq(o),t=n.get(e);if(!t)break;a.push({path:e,state:t})}return a}function Qq(e,t){const n=Zq(e),r=Kq(t);if(!r.length)return t;const a=[];for(const s of r){a.push(s);const e=qq(a);if(!n.has(e))return t}let o=qq(a),i=n.get(o);for(;null==i?void 0:i.initial;){const e=`${o}${$q}${i.initial}`,t=n.get(e);if(!t)break;o=e,i=t}return o}function Jq(e,t){return Zq(e).has(t)}function eW(e,t,n){const r=String(t);if(Wq(r)){const t=function(e){return Wq(e)?e.slice(1):e}(r),n=function(e,t){var n;return Zq(e),null==(n=Gq.get(e))?void 0:n.get(t)}(e,t);return Uq(n,(()=>`[zag-js] Unknown state id: "${t}"`)),Qq(e,n)}if(function(e){return e.startsWith($q)}(r)&&n){return Qq(e,Yq(n,r.slice(1)))}if(!function(e){return e.includes($q)}(r)&&n){const t=Kq(n);for(let n=t.length-1;n>=1;n--){const a=Yq(t.slice(0,n).join($q),r);if(Jq(e,a))return Qq(e,a)}if(Jq(e,r))return Qq(e,r)}return Qq(e,r)}function tW(e){return Zq(e),e}var nW=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(nW||{}),rW="__init__",aW=Object.defineProperty,oW=(e,t,n)=>((e,t,n)=>t in e?aW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);function iW(e){if(e)try{if(e.ownerDocument.activeElement!==e)return;const t=e.value.length;e.setSelectionRange(t,t)}catch{}}var sW=()=>{},lW=e=>"object"==typeof e&&null!==e,cW=e=>e?"":void 0,uW=e=>e?"true":void 0,dW=e=>lW(e)&&1===e.nodeType&&"string"==typeof e.nodeName,pW=e=>lW(e)&&9===e.nodeType,fW=e=>dW(e)?e.localName||"":"#document";var hW=e=>lW(e)&&void 0!==e.nodeType,mW=e=>hW(e)&&11===e.nodeType&&"host"in e,gW=e=>dW(e)&&"input"===e.localName;function yW(e){if(!e)return!1;return wW(e.getRootNode())===e}var bW=/(textarea|select)/;function vW(e,t){var n;if(!e||!t)return!1;if(!dW(e)||!hW(t))return!1;if(dW(t)&&e===t)return!0;if(e.contains(t))return!0;const r=null==(n=t.getRootNode)?void 0:n.call(t);if(r&&mW(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function kW(e){return pW(e)?e:(e=>lW(e)&&e===e.window)(e)?e.document:(null==e?void 0:e.ownerDocument)??document}function xW(e){var t;return mW(e)?xW(e.host):pW(e)?e.defaultView??window:dW(e)?(null==(t=e.ownerDocument)?void 0:t.defaultView)??window:window}function wW(e){let t=e.activeElement;for(;null==t?void 0:t.shadowRoot;){const e=t.shadowRoot.activeElement;if(!e||e===t)break;t=e}return t}function EW(e){if("html"===fW(e))return e;const t=e.assignedSlot||e.parentNode||mW(e)&&e.host||kW(e).documentElement;return mW(t)?t.host:t}function _W(e){let t;try{if(t=e.getRootNode({composed:!0}),pW(t)||mW(t))return t}catch{}return e.ownerDocument??document}var SW=new WeakMap;function TW(e){return SW.has(e)||SW.set(e,xW(e).getComputedStyle(e)),SW.get(e)}var CW=new Set(["menu","listbox","dialog","grid","tree","region"]),AW=e=>CW.has(e),NW=e=>{var t;return(null==(t=e.getAttribute("aria-controls"))?void 0:t.split(" "))||[]};function IW(e,t){const n=new Set,r=_W(e),a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=NW(i);for(const o of e){if(!o||n.has(o))continue;n.add(o);const e=r.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");if(n&&AW(n)&&!r){if(e===t||e.contains(t))return!0;if(a(e))return!0}}}}return!1};return a(e)}function OW(e){const t=new Set;return function(e,t){const n=_W(e),r=new Set,a=e=>{const o=e.querySelectorAll("[aria-controls]");for(const i of o){if("true"!==i.getAttribute("aria-expanded"))continue;const e=NW(i);for(const o of e){if(!o||r.has(o))continue;r.add(o);const e=n.getElementById(o);if(e){const n=e.getAttribute("role"),r="true"===e.getAttribute("aria-modal");n&&CW.has(n)&&!r&&(t(e),a(e))}}}};a(e)}(e,(n=>{e.contains(n)||t.add(n)})),Array.from(t)}function RW(e){if(!e.id)return!1;const t=_W(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`,a=t.querySelector(r);return Boolean(a&&function(e){const t=e.getAttribute("role");return Boolean(t&&CW.has(t))}(e))}var PW=()=>"undefined"!=typeof document;var LW=e=>PW()&&e.test(function(){const e=navigator.userAgentData;return(null==e?void 0:e.platform)??navigator.platform}()),DW=e=>PW()&&e.test(function(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((({brand:e,version:t})=>`${e}/${t}`)).join(" "):navigator.userAgent}()),MW=()=>PW()&&!!navigator.maxTouchPoints,FW=()=>LW(/^iPhone/i)||LW(/^iPad/i)||jW()&&navigator.maxTouchPoints>1,jW=()=>LW(/^Mac/i);function zW(e){const t=function(e){var t,n,r;return(null==(t=e.composedPath)?void 0:t.call(e))??(null==(r=null==(n=e.nativeEvent)?void 0:n.composedPath)?void 0:r.call(n))}(e);return(null==t?void 0:t[0])??e.target}function BW(e){const t=e.currentTarget;if(!t)return!1;if(!t.matches("a[href], button[type='submit'], input[type='submit']"))return!1;const n=1===e.button,r=(a=e,jW()?a.metaKey:a.ctrlKey);var a;return n||r}function HW(e){return!(""!==e.pointerType||!e.isTrusted)||(DW(/Android/i)&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}var UW=e=>0===e.button,$W=e=>2===e.button||jW()&&e.ctrlKey&&0===e.button,VW={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},GW={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function qW(e,t={}){const{dir:n="ltr",orientation:r="horizontal"}=t;let a=e.key;a=VW[a]??a;return"rtl"===n&&"horizontal"===r&&a in GW&&(a=GW[a]),a}var WW=(e,t,n,r)=>{const a="function"==typeof e?e():e;return null==a||a.addEventListener(t,n,r),()=>{null==a||a.removeEventListener(t,n,r)}},YW=e=>dW(e)&&"IFRAME"===e.tagName,ZW=/^(audio|video|details)$/;function KW(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}function XW(e){if(!function(e){return gW(e)&&"radio"===e.type}(e)||!e.name)return!0;if(e.checked)return!0;const t=`input[type="radio"][name="${CSS.escape(e.name)}"]`,n=e.form??e.ownerDocument,r=Array.from(n.querySelectorAll(t)).filter((t=>t.form===e.form&&nY(t))),a=r.find((e=>e.checked));return a?a===e:r[0]===e}function QW(e,t){if(!t)return null;if(!0===t)return e.shadowRoot||null;const n=t(e);return(!0===n?e.shadowRoot:n)||null}function JW(e,t,n){const r=[...e],a=[...e],o=new Set,i=new Map;e.forEach(((e,t)=>i.set(e,t)));let s=0;for(;s<a.length;){const e=a[s++];if(!e||o.has(e))continue;o.add(e);const l=QW(e,t);if(l){const t=Array.from(l.querySelectorAll(eY)).filter(n),o=i.get(e);if(void 0!==o){const e=o+1;r.splice(e,0,...t),t.forEach(((t,n)=>{i.set(t,e+n)}));for(let n=e+t.length;n<r.length;n++)i.set(r[n],n)}else{const e=r.length;r.push(...t),t.forEach(((t,n)=>{i.set(t,e+n)}))}a.push(...t)}}return r}var eY="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",tY=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(eY));(1==n||"if-empty"==n&&0===a.length)&&dW(e)&&nY(e)&&a.unshift(e);const o=[];for(const i of a)if(nY(i))if(YW(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...tY(e,{getShadowRoot:r}))}else o.push(i);return r?JW(o,r,nY):o};function nY(e){return!(!dW(e)||e.closest("[inert]"))&&(e.matches(eY)&&(!!dW(t=e)&&(t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0)));var t}function rY(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,a=Array.from(e.querySelectorAll(eY));n&&aY(e)&&a.unshift(e);const o=[];for(const i of a)if(aY(i))if(YW(i)&&i.contentDocument){const e=i.contentDocument.body;o.push(...rY(e,{getShadowRoot:r}))}else o.push(i);if(r){const e=JW(o,r,aY);return!e.length&&n?a:e}return!o.length&&n?a:o}function aY(e){return!!(dW(e)&&e.tabIndex>0)||!(!nY(e)||(e=>KW(e)<0)(e))&&XW(e)}function oY(e){return e.tabIndex<0&&(ZW.test(e.localName)||function(e){if(null==e||!dW(e))return!1;try{return gW(e)&&null!=e.selectionStart||bW.test(e.localName)||e.isContentEditable||"true"===e.getAttribute("contenteditable")||""===e.getAttribute("contenteditable")}catch{return!1}}(e))&&(t=e,Number.isNaN(KW(t)))?0:e.tabIndex;var t}var iY=class e{constructor(){oW(this,"id",null),oW(this,"fn_cleanup"),oW(this,"cleanup",(()=>{this.cancel()}))}static create(){return new e}request(e){this.cancel(),this.id=globalThis.requestAnimationFrame((()=>{this.id=null,this.fn_cleanup=null==e?void 0:e()}))}cancel(){var e;null!==this.id&&(globalThis.cancelAnimationFrame(this.id),this.id=null),null==(e=this.fn_cleanup)||e.call(this),this.fn_cleanup=void 0}isActive(){return null!==this.id}};function sY(e){const t=iY.create();return t.request(e),t.cleanup}function lY(e){const t=new Set;function n(e){const n=globalThis.requestAnimationFrame(e);t.add((()=>globalThis.cancelAnimationFrame(n)))}return n((()=>n(e))),function(){t.forEach((e=>e()))}}function cY(e,t){const{defer:n}=t,r=n?sY:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(function(e,t){if(!e)return;const{attributes:n,callback:r}=t,a=new(e.ownerDocument.defaultView||window).MutationObserver((e=>{for(const t of e)"attributes"===t.type&&t.attributeName&&n.includes(t.attributeName)&&r(t)}));return a.observe(e,{attributes:!0,attributeFilter:n}),()=>a.disconnect()}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function uY(e){const t=()=>{const t=xW(e);e.dispatchEvent(new t.MouseEvent("click"))};DW(/Firefox/i)?function(e,t,n){const r=sY((()=>{e.removeEventListener(t,a,!0),n()})),a=()=>{r(),n()};e.addEventListener(t,a,{once:!0,capture:!0})}(e,"keyup",t):queueMicrotask(t)}function dY(e){const t=EW(e);return["html","body","#document"].includes(fW(t))?kW(t).body:dW(t)&&hY(t)?t:dY(t)}var pY=/auto|scroll|overlay|hidden|clip/,fY=new Set(["inline","contents"]);function hY(e){const t=xW(e),{overflow:n,overflowX:r,overflowY:a,display:o}=t.getComputedStyle(e);return pY.test(n+a+r)&&!fY.has(o)}function mY(e,t){const{rootEl:n,...r}=t||{};e&&n&&hY(n)&&function(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}(n)&&e.scrollIntoView(r)}function gY(e,t){if(!e)return sW;const n=Object.keys(t).reduce(((t,n)=>(t[n]=e.style.getPropertyValue(n),t)),{});return r=n,a=t,Object.keys(r).every((e=>r[e]===a[e]))?sW:(Object.assign(e.style,t),()=>{Object.assign(e.style,n),0===e.style.length&&e.removeAttribute("style")});var r,a}function yY(e,t){const{timeout:n,rootNode:r}=t,a=xW(r),o=kW(r),i=new a.AbortController;return function(e,t,n){const{signal:r}=t;return[new Promise(((t,a)=>{const o=setTimeout((()=>{a(new Error(`Timeout of ${n}ms exceeded`))}),n);r.addEventListener("abort",(()=>{clearTimeout(o),a(new DOMException("Promise aborted","AbortError"))})),e.then((e=>{r.aborted||(clearTimeout(o),t(e))})).catch((e=>{r.aborted||(clearTimeout(o),a(e))}))})),()=>t.abort()]}(new Promise((t=>{const n=e();if(n)return void t(n);const r=new a.MutationObserver((()=>{const n=e();n&&n.isConnected&&(r.disconnect(),t(n))}));r.observe(o.body,{childList:!0,subtree:!0})})),i,n)}var bY=void 0!==globalThis.document?X.useLayoutEffect:X.useEffect;function vY(e){const t=e().value??e().defaultValue,n=e().isEqual??Object.is,[r]=X.useState(t),[a,o]=X.useState(r),i=void 0!==e().value,s=X.useRef(a);s.current=i?e().value:a;const l=X.useRef(s.current);bY((()=>{l.current=s.current}),[a,e().value]);return{initial:r,ref:s,get:function(){return i?e().value:a},set(t){(e().sync?ue.flushSync:Dq)((()=>(t=>{var r,a;const s=l.current,c=Nq(t)?t(s):t;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:c,prev:s}),i||o(c),n(c,s)||null==(a=(r=e()).onChange)||a.call(r,c,s)})(t)))},invoke(t,n){var r,a;null==(a=(r=e()).onChange)||a.call(r,t,n)},hash(t){var n,r;return(null==(r=(n=e()).hash)?void 0:r.call(n,t))??String(t)}}}vY.cleanup=e=>{X.useEffect((()=>e),[])},vY.ref=e=>{const t=X.useRef(e);return{get:()=>t.current,set:e=>{t.current=e}}};var kY=(e,t)=>{const n=X.useRef(!1),r=X.useRef(!1);X.useEffect((()=>{if(n.current&&r.current)return t();r.current=!0}),[...(e??[]).map((e=>"function"==typeof e?e():e))]),X.useEffect((()=>(n.current=!0,()=>{n.current=!1})),[])};function xY(e,t={}){var n,r,a,o;const i=X.useMemo((()=>{const{id:e,ids:n,getRootNode:r}=t;return function(e){const t=()=>{var t;return(null==(t=e.getRootNode)?void 0:t.call(e))??document},n=()=>kW(t());return{...e,getRootNode:t,getDoc:n,getWin:()=>n().defaultView??window,getActiveElement:()=>wW(t()),isActiveElement:yW,getById:e=>t().getElementById(e)}}({id:e,ids:n,getRootNode:r})}),[t]),s=(...t)=>{e.debug&&console.log(...t)},l=function(e){const t=wY(e);return function(e){return t.current[e]}}((null==(n=e.props)?void 0:n.call(e,{props:zq(t),scope:i}))??t),c=wY(null==(r=e.context)?void 0:r.call(e,{prop:l,bindable:vY,scope:i,flush:EY,getContext:()=>u,getComputed:()=>E,getRefs:()=>y,getEvent:()=>m()})),u={get(e){var t;return null==(t=c.current)?void 0:t[e].ref.current},set(e,t){var n;null==(n=c.current)||n[e].set(t)},initial(e){var t;return null==(t=c.current)?void 0:t[e].initial},hash(e){var t,n;const r=null==(t=c.current)?void 0:t[e].get();return null==(n=c.current)?void 0:n[e].hash(r)}},d=X.useRef(new Map),p=X.useRef(null),f=X.useRef(null),h=X.useRef({type:""}),m=()=>({...h.current,current:()=>h.current,previous:()=>f.current}),g=()=>({..._,matches:(...e)=>e.some((e=>function(e,t){return!!e&&(e===t||e.startsWith(`${t}${$q}`))}(_.ref.current,e))),hasTag:t=>function(e,t,n){return Xq(e,t).some((e=>{var t;return null==(t=e.state.tags)?void 0:t.includes(n)}))}(e,_.ref.current,t)}),y=function(e){const t=X.useRef(e);return{get:e=>t.current[e],set(e,n){t.current[e]=n}}}((null==(a=e.refs)?void 0:a.call(e,{prop:l,context:u}))??{}),b=()=>({state:g(),context:u,event:m(),prop:l,send:A,action:v,guard:k,track:kY,refs:y,computed:E,flush:EY,scope:i,choose:w}),v=t=>{const n=Nq(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.actions)?void 0:r[t];return a||Bq(`[zag-js] No implementation found for action "${JSON.stringify(t)}"`),a}));for(const e of r)null==e||e(b())},k=t=>{var n,r;return Nq(t)?t(b()):null==(r=null==(n=e.implementations)?void 0:n.guards)?void 0:r[t](b())},x=t=>{const n=Nq(t)?t(b()):t;if(!n)return;const r=n.map((t=>{var n,r;const a=null==(r=null==(n=e.implementations)?void 0:n.effects)?void 0:r[t];return a||Bq(`[zag-js] No implementation found for effect "${JSON.stringify(t)}"`),a})),a=[];for(const e of r){const t=null==e?void 0:e(b());t&&a.push(t)}return()=>a.forEach((e=>null==e?void 0:e()))},w=e=>{return(t=e,null==t?[]:Array.isArray(t)?t:[t]).find((e=>{let t=!e.guard;return(e=>"string"==typeof e)(e.guard)?t=!!k(e.guard):Nq(e.guard)&&(t=e.guard(b())),t}));var t},E=t=>{Uq(e.computed,(()=>"[zag-js] No computed object found on machine"));return(0,e.computed[t])({context:u,event:m(),prop:l,refs:y,scope:i,computed:E})},_=vY((()=>({defaultValue:eW(e,e.initialState({prop:l})),onChange(t,n){var r,a;const{exiting:o,entering:i}=function(e,t,n,r){var a,o,i,s;const l=t?Xq(e,t):[],c=Xq(e,n);let u=0;for(;u<l.length&&u<c.length&&(null==(a=l[u])?void 0:a.path)===(null==(o=c[u])?void 0:o.path);)u+=1;let d=l.slice(u).reverse(),p=c.slice(u);const f=(null==(i=l.at(-1))?void 0:i.path)===(null==(s=c.at(-1))?void 0:s.path);return r&&f&&(d=l.slice().reverse(),p=c),{exiting:d,entering:p}}(e,n,t,null==(r=p.current)?void 0:r.reenter);if(o.forEach((e=>{const t=d.current.get(e.path);null==t||t(),d.current.delete(e.path)})),o.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.exit)})),v(null==(a=p.current)?void 0:a.actions),i.forEach((e=>{var t;const n=x(null==(t=e.state)?void 0:t.effects);n&&d.current.set(e.path,n)})),n===rW){v(e.entry);const t=x(e.effects);t&&d.current.set(rW,t)}i.forEach((e=>{var t;v(null==(t=e.state)?void 0:t.entry)}))}}))),S=X.useRef(void 0),T=X.useRef(nW.NotStarted);bY((()=>{queueMicrotask((()=>{const e=T.current===nW.Started;T.current=nW.Started,s(e?"rehydrating...":"initializing...");const t=S.current??_.initial;_.invoke(t,e?_.get():rW)}));const t=d.current;return()=>{const n=C();s("unmounting..."),S.current=n,T.current=nW.Stopped,t.forEach((e=>null==e?void 0:e())),d.current=new Map,p.current=null,queueMicrotask((()=>{v(e.exit),T.current=nW.Stopped}))}}),[]);const C=()=>"ref"in _?_.ref.current:_.get(),A=t=>{queueMicrotask((()=>{if(T.current!==nW.Started)return;f.current=h.current,h.current=t;let n=C();const{transitions:r,source:a}=function(e,t,n){var r,a;const o=Xq(e,t);for(let s=o.length-1;s>=0;s--){const e=null==(r=o[s])?void 0:r.state.on,t=null==e?void 0:e[n];if(t)return{transitions:t,source:null==(a=o[s])?void 0:a.path}}const i=e.on;return{transitions:null==i?void 0:i[n],source:void 0}}(e,n,t.type),o=w(r);if(!o)return;p.current=o;const i=eW(e,o.target??n,a);s("transition",t.type,o.target||n,`(${o.actions})`);i!==n?ue.flushSync((()=>_.set(i))):o.reenter?_.invoke(n,n):v(o.actions??[])}))};return null==(o=e.watch)||o.call(e,b()),{state:g(),send:A,context:u,prop:l,scope:i,refs:y,computed:E,event:m(),getStatus:()=>T.current}}function wY(e){const t=X.useRef(e);return t.current=e,t}function EY(e){queueMicrotask((()=>{ue.flushSync((()=>e()))}))}var _Y,SY=(_Y=e=>e,new Proxy({},{get:(e,t)=>"style"===t?e=>_Y({style:e}).style:_Y}));const TY=X.createContext(null);function CY({children:e,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,onFileAccept:i,onFileChange:s,onFileReject:l}){const c=X.useId(),u=qO(),d=yq(xY(wq,{id:c,accept:t,maxFiles:n,maxFileSize:r,preventDocumentDrop:a,acceptedFiles:o,getRootNode:()=>{var e;return(null==(e=null==u?void 0:u.shadowHost)?void 0:e.shadowRoot)??document},onFileAccept:i,onFileChange:s,onFileReject:l}),SY);return og.jsx(TY.Provider,{value:d,children:e})}function AY(){const e=X.useContext(TY);if(!e)throw new Error("useFileUploadApi must be used within FileUploadRoot");return e}function NY(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}const IY={"application/pdf":"filePdf","text/plain":"fileText","text/markdown":"fileMarkdown","text/html":"fileHtml","text/csv":"fileCsv","text/x-log":"fileLog","application/json":"fileJson","text/x-sql":"fileSql","application/x-sql":"fileSql","text/x-script.python":"filePy","text/x-python":"filePy","text/x-python-script":"filePy"};function OY(e){return e.startsWith("image/")}const RY={"image/png":[".png"],"image/jpeg":[".jpg",".jpeg"],"image/webp":[".webp"],"application/pdf":[".pdf"],"text/plain":[".txt",".text",".bat",".cfg",".conf",".def",".dic",".in",".list"],"text/x-log":[".log"],"text/markdown":[".md",".markdown"],"text/html":[".html",".htm"],"text/csv":[".csv"],"text/xml":[".xml"],"text/css":[".css"],"application/json":[".json"],"application/yaml":[".yaml",".yml"],"application/x-yaml":[".yaml",".yml"],"text/x-yaml":[".yaml",".yml"],"application/toml":[".toml"],"application/x-toml":[".toml"],"application/graphql":[".graphql",".gql"],"application/x-graphql":[".graphql",".gql"],"text/x-graphql":[".graphql",".gql"],"application/x-ndjson":[".ndjson"],"application/json5":[".json5"],"application/x-json5":[".json5"],"application/javascript":[".js",".mjs"],"text/javascript":[".js",".mjs"],"application/typescript":[".ts"],"text/x-typescript":[".ts"],"text/jsx":[".jsx"],"text/tsx":[".tsx"],"text/x-sh":[".sh"],"text/x-bash":[".bash"],"application/x-bash":[".bash"],"text/x-zsh":[".zsh"],"text/x-shellscript":[".sh",".ksh"],"application/x-powershell":[".ps1"],"text/vbscript":[".vbs"],"text/x-awk":[".awk"],"application/x-awk":[".awk"],"text/x-c":[".c",".h"],"text/x-c++":[".cpp",".cc",".cxx",".hh"],"text/x-csharp":[".cs"],"text/x-objectivec":[".m"],"text/x-objectivec++":[".mm"],"text/x-java":[".java"],"text/x-scala":[".scala"],"application/x-scala":[".scala"],"text/x-kotlin":[".kt"],"text/x-groovy":[".groovy"],"text/x-clojure":[".clj"],"text/x-go":[".go"],"text/x-golang":[".go"],"text/x-rust":[".rs"],"application/x-rust":[".rs"],"text/x-swift":[".swift"],"text/x-dart":[".dart"],"text/x-python":[".py"],"text/x-script.python":[".py"],"text/x-python-script":[".py"],"text/x-ruby":[".rb"],"text/x-perl":[".pl"],"text/x-lua":[".lua"],"text/x-r":[".r"],"text/x-R":[".r"],"text/x-julia":[".jl"],"text/x-elixir":[".ex"],"text/x-erlang":[".erl"],"text/x-haskell":[".hs"],"text/x-lisp":[".lisp"],"text/x-php":[".php"],"application/x-php":[".php"],"application/x-httpd-php":[".php"],"application/x-httpd-php-source":[".php"],"text/x-tex":[".tex"],"text/x-rst":[".rst"],"text/x-handlebars":[".hbs"],"text/x-mustache":[".mustache"],"text/x-ejs":[".ejs"],"text/x-jinja2":[".jinja",".jinja2"],"text/x-liquid":[".liquid"],"text/x-erb":[".erb"],"text/x-twig":[".twig"],"text/x-pug":[".pug"],"text/x-jade":[".jade"],"text/x-tmpl":[".tmpl"],"text/x-astro":[".astro"],"text/x-sass":[".sass"],"text/x-scss":[".scss"],"text/x-less":[".less"],"text/x-sql":[".sql"],"application/x-sql":[".sql"],"text/x-makefile":[".makefile",".mk"],"text/x-cmake":[".cmake"],"text/x-dockerfile":[".dockerfile"],"text/x-gradle":[".gradle"],"text/x-ini":[".ini"],"text/x-properties":[".properties"],"text/x-protobuf":[".proto"],"application/x-protobuf":[".proto"],"text/x-hcl":[".hcl"],"text/x-terraform":[".tf"],"application/x-terraform":[".tf"],"text/x-diff":[".diff"],"text/x-patch":[".patch"],"application/x-patch":[".patch"],"text/x-asm":[".asm",".s"],"message/rfc822":[".eml",".mht",".mhtml",".mime",".nws"],"text/srt":[".srt"],"application/x-subrip":[".srt"],"text/x-subrip":[".srt"],"text/vtt":[".vtt"],"text/x-vcard":[".vcf"],"text/calendar":[".ics",".ifb"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":[".pptx"],"application/vnd.oasis.opendocument.text":[".odt"],"application/vnd.oasis.opendocument.spreadsheet":[".ods"],"application/vnd.oasis.opendocument.presentation":[".odp"],"application/vnd.apple.pages":[".pages"],"application/vnd.apple.numbers":[".numbers"],"application/vnd.apple.keynote":[".key"],"application/x-iwork-pages-sffpages":[".pages"],"application/x-iwork-numbers-sffnumbers":[".numbers"],"application/x-iwork-keynote-sffkey":[".key"]},PY=new Set(Object.keys(RY)),LY=10485760,DY=Object.entries(RY).reduce(((e,[t,n])=>{for(const r of n)e[r]=t;return e}),{});function MY(e){var t;if(e.type)return e;const n=`.${null==(t=e.name.split(".").pop())?void 0:t.toLowerCase()}`,r=DY[n];return r?new File([e],e.name,{type:r}):e}const FY=nV("div",{_id:"aiChatMessage__Files"}),jY=({children:e,...t})=>{const{message:n}=TG();if("user"!==n.role)return null;const r=(n.parts??[]).filter((e=>{if("file"!==e.type)return!1;const t=e.mediaType;return PY.has(t??"")}));return r.length?og.jsx(FY,{...t,children:e(r)}):null},zY=nV("button",{_id:"aiChatMessage__File"}),BY=({url:e,name:t,mediaType:n,onClick:r,...a})=>{const{openImagePreview:o}=EG(),[i,s]=X.useState(!0),l=X.useMemo((()=>new File([],t??"file",{type:n})),[t,n]);return og.jsx(lZ.Provider,{value:{file:l,objectUrl:e,isLoading:i,setIsLoading:s,onRemove:()=>{}},children:og.jsx(zY,{type:"button","aria-label":OY(n??"")?`Preview ${t??"file"}`:`Open ${t??"file"} in new tab`,"data-loading":H$(i),onClick:NY(r,(()=>{if(OY(n??""))o({url:e,name:t??"file"});else if(e)if(e.startsWith("data:")){const n=document.createElement("a");n.href=e,n.download=t??"file",n.click()}else window.open(e,"_blank","noopener,noreferrer")})),...a})})},HY=nV("div",{_id:"aiChatInput__Fieldset"}),UY=e=>{const t=AY();return og.jsx(HY,{...t.getDropzoneProps({disableClick:!0}),"data-drag-over":H$(t.dragging),...e})},$Y=({...e})=>{const{files:t,setFiles:n,showInputNotification:r}=xJ();return og.jsx(CY,{accept:RY,maxFiles:10,maxFileSize:LY,preventDocumentDrop:!0,acceptedFiles:t,onFileAccept:e=>n(e.files),onFileReject:e=>{const t=function(e){var t;if(!e.length)return null;const n=t=>e.some((e=>e.errors.includes(t)));if(n("TOO_MANY_FILES"))return{title:"Attachment limit reached",message:"You can only attach up to 10 files per message."};if(n("FILE_INVALID_TYPE"))return{title:"Unsupported file type",message:"Supported formats include images, PDFs, text, code, and document files."};if(n("FILE_TOO_LARGE"))return{title:"File too large",message:"Files must be smaller than 10MB."};if(n("FILE_EXISTS"))return{title:"File already exists",message:`The file "${(null==(t=e.find((e=>e.errors.includes("FILE_EXISTS"))))?void 0:t.file.name)??"file"}" is already attached to this message.`};return{title:"File rejected",message:"This file could not be added."}}(e.files);t&&r(t)},children:og.jsx(UY,{...e})})},VY=nV("div",{_id:"aiChatInput__DropZone"}),GY=nV("div",{_id:"aiChatInput__Notification"}),qY=e=>{const{inputNotification:t}=xJ();return t?og.jsx(GY,{role:"alert",...e}):null},WY=nV("p",{_id:"aiChatInput__NotificationTitle"}),YY=({children:e,...t})=>{const{inputNotification:n}=xJ();return(null==n?void 0:n.title)?og.jsxs(WY,{...t,children:[e,n.title]}):null},ZY=nV("p",{_id:"aiChatInput__NotificationMessage"}),KY=e=>{const{inputNotification:t}=xJ();return og.jsx(ZY,{...e,children:null==t?void 0:t.message})},XY=nV("button",{_id:"aiChatInput__NotificationClose"}),QY=({onClick:e,...t})=>{const{clearInputNotification:n}=xJ();return og.jsx(XY,{type:"button","aria-label":"Dismiss",onClick:NY(e,n),...t})},JY=nV("div",{_id:"aiChatInput__NotificationContent"}),eZ=nV("div",{_id:"aiChatInput__NotificationHeader"}),tZ=nV(kG,{_id:"aiChatInput__FileUploadButtonIcon",iconKey:"fileUpload"}),nZ=nV("button",{_id:"aiChatInput__FileUploadButton"}),rZ=e=>{const{aiChatSettings:t}=oR(),n=AY(),{onClick:r,...a}=e;return og.jsx(nZ,{type:"button","aria-label":"Upload file",disabled:t.isViewOnly,onClick:NY(r,(()=>n.openFilePicker())),...a})},aZ=nV("input",{_id:"aiChatInput__FileInput"}),oZ=e=>{const t=AY();return og.jsx(aZ,{...e,...t.getHiddenInputProps()})},iZ=nV("div",{_id:"aiChatInput__FileList"}),sZ=({children:e,...t})=>{const n=AY().acceptedFiles;return n.length?og.jsx(iZ,{...t,children:e(n)}):null},lZ=Q.createContext(null);function cZ(){const e=Q.useContext(lZ);if(!e)throw new Error("useFileContext must be used within EmbeddedChatPrimitiveFileItem");return e}const uZ=nV("div",{_id:"aiChatInput__FileItem"}),dZ=({file:e,...t})=>{const n=AY(),[r,a]=X.useState(void 0),[o,i]=X.useState(!0);X.useEffect((()=>n.createFileUrl(e,(e=>{a(e),i(!0)}))),[e]);return og.jsx(lZ.Provider,{value:{file:e,objectUrl:r,isLoading:o,setIsLoading:i,onRemove:()=>n.deleteFile(e)},children:og.jsx(uZ,{"data-loading":H$(o),...t})})},pZ=nV("button",{_id:"aiChatInput__FilePreviewTrigger"}),fZ=({onClick:e,...t})=>{const{objectUrl:n,file:r}=cZ(),{openImagePreview:a}=EG();return og.jsx(pZ,{type:"button","aria-label":`Preview ${r.name}`,disabled:!n,onClick:NY(e,(()=>{n&&a({url:n,name:r.name})})),...t})},hZ=nV("span",{_id:"aiChatInput__FileContent"}),mZ=e=>og.jsx(hZ,{...e}),gZ=nV("img",{_id:"aiChatInput__FileThumbnail"}),yZ=({onLoad:e,...t})=>{const{objectUrl:n,file:r,setIsLoading:a}=cZ();return og.jsx(gZ,{src:n,alt:r.name,onLoad:NY(e,(()=>a(!1))),...t})},bZ=({className:e})=>{const{file:t}=cZ(),n=IY[MY(t).type]??"file";return og.jsx(kG,{iconKey:n,className:e})},vZ=nV("span",{_id:"aiChatInput__FileName"}),kZ=e=>{const{file:t}=cZ();return og.jsx(vZ,{...e,children:t.name})},xZ=nV("button",{_id:"aiChatInput__FileRemove"}),wZ=nV(kG,{_id:"aiChatInput__FileRemoveIcon",iconKey:"close"}),EZ=({onClick:e,...t})=>{const{onRemove:n}=cZ();return og.jsx(xZ,{type:"button","aria-label":"Remove file",onClick:NY(e,n),...t})};var _Z=J[" useInsertionEffect ".trim().toString()]||HO;function SZ({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,o,i]=function({defaultProp:e,onChange:t}){const[n,r]=X.useState(e),a=X.useRef(n),o=X.useRef(t);return _Z((()=>{o.current=t}),[t]),X.useEffect((()=>{var e;a.current!==n&&(null==(e=o.current)||e.call(o,n),a.current=n)}),[n,a]),[n,r,o]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:a;{const t=X.useRef(void 0!==e);X.useEffect((()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s}),[s,r])}const c=X.useCallback((t=>{var n;if(s){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&(null==(n=i.current)||n.call(i,r))}else o(t)}),[s,e,o,i]);return[l,c]}const TZ=(e,t)=>{const{isOpen:n,onOpenChange:r,defaultOpen:a=!1,shortcutKey:o,triggerSelector:i=t.defaultTriggerSelector}=e??{},{logEvent:s}=lR(),[l=a,c]=SZ({prop:n,defaultProp:a??!1,onChange:r}),u=i||t.defaultTriggerSelector;(e=>{const{triggerSelector:t,onTriggerClick:n}=e;X.useEffect((()=>{const e=e=>{var r;const a=e.target;t&&(null==(r=null==a?void 0:a.matches)?void 0:r.call(a,t))&&(null==n||n())};return t&&document.addEventListener("click",e),()=>{t&&document.removeEventListener("click",e)}}),[t,n])})({triggerSelector:u,onTriggerClick:u?()=>c(!l):void 0});const d=X.useRef(!0);X.useEffect((()=>{d.current?d.current=!1:s({eventName:l?`${t.eventNamePrefix}_opened`:`${t.eventNamePrefix}_closed`,properties:{}})}),[l,t.eventNamePrefix]);const p=X.useRef(l);return p.current=l,X.useEffect((()=>{const e=e=>{o&&(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===o.toLowerCase()&&(e.preventDefault(),e.stopPropagation(),c(!0)),"Escape"===e.key&&p.current&&(e.preventDefault(),c(!1))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[o,c]),{isOpen:l,setOpen:c,shortcutKey:o}},CZ=X.createContext(void 0),AZ=({children:e,value:t})=>og.jsx(CZ.Provider,{value:t,children:e}),NZ=()=>X.useContext(CZ),IZ=X.createContext(void 0),OZ=({children:e,value:t})=>og.jsx(IZ.Provider,{value:t,children:e}),RZ=()=>{const e=X.useContext(IZ);if(!e)throw new Error("useSidebarChat must be used within a SidebarChatProvider");return e},PZ=()=>X.useContext(IZ),LZ=new TextEncoder;async function DZ(e,t){return n=await async function(e,t){return crypto.subtle.digest(e.toUpperCase(),"string"==typeof t?LZ.encode(t):new Uint8Array(t))}(e,t),[...new Uint8Array(n)].map((e=>e.toString(16).padStart(2,"0"))).join("");var n}function MZ(e){const t=/[?&]expires=(\d+)/.exec(e);return t?1e3*Number.parseInt(t[1],10):null}const FZ=async e=>{try{const t=await fetch(e,{method:"GET"});if(!t.ok)throw new Error(`Failed to fetch challenge: ${t.statusText}`);const n=await t.json(),{challenge:r,algorithm:a,salt:o,maxnumber:i}=n,{promise:s}=await function(e,t,n="SHA-256",r=1e6,a=0){const o=new AbortController,i=Date.now();return{promise:(async()=>{for(let s=a;s<=r;s+=1){if(o.signal.aborted)return null;if(await DZ(n,t+s)===e)return{number:s,took:Date.now()-i}}return null})(),controller:o}}(r,o,a,i),l=await s||void 0;if(!l)throw new Error("Challenge not solved");return{payload:{number:l.number,...n},expiresAt:MZ(o)}}catch(t){return void console.warn("[captcha] Error fetching/solving challenge:",t)}},jZ=e=>{const[t,n]=X.useState(!1);return X.useEffect((()=>{const t=window.matchMedia(e);n(t.matches);const r=e=>n(e.matches);return t.addEventListener("change",r),()=>t.removeEventListener("change",r)}),[e]),t};function zZ(e,t){if(400===e&&"object"==typeof t&&null!==t){const e=(t.detail??"").toLowerCase();if(e.includes("challenge")||e.includes("proof-of-work"))return"pow"}if(401===e&&"object"==typeof t&&null!==t){const e=t.detail??"";if(e.includes("Invalid end-user JWT")||e.includes("Bearer token required"))return"session"}return null}function BZ(e){if(!e)return{};if(e instanceof Headers){const t={};return e.forEach(((e,n)=>{t[n]=e})),t}return Array.isArray(e)?Object.fromEntries(e):e}function HZ(e,t,n,r){return{...e?{"x-inkeep-app-id":e}:{},...t?{Authorization:`Bearer ${t}`}:{},...BZ(r),...n}}function UZ({appId:e,authToken:t,getCaptchaHeader:n,invalidateCaptcha:r,refreshSession:a}){const o=X.useRef(e);o.current=e;const i=X.useRef(t);i.current=t;const s=X.useRef(n);s.current=n;const l=X.useRef(r);l.current=r;const c=X.useRef(a);c.current=a;return{fetchWithAuth:X.useCallback((async(e,t)=>{const n=await s.current(),r=HZ(o.current,i.current,n,null==t?void 0:t.headers),a=await fetch(e,{...t,headers:r});if(400!==a.status&&401!==a.status)return a;let u;try{u=await a.clone().json()}catch{return a}const d=zZ(a.status,u);if("pow"===d){l.current();const n=await s.current(),r=HZ(o.current,i.current,n,null==t?void 0:t.headers);return fetch(e,{...t,headers:r})}if("session"===d&&c.current){const n=await c.current();if(!n)return a;const r=await s.current(),i=HZ(o.current,n,r,null==t?void 0:t.headers);return fetch(e,{...t,headers:i})}return a}),[])}}const $Z=()=>{},VZ=async()=>({});function GZ(e){return new Date(e.expiresAt).getTime()-3e4<=Date.now()}const qZ=({baseUrl:e,appId:t,getCaptchaHeader:n,invalidateCaptcha:r,optOutAllAnalytics:a,enabled:o=!0})=>{const i=o&&t&&!a?`inkeep_session_${t}`:null,[s,l]=(e=>{const[t,n]=X.useState((()=>{if(!e)return null;try{const t=localStorage.getItem(e);return null!==t?JSON.parse(t):null}catch{return null}}));return[t,X.useCallback((t=>{if(n(t),e)try{null===t?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))}catch{}}),[e])]})(i),c=X.useRef(o);X.useEffect((()=>{const e=c.current;if(c.current=o,e&&!o&&t&&!a){try{localStorage.removeItem(`inkeep_session_${t}`)}catch{}l(null)}}),[o,t,a,l]);const{fetchWithAuth:u}=UZ({appId:t,authToken:void 0,getCaptchaHeader:n??VZ,invalidateCaptcha:r??$Z}),d=X.useRef(e);d.current=e;const p=X.useRef(t);p.current=t;const f=X.useRef(s);f.current=s;const h=X.useRef(l);h.current=l;const m=X.useRef(u);m.current=u;const g=X.useRef(null),y=X.useRef(o);y.current=o;const b=X.useCallback((async e=>{if(!y.current)return null;if(!d.current||!p.current)return null;if(!e&&g.current)return g.current;const t=`${d.current}/run/auth/apps/${p.current}/anonymous-session`,n=(async()=>{var n;try{const r={"Content-Type":"application/json"},a=null==(n=f.current)?void 0:n.token;a&&(r.Authorization=`Bearer ${a}`);const o=await m.current(t,{method:"POST",headers:r,signal:e});if(!o.ok)throw new Error(`Failed to fetch anonymous session: ${o.status}`);const i=await o.json();return h.current({token:i.token,expiresAt:i.expiresAt}),i.token}catch(jNe){return jNe instanceof Error&&"AbortError"===jNe.name||console.error("[anonymous-session] fetch failed",jNe),null}finally{e||(g.current=null)}})();return e||(g.current=n),n}),[]),v=X.useRef(!1);X.useEffect((()=>{if(!o)return;if(!e||!t)return;const n=!v.current;if(v.current=!0,!n&&f.current&&!GZ(f.current))return;if(g.current)return;const r=new AbortController;return b(r.signal),()=>r.abort()}),[e,t,o,b]),X.useEffect((()=>{if(!o)return;if(!e||!t||!(null==s?void 0:s.expiresAt))return;const n=new Date(s.expiresAt).getTime()-3e4-Date.now();if(n<=0)return;const r=setTimeout((()=>b()),Math.min(n,2147483647));return()=>clearTimeout(r)}),[e,t,o,null==s?void 0:s.expiresAt,b]),X.useEffect((()=>{if(!o)return;if(!e||!t)return;const n=()=>{if("visible"!==document.visibilityState)return;const e=f.current;e&&!GZ(e)||b()};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)}),[e,t,o,b]);const k=X.useCallback((()=>b()),[b]);return{sessionToken:(null==s?void 0:s.token)??null,refreshSession:k}};const WZ=()=>{const{baseSettings:e}=oR(),{getAuthToken:t}=e,[n,r]=X.useState(null),[a,o]=X.useState(!!t),i=X.useRef(null),s=X.useRef(t);s.current=t;const l=X.useCallback((async()=>{const e=s.current;if(!e)return null;if(i.current)return i.current;const t=(async()=>{try{const t=await e();return r(t),t}catch(jNe){return console.error("[useAuthToken] getAuthToken failed",jNe),r(null),null}finally{i.current=null,o(!1)}})();return i.current=t,t}),[]);X.useEffect((()=>{if(!t)return r(null),void o(!1);l()}),[t,l]),X.useEffect((()=>{if(!t||!n)return;const e=function(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")));return"number"==typeof n.exp?1e3*n.exp:null}catch{return null}}(n);if(!e)return;const r=e-3e4-Date.now();if(r<=0)return;const a=setTimeout((()=>l()),Math.min(r,2147483647));return()=>clearTimeout(a)}),[t,n,l]);const c=X.useCallback((async()=>s.current?l():null),[l]);return{authToken:n,isLoading:a,refreshToken:c}},YZ=()=>{};function ZZ(e=21){const t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t,(e=>e.toString(36))).join("").slice(0,e)}const KZ=new Map;function XZ(e="id"){const t=(KZ.get(e)||0)+1;return KZ.set(e,t),`${e}${t}`}function QZ(e){const t=Number(e.code)||Number(e.statusCode);if(t&&!Number.isNaN(t))return t;try{const t=Number(JSON.parse(e.message??"").status);return t&&!Number.isNaN(t)?t:null}catch{return null}}const JZ="Hmm.. \n\nIt seems I might be having some issues right now. Please clear the chat and try again.",eK="Please try again.",tK=()=>{const{baseSettings:e,aiChatSettings:t}=oR(),[n="",r]=SZ({prop:t.conversationIdOverride,defaultProp:t.conversationIdOverride??""}),a=PP(),o=NZ(),i=PZ(),{logEvent:s}=lR(),{setConversationId:l,emitToParent:c}=function(){const e=qO(),t=null==e?void 0:e.shadowHost,n=X.useRef("");return{setConversationId:X.useCallback((e=>{n.current=e}),[]),emitToParent:X.useCallback(((e,r)=>{if(!t)return void console.warn("useStreamingEvents: No host element available for parent event emission");const a=new CustomEvent(`ikp-${e}`,{detail:{...r,conversationId:n.current,timestamp:Date.now()},bubbles:!0,composed:!0});t.dispatchEvent(a)}),[t])}}(),u=X.useRef(n);X.useEffect((()=>{const e=u.current;u.current=n,e!==n&&s({eventName:"chat_conversation_changed",properties:{conversationId:n,previousConversationId:e}})}),[n,s]);const[d,p]=X.useState(""),{shouldBypassCaptcha:f,filters:h,privacyPreferences:m,userProperties:g,analyticsProperties:y}=e,{authToken:b,isLoading:v,refreshToken:k}=WZ(),x=!!e.getAuthToken,w=!!b,{onInputMessageChange:E,filters:_,baseUrl:S,agentUrl:T,context:C,headers:A,appId:N,apiKey:I,files:O}=t,R=(null==a?void 0:a.isOpen)??(null==o?void 0:o.isOpen)??(null==i?void 0:i.isOpen)??!0,{getCaptchaHeader:P,invalidate:L}=(({baseUrl:e,shouldBypassCaptcha:t=!1,shouldMakeInitialRequest:n=!0})=>{const r=`${e}/run/auth/pow/challenge`,a=X.useRef(null),o=X.useRef(null),i=X.useCallback((()=>{const e=FZ(r);a.current=e,e.then((e=>{e&&(o.current=e.expiresAt)}))}),[r]),s=X.useCallback((async()=>{if(t)return{};a.current||i();const e=a.current;a.current=null,i();const n=a.current,r=await e;if(!r){const e=await n;return e?{"x-inkeep-challenge-solution":btoa(JSON.stringify(e.payload))}:{}}if(null!==r.expiresAt&&Date.now()>=r.expiresAt){const e=await n;return e?{"x-inkeep-challenge-solution":btoa(JSON.stringify(e.payload))}:{}}return{"x-inkeep-challenge-solution":btoa(JSON.stringify(r.payload))}}),[t,i]),l=X.useCallback((()=>{t||i()}),[t,i]);return X.useEffect((()=>{if(!n||t)return;const e=null!==o.current&&Date.now()>=o.current-3e4;a.current&&!e||i()}),[n,t,i]),{getCaptchaHeader:s,invalidate:l}})({baseUrl:S,shouldBypassCaptcha:f||!!I,shouldMakeInitialRequest:R}),D=X.useRef(P);D.current=P;const M=T||`${S}/run/api/chat`,{sessionToken:F,refreshSession:j}=qZ({baseUrl:S,appId:N,getCaptchaHeader:P,invalidateCaptcha:L,optOutAllAnalytics:null==m?void 0:m.optOutAllAnalytics,enabled:!w&&!v}),z=I??(w?b:F),{loadConversation:B}=(({baseUrl:e,appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a,refreshSession:o})=>{const{fetchWithAuth:i}=UZ({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??YZ,refreshSession:o});return{loadConversation:X.useCallback((async(t,r)=>{var a;if(!e||!n)return null;try{const n=`${e}/run/v1/conversations/${t}`,o=await i(n,{signal:r});if(!o.ok)throw new Error(`Failed to load conversation: ${o.status}`);return(null==(a=(await o.json()).data)?void 0:a.messages)??[]}catch(jNe){return jNe instanceof Error&&"AbortError"===jNe.name||console.error("[useConversationLoader]",jNe),null}}),[e,n,i])}})({baseUrl:S,appId:N,authToken:z,getCaptchaHeader:P,invalidateCaptcha:L,refreshSession:I||w?void 0:j}),[H,U]=X.useState(!1),$=X.useRef(null);$.current=F;const V=X.useRef(null);V.current=b;const G=X.useRef(void 0);G.current=g&&Object.keys(g).length>0?JSON.stringify(g):void 0;const q=X.useRef(void 0);q.current=y&&Object.keys(y).length>0?JSON.stringify(y):void 0;const W=X.useRef(0),Y=X.useRef(null),Z=X.useRef(null),K=X.useRef(void 0),Q=(null==O?void 0:O.map((e=>`${e.filename??""}:${e.mediaType}:${e.url.length}:${e.url.slice(0,64)}:${e.url.slice(-32)}`)).join("\n"))??"";X.useEffect((()=>{K.current=(null==O?void 0:O.length)?O:void 0}),[Q]);const J=X.useRef(A);J.current=A;const ee=X.useRef(void 0);ee.current=h||_?JSON.stringify({...h,..._}):void 0;const[te,ne]=X.useState([]),re=X.useMemo((()=>new AU({api:M,headers:()=>{const e=I??V.current??$.current;return{"x-inkeep-client-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone,"x-inkeep-client-timestamp":(new Date).toISOString(),"x-inkeep-invocation-type":"chat_widget",...N?{"x-inkeep-app-id":N}:{},...e?{Authorization:`Bearer ${e}`}:{},...ee.current?{"inkeep-filters":ee.current}:{},...G.current?{"x-inkeep-user-properties":G.current}:{},...q.current?{"x-inkeep-properties":q.current}:{},...J.current}},prepareSendMessagesRequest:async e=>{const t=await D.current(),n=e.messages[e.messages.length-1];return n||console.warn("[useInkeepChat] prepareSendMessagesRequest called with empty messages array"),{body:{...e.body,id:e.id,messages:n?[n]:[],trigger:e.trigger,messageId:e.messageId},headers:{...e.headers,...t}}},body:{requestContext:C}})),[M,C,N,I]),{messages:ae,sendMessage:oe,addToolApprovalResponse:ie,status:se,setMessages:le,stop:ce,error:ue}=function({experimental_throttle:e,resume:t=!1,...n}={}){const r=X.useRef("chat"in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});"chat"in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});const a={...n,onToolCall:e=>{var t,n;return null==(n=(t=r.current).onToolCall)?void 0:n.call(t,e)},onData:e=>{var t,n;return null==(n=(t=r.current).onData)?void 0:n.call(t,e)},onFinish:e=>{var t,n;return null==(n=(t=r.current).onFinish)?void 0:n.call(t,e)},onError:e=>{var t,n;return null==(n=(t=r.current).onError)?void 0:n.call(t,e)},sendAutomaticallyWhen:e=>{var t,n,a;return null!=(a=null==(n=(t=r.current).sendAutomaticallyWhen)?void 0:n.call(t,e))&&a}},o=X.useRef("chat"in n?n.chat:new r$(a));("chat"in n&&n.chat!==o.current||"id"in n&&o.current.id!==n.id)&&(o.current="chat"in n?n.chat:new r$(a));const i=X.useCallback((t=>o.current["~registerMessagesCallback"](t,e)),[e,o.current.id]),s=X.useSyncExternalStore(i,(()=>o.current.messages),(()=>o.current.messages)),l=X.useSyncExternalStore(o.current["~registerStatusCallback"],(()=>o.current.status),(()=>o.current.status)),c=X.useSyncExternalStore(o.current["~registerErrorCallback"],(()=>o.current.error),(()=>o.current.error)),u=X.useCallback((e=>{"function"==typeof e&&(e=e(o.current.messages)),o.current.messages=e}),[o]);return X.useEffect((()=>{t&&o.current.resumeStream()}),[t,o]),{id:o.current.id,messages:s,setMessages:u,sendMessage:o.current.sendMessage,regenerate:o.current.regenerate,clearError:o.current.clearError,stop:o.current.stop,error:c,resumeStream:o.current.resumeStream,status:l,addToolResult:o.current.addToolOutput,addToolOutput:o.current.addToolOutput,addToolApprovalResponse:o.current.addToolApprovalResponse}}({transport:re,onData(e){c(e.type,e.data)},async onFinish(){c("completion",{conversationId:n}),await s({eventName:"assistant_message_received",properties:{conversationId:n}}),s({eventName:"assistant_answer_displayed",properties:{conversationId:n}})},onError(t){var r;console.error("onError",{code:t.code,message:t.message});const a=f||I?null:function(e){const t=QZ(e),n=zZ(t??0,{detail:e.message??""});return null!==n?n:401===t?"session":null}(t);if(null!==a&&W.current<1){W.current++;const e=Z.current,t=Y.current;return void(async()=>{var n;if("session"===a&&x){const e=await k();if(!e)throw new Error("Auth token refresh failed");V.current=e}else if("session"===a){const e=await j();e&&($.current=e)}else L();e?ie(e):t&&(le((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r})),oe((null==(n=t.files)?void 0:n.length)?{parts:[{type:"text",text:t.content},...t.files]}:{text:t.content},{body:t.body}))})().catch((()=>{W.current=0,L(),le((e=>{const t=[...e],n=t[t.length-1];if(!n)return t;const r=JZ;return"user"===n.role?t.push({id:ZZ(16),role:"assistant",parts:[{type:"text",text:r}]}):n.parts=[{type:"text",text:r}],t}))}))}W.current=0,null!==a&&L();const o=function(e){const t=QZ(e);return 400===t||429===t}(t),i=(t=>{var n,r;switch(QZ(t)){case 400:try{const e=JSON.parse(t.message??"");return e.detail??(null==(n=e.error)?void 0:n.message)??eK}catch{return(null==(r=t.message)?void 0:r.trim())||eK}case 401:return x?"Authentication failed. Please try again.":JZ;case 403:return`There seems to be a configuration error. Please contact ${e.organizationDisplayName??"Administrator"}`;case 429:return"You're sending requests too quickly. Please wait a moment and try again.";default:return JZ}})(t);if(s({eventName:"chat_error",properties:{conversationId:n,error:t.message}}),o){Te({title:"Request failed",message:i},8e3),le((e=>{var t,n;let r=[...e];return"assistant"===(null==(t=r.at(-1))?void 0:t.role)&&(r=r.slice(0,-1)),"user"===(null==(n=r.at(-1))?void 0:n.role)&&(r=r.slice(0,-1)),r}));const e=null==(r=Y.current)?void 0:r.content;return e&&p(e),void(_e.current=t)}le((e=>{const t=[...e],n=t[t.length-1];return n&&("user"===n.role?t.push({id:ZZ(16),role:"assistant",parts:[{type:"text",text:i}]}):n.parts=[{type:"text",text:i}]),t}))}}),de=X.useRef(w);X.useEffect((()=>{const e=de.current;de.current=w,e!==w&&(ce(),Ee(null),le([]),r(""),p(""),ne([]),L())}),[w,ce,le,r,L]);const pe="submitted"===se,fe="streaming"===se,he=X.useMemo((()=>{var e,t;const n=[...ae??[]].reverse().find((e=>"assistant"===e.role));if(!n)return!1;const r=null==(e=n.parts)?void 0:e.at(-1);return!!(e=>{if(!e||"object"!=typeof e)return!1;const t=e;return"string"==typeof t.type&&t.type.startsWith("tool-")})(r)&&("output-available"===r.state&&(!!(null==(t=r.approval)?void 0:t.id)&&!fe))}),[ae,fe]),[me,ge]=X.useState(!1),ye=fe||he&&!me,be=pe||ye,ve=0===ae.length,ke=!d.trim()&&0===te.length||be,xe=jZ("(max-width: 768px)"),[we,Ee]=X.useState(null),_e=X.useRef(null);X.useEffect((()=>{if(ue){if(_e.current===ue)return void(_e.current=null);Ee(ue)}}),[ue]);const{inputNotification:Se,showInputNotification:Te,clearInputNotification:Ce}=function(){const[e,t]=X.useState(null),n=X.useRef(null),r=X.useCallback(((e,r=5e3)=>{n.current&&clearTimeout(n.current),t(e),n.current=setTimeout((()=>t(null)),r)}),[]),a=X.useCallback((()=>{n.current&&clearTimeout(n.current),t(null)}),[]);return X.useEffect((()=>()=>{n.current&&clearTimeout(n.current)}),[]),{inputNotification:e,showInputNotification:r,clearInputNotification:a}}(),Ae=X.useRef(null);X.useEffect((()=>{null==E||E(d)}),[d]);const Ne=async(e=d)=>{if(ke&&(!e||0===e.trim().length)&&0===te.length)return;const t=te;ne([]),p(""),W.current=0,Z.current=null,ge(!1),await s({eventName:"user_message_submitted",properties:{conversationId:n}});let a=n;a||(a=`conv_${ZZ(16)}`,r(a)),l(a);const o=K.current;let i,c;if(K.current=void 0,null==o?void 0:o.length){let n;try{n=await Promise.all(t.map((e=>{const t=MY(e);return new Promise(((e,n)=>{const r=new FileReader;r.onload=()=>{"string"==typeof r.result?e({type:"file",url:r.result,mediaType:t.type,filename:t.name}):n(new Error(`Failed to read file "${t.name}"`))},r.onerror=()=>n(new Error(`Failed to read file "${t.name}"`)),r.readAsDataURL(t)}))})))}catch(u){return void Te({title:"Failed to attach files",message:"Could not read one or more files. Please try again."})}c=[...n,...o],i=e.trim()?{parts:[{type:"text",text:e},...c]}:{parts:c}}else if(t.length>0){const n=new DataTransfer;for(const e of t)n.items.add(MY(e));const r=n.files;i=e.trim()?{text:e,files:r}:{files:r}}else i={text:e};Y.current={content:e,body:{conversationId:a},files:c},oe(i,{body:{conversationId:a}})},Ie=X.useCallback((e=>{W.current=0,Z.current=e,ge(!1),ie(e)}),[ie]),Oe=X.useCallback((()=>{ge(!0),ce().then((()=>{c("aborted",{conversationId:n})}))}),[ce,n,c]),Re=()=>{Ee(null),le([]),r(""),L(),K.current=(null==O?void 0:O.length)?O:void 0,s({eventName:"chat_clear_button_clicked",properties:{conversationId:n}})},Pe=X.useCallback(((e,t)=>{Ee(null),le(t),r(e),L(),K.current=void 0}),[le,r,L]),Le=X.useCallback((async(e,t)=>{Oe(),Pe(e,[]),U(!0);try{const n=await B(e,t);if(null===n)return!1;const r=n[n.length-1],a="user"===(null==r?void 0:r.role)?[...n,{id:ZZ(16),role:"assistant",parts:[{type:"text",text:"This session was interrupted. Please check back in a few minutes or start a new conversation."}]}]:n;return Pe(e,a),!0}finally{(null==t?void 0:t.aborted)||U(!1)}}),[Pe,B,Oe]);(({conversationId:e,effectiveAuthToken:t,loadAndRestoreSession:n,onLoadFailed:r})=>{const a=X.useRef(null),o=X.useRef(n);o.current=n;const i=X.useRef(r);i.current=r,X.useEffect((()=>{if(!e||!t)return;if(a.current===e)return;a.current=e;const n=new AbortController,r=t=>{var n;a.current=null,console.error("[useInitialConversation] failed to load conversation:",e,t),null==(n=i.current)||n.call(i)};return(async()=>{try{await o.current(e,n.signal)||n.signal.aborted||r()}catch(jNe){n.signal.aborted||r(jNe)}})(),()=>{a.current=null,n.abort()}}),[e,t])})({conversationId:t.conversationId,effectiveAuthToken:z,loadAndRestoreSession:Le,onLoadFailed:()=>Pe("",[])});const{openForm:De}=jP(),Me=e0();return X.useImperativeHandle(t.chatFunctionsRef,(()=>({submitMessage:Ne,updateInputMessage(e){p(e)},clearChat:Re,openForm:e=>{null==Me||Me.setView("chat"),De(e,void 0)},focusInput:()=>{var e;null==(e=Ae.current)||e.focus()}}))),{messages:ae,sendMessage:oe,addToolApprovalResponse:Ie,isLoading:pe,isStreaming:ye,isBusy:be,error:we,setError:Ee,isSubmitDisabled:ke,input:d,handleInputChange:e=>p(e.target.value),handleInputKeyDown:e=>{"Enter"!==e.key||e.shiftKey||ke||e.nativeEvent.isComposing||(e.preventDefault(),Ne())},handleSubmit:Ne,stop:Oe,clear:Re,inputRef:Ae,isMobile:xe,files:te,setFiles:ne,isNewChat:ve,conversationId:n,restoreSession:Pe,loadAndRestoreSession:Le,isSessionLoading:H,authToken:w?b:F,refreshSession:w?k:j,getCaptchaHeader:P,invalidateCaptcha:L,inputNotification:Se,showInputNotification:Te,clearInputNotification:Ce}},nK=()=>{};const rK=X.createContext(void 0);function aK(){const{baseSettings:e,aiChatSettings:t}=oR(),[n,r]=X.useState(null),[a,o]=X.useState({}),{conversationId:i,messages:s,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d}=xJ(),{analyticsProperties:p}=e,{logEvent:f}=lR(),{submitFeedback:h}=function({baseUrl:e,appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a,refreshSession:o}){const{fetchWithAuth:i}=UZ({appId:t,authToken:n,getCaptchaHeader:r,invalidateCaptcha:a??nK,refreshSession:o});return{submitFeedback:X.useCallback((async({conversationId:t,messageId:r,type:a,details:o})=>{if(!e||!n)return;const s=`${e}/run/v1/feedback`,l=await i(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t,messageId:r,type:a,details:o})});if(!l.ok)throw new Error(`Feedback submission failed: ${l.status}`);return l.json()}),[e,n,i])}}({baseUrl:t.baseUrl,appId:t.appId,authToken:l,getCaptchaHeader:c,invalidateCaptcha:u,refreshSession:d}),m=X.useCallback((async(t,n,r)=>{o((e=>({...e,[t]:{type:n,messageId:t,details:r}}))),e.onFeedback?e.onFeedback({type:n,messageId:t,details:r,properties:p}).catch((e=>console.warn("[feedback] onFeedback error:",e))):h({conversationId:i,messageId:t,type:n,details:r}).catch((e=>console.warn("[feedback] submitFeedbackToApi error:",e)));const a=s.findIndex((e=>e.id===t)),l=s[a],c={conversationId:i,question:G$(s[a-1]),answer:G$(l),messageId:t,details:r};f({eventName:"positive"===n?"assistant_positive_feedback_submitted":"assistant_negative_feedback_submitted",properties:c}),"negative"===n&&f({eventName:"user_escalation_indicated",properties:{escalationType:"downvote",conversationId:i}})}),[s,i,p,e,f,h]);return{feedback:a,currentFeedback:n,setCurrentFeedback:r,submitPositiveFeedback:X.useCallback((async e=>{m(e,"positive")}),[m]),submitNegativeFeedback:X.useCallback((async(e,t)=>{m(e,"negative",t)}),[m])}}const oK=({children:e})=>{const t=aK();return og.jsx(rK.Provider,{value:t,children:e})},iK=()=>{const e=X.useContext(rK);if(!e)throw new Error("useFeedback must be used within a FeedbackProvider");return e};function sK(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function lK(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function cK(...e){return t=>{let n=!1;const r=e.map((e=>{const r=lK(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():lK(e[t],null)}}}}function uK(...e){return X.useCallback(cK(...e),e)}function dK(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},pK(r,...t)]}function pK(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var fK=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(gK);if(o){const e=o.props.children,n=a.map((t=>t===o?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(hK,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return og.jsx(hK,{...r,ref:t,children:n})}));fK.displayName="Slot";var hK=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n);return X.cloneElement(n,{...yK(r,n.props),ref:t?cK(t,e):e})}return X.Children.count(n)>1?X.Children.only(null):null}));hK.displayName="SlotClone";var mK=({children:e})=>og.jsx(og.Fragment,{children:e});function gK(e){return X.isValidElement(e)&&e.type===mK}function yK(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}var bK=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=X.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?fK:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function vK(e){const t=X.useRef(e);return X.useEffect((()=>{t.current=e})),X.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function kK(e,t=(null==globalThis?void 0:globalThis.document)){const n=vK(e);X.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var xK,wK="dismissableLayer.update",EK="dismissableLayer.pointerDownOutside",_K="dismissableLayer.focusOutside",SK=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),TK=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(SK),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=uK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=vK(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){AK(EK,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=vK(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){AK(_K,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return kK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(xK=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),CK(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=xK)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),CK())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(wK,e),()=>document.removeEventListener(wK,e)}),[]),og.jsx(bK.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:sK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:sK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:sK(e.onPointerDownCapture,x.onPointerDownCapture)})}));TK.displayName="DismissableLayer";function CK(){const e=new CustomEvent(wK);document.dispatchEvent(e)}function AK(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(SK),r=X.useRef(null),a=uK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx(bK.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var NK=Boolean(null==globalThis?void 0:globalThis.document)?X.useLayoutEffect:()=>{},IK=J["useId".toString()]||(()=>{}),OK=0;function RK(e){const[t,n]=X.useState(IK());return NK((()=>{n((e=>e??String(OK++)))}),[e]),e||(t?`radix-${t}`:"")}const PK=["top","right","bottom","left"],LK=Math.min,DK=Math.max,MK=Math.round,FK=Math.floor,jK=e=>({x:e,y:e}),zK={left:"right",right:"left",bottom:"top",top:"bottom"};function BK(e,t,n){return DK(e,LK(t,n))}function HK(e,t){return"function"==typeof e?e(t):e}function UK(e){return e.split("-")[0]}function $K(e){return e.split("-")[1]}function VK(e){return"x"===e?"y":"x"}function GK(e){return"y"===e?"height":"width"}function qK(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function WK(e){return VK(qK(e))}function YK(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ZK=["left","right"],KK=["right","left"],XK=["top","bottom"],QK=["bottom","top"];function JK(e,t,n,r){const a=$K(e);let o=function(e,t,n){switch(e){case"top":case"bottom":return n?t?KK:ZK:t?ZK:KK;case"left":case"right":return t?XK:QK;default:return[]}}(UK(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(YK)))),o}function eX(e){const t=UK(e);return zK[t]+e.slice(t.length)}function tX(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function nX(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function rX(e,t,n){let{reference:r,floating:a}=e;const o=qK(t),i=WK(t),s=GK(i),l=UK(t),c="y"===o,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,p=r[s]/2-a[s]/2;let f;switch(l){case"top":f={x:u,y:r.y-a.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-a.width,y:d};break;default:f={x:r.x,y:r.y}}switch($K(t)){case"start":f[i]-=p*(n&&c?-1:1);break;case"end":f[i]+=p*(n&&c?-1:1)}return f}async function aX(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=HK(t,e),h=tX(f),m=s[p?"floating"===d?"reference":"floating":d],g=nX(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,b=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),v=await(null==o.isElement?void 0:o.isElement(b))&&await(null==o.getScale?void 0:o.getScale(b))||{x:1,y:1},k=nX(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-k.top+h.top)/v.y,bottom:(k.bottom-g.bottom+h.bottom)/v.y,left:(g.left-k.left+h.left)/v.x,right:(k.right-g.right+h.right)/v.x}}function oX(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iX(e){return PK.some((t=>e[t]>=0))}const sX=new Set(["left","top"]);function lX(){return"undefined"!=typeof window}function cX(e){return pX(e)?(e.nodeName||"").toLowerCase():"#document"}function uX(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function dX(e){var t;return null==(t=(pX(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function pX(e){return!!lX()&&(e instanceof Node||e instanceof uX(e).Node)}function fX(e){return!!lX()&&(e instanceof Element||e instanceof uX(e).Element)}function hX(e){return!!lX()&&(e instanceof HTMLElement||e instanceof uX(e).HTMLElement)}function mX(e){return!(!lX()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof uX(e).ShadowRoot)}function gX(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=TX(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==a&&"contents"!==a}function yX(e){return/^(table|td|th)$/.test(cX(e))}function bX(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const vX=/transform|translate|scale|rotate|perspective|filter/,kX=/paint|layout|strict|content/,xX=e=>!!e&&"none"!==e;let wX;function EX(e){const t=fX(e)?TX(e):e;return xX(t.transform)||xX(t.translate)||xX(t.scale)||xX(t.rotate)||xX(t.perspective)||!_X()&&(xX(t.backdropFilter)||xX(t.filter))||vX.test(t.willChange||"")||kX.test(t.contain||"")}function _X(){return null==wX&&(wX="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),wX}function SX(e){return/^(html|body|#document)$/.test(cX(e))}function TX(e){return uX(e).getComputedStyle(e)}function CX(e){return fX(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function AX(e){if("html"===cX(e))return e;const t=e.assignedSlot||e.parentNode||mX(e)&&e.host||dX(e);return mX(t)?t.host:t}function NX(e){const t=AX(e);return SX(t)?e.ownerDocument?e.ownerDocument.body:e.body:hX(t)&&gX(t)?t:NX(t)}function IX(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=NX(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=uX(a);if(o){const e=OX(i);return t.concat(i,i.visualViewport||[],gX(a)?a:[],e&&n?IX(e):[])}return t.concat(a,IX(a,[],n))}function OX(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RX(e){const t=TX(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=hX(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=MK(n)!==o||MK(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function PX(e){return fX(e)?e:e.contextElement}function LX(e){const t=PX(e);if(!hX(t))return jK(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=RX(t);let i=(o?MK(n.width):n.width)/r,s=(o?MK(n.height):n.height)/a;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const DX=jK(0);function MX(e){const t=uX(e);return _X()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:DX}function FX(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=PX(e);let i=jK(1);t&&(r?fX(r)&&(i=LX(r)):i=LX(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==uX(e))&&t}(o,n,r)?MX(o):jK(0);let l=(a.left+s.x)/i.x,c=(a.top+s.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){const e=uX(o),t=r&&fX(r)?uX(r):r;let n=e,a=OX(n);for(;a&&r&&t!==n;){const e=LX(a),t=a.getBoundingClientRect(),r=TX(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=o,c+=i,n=uX(a),a=OX(n)}}return nX({width:u,height:d,x:l,y:c})}function jX(e,t){const n=CX(e).scrollLeft;return t?t.left+n:FX(dX(e)).left+n}function zX(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-jX(e,n),y:n.top+t.scrollTop}}function BX(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=uX(e),r=dX(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,l=0;if(a){o=a.width,i=a.height;const e=_X();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,l=a.offsetTop)}const c=jX(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-a);i<=25&&(o-=i)}else c<=25&&(o+=c);return{width:o,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=dX(e),n=CX(e),r=e.ownerDocument.body,a=DK(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=DK(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+jX(e);const s=-n.scrollTop;return"rtl"===TX(r).direction&&(i+=DK(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}(dX(e));else if(fX(t))r=function(e,t){const n=FX(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=hX(e)?LX(e):jK(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}(t,n);else{const n=MX(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return nX(r)}function HX(e,t){const n=AX(e);return!(n===t||!fX(n)||SX(n))&&("fixed"===TX(n).position||HX(n,t))}function UX(e,t,n){const r=hX(t),a=dX(t),o="fixed"===n,i=FX(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=jK(0);function c(){l.x=jX(a)}if(r||!r&&!o)if(("body"!==cX(t)||gX(a))&&(s=CX(t)),r){const e=FX(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();o&&!r&&a&&c();const u=!a||r||o?jK(0):zX(a,s);return{x:i.left+s.scrollLeft-l.x-u.x,y:i.top+s.scrollTop-l.y-u.y,width:i.width,height:i.height}}function $X(e){return"static"===TX(e).position}function VX(e,t){if(!hX(e)||"fixed"===TX(e).position)return null;if(t)return t(e);let n=e.offsetParent;return dX(e)===n&&(n=n.ownerDocument.body),n}function GX(e,t){const n=uX(e);if(bX(e))return n;if(!hX(e)){let t=AX(e);for(;t&&!SX(t);){if(fX(t)&&!$X(t))return t;t=AX(t)}return n}let r=VX(e,t);for(;r&&yX(r)&&$X(r);)r=VX(r,t);return r&&SX(r)&&$X(r)&&!EX(r)?n:r||function(e){let t=AX(e);for(;hX(t)&&!SX(t);){if(EX(t))return t;if(bX(t))return null;t=AX(t)}return null}(e)||n}const qX={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o="fixed"===a,i=dX(r),s=!!t&&bX(t.floating);if(r===i||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=jK(1);const u=jK(0),d=hX(r);if((d||!d&&!o)&&(("body"!==cX(r)||gX(i))&&(l=CX(r)),d)){const e=FX(r);c=LX(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!i||d||o?jK(0):zX(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:dX,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?bX(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=IX(e,[],!1).filter((e=>fX(e)&&"body"!==cX(e))),a=null;const o="fixed"===TX(e).position;let i=o?AX(e):e;for(;fX(i)&&!SX(i);){const t=TX(i),n=EX(i);n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&("absolute"===a.position||"fixed"===a.position)||gX(i)&&!n&&HX(e,i))?r=r.filter((e=>e!==i)):a=t,i=AX(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=BX(t,o[0],a);let s=i.top,l=i.right,c=i.bottom,u=i.left;for(let d=1;d<o.length;d++){const e=BX(t,o[d],a);s=DK(e.top,s),l=LK(e.right,l),c=LK(e.bottom,c),u=DK(e.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:GX,getElementRects:async function(e){const t=this.getOffsetParent||GX,n=this.getDimensions,r=await n(e.floating);return{reference:UX(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=RX(e);return{width:t,height:n}},getScale:LX,isElement:fX,isRTL:function(e){return"rtl"===TX(e).direction}};function WX(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function YX(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=PX(e),u=a||o?[...c?IX(c):[],...t?IX(t):[]]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const a=dX(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),o();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:f}=c;if(s||t(),!p||!f)return;const h={rootMargin:-FK(d)+"px "+-FK(a.clientWidth-(u+p))+"px "+-FK(a.clientHeight-(d+f))+"px "+-FK(u)+"px",threshold:DK(0,LK(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return i();r?i(!1,r):n=setTimeout((()=>{i(!1,1e-7)}),1e3)}1!==r||WX(c,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(g,{...h,root:a.ownerDocument})}catch(y){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),o}(c,n):null;let p,f=-1,h=null;i&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),t&&h.observe(t));let m=l?FX(e):null;return l&&function t(){const r=FX(e);m&&!WX(m,r)&&n();m=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const ZX=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=UK(n),s=$K(n),l="y"===qK(n),c=sX.has(i)?-1:1,u=o&&l?-1:1,d=HK(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+l.x,y:o+l.y,data:{...l,placement:i}}}}},KX=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=HK(e,t),u={x:n,y:r},d=await o.detectOverflow(t,c),p=qK(UK(a)),f=VK(p);let h=u[f],m=u[p];if(i){const e="y"===f?"bottom":"right";h=BK(h+d["y"===f?"top":"left"],h,h-d[e])}if(s){const e="y"===p?"bottom":"right";m=BK(m+d["y"===p?"top":"left"],m,m-d[e])}const g=l.fn({...t,[f]:h,[p]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[p]:s}}}}}},XX=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=HK(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const y=UK(a),b=qK(s),v=UK(s)===s,k=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=p||(v||!m?[eX(s)]:function(e){const t=eX(e);return[YK(e),t,YK(t)]}(s)),w="none"!==h;!p&&w&&x.push(...JK(s,m,h,k));const E=[s,...x],_=await l.detectOverflow(t,g),S=[];let T=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&S.push(_[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=$K(e),a=WK(e),o=GK(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=eX(i)),[i,eX(i)]}(a,i,k);S.push(_[e[0]],_[e[1]])}if(T=[...T,{placement:a,overflows:S}],!S.every((e=>e<=0))){var C,A;const e=((null==(C=o.flip)?void 0:C.index)||0)+1,t=E[e];if(t){if(!("alignment"===d&&b!==qK(t))||T.every((e=>qK(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}}}let n=null==(A=T.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(f){case"bestFit":{var N;const e=null==(N=T.filter((e=>{if(w){const t=qK(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}},QX=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:l=()=>{},...c}=HK(e,t),u=await i.detectOverflow(t,c),d=UK(a),p=$K(a),f="y"===qK(a),{width:h,height:m}=o.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=p===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===p?"top":"bottom");const b=m-u.top-u.bottom,v=h-u.left-u.right,k=LK(m-u[g],b),x=LK(h-u[y],v),w=!t.middlewareData.shift;let E=k,_=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=b),w&&!p){const e=DK(u.left,0),t=DK(u.right,0),n=DK(u.top,0),r=DK(u.bottom,0);f?_=h-2*(0!==e||0!==t?e+t:DK(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:DK(u.top,u.bottom))}await l({...t,availableWidth:_,availableHeight:E});const S=await i.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},JX=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...o}=HK(e,t);switch(a){case"referenceHidden":{const e=oX(await r.detectOverflow(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:iX(e)}}}case"escaped":{const e=oX(await r.detectOverflow(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:iX(e)}}}default:return{}}}}},eQ=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=HK(e,t)||{};if(null==c)return{};const d=tX(u),p={x:n,y:r},f=WK(a),h=GK(f),m=await i.getDimensions(c),g="y"===f,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",k=o.reference[h]+o.reference[f]-p[f]-o.floating[h],x=p[f]-o.reference[f],w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let E=w?w[v]:0;E&&await(null==i.isElement?void 0:i.isElement(w))||(E=s.floating[v]||o.floating[h]);const _=k/2-x/2,S=E/2-m[h]/2-1,T=LK(d[y],S),C=LK(d[b],S),A=T,N=E-m[h]-C,I=E/2-m[h]/2+_,O=BK(A,I,N),R=!l.arrow&&null!=$K(a)&&I!==O&&o.reference[h]/2-(I<A?T:C)-m[h]/2<0,P=R?I<A?I-A:I-N:0;return{[f]:p[f]+P,data:{[f]:O,centerOffset:I-O-P,...R&&{alignmentOffset:P}},reset:R}}}),tQ=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=HK(e,t),u={x:n,y:r},d=qK(a),p=VK(d);let f=u[p],h=u[d];const m=HK(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===p?"height":"width",t=o.reference[p]-o.floating[e]+g.mainAxis,n=o.reference[p]+o.reference[e]-g.mainAxis;f<t?f=t:f>n&&(f=n)}if(c){var y,b;const e="y"===p?"width":"height",t=sX.has(UK(a)),n=o.reference[d]-o.floating[e]+(t&&(null==(y=i.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(b=i.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[p]:f,[d]:h}}}},nQ=(e,t,n)=>{const r=new Map,a={platform:qX,...n},o={...a.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:aX},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:d}=rX(c,r,l),p=r,f=0;const h={};for(let m=0;m<o.length;m++){const n=o[m];if(!n)continue;const{name:g,fn:y}=n,{x:b,y:v,data:k,reset:x}=await y({x:u,y:d,initialPlacement:r,placement:p,strategy:a,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=b?b:u,d=null!=v?v:d,h[g]={...h[g],...k},x&&f<50&&(f++,"object"==typeof x&&(x.placement&&(p=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):x.rects),({x:u,y:d}=rX(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:a,middlewareData:h}})(e,t,{...a,platform:o})};var rQ="undefined"!=typeof document?X.useLayoutEffect:function(){};function aQ(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!aQ(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!aQ(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function oQ(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iQ(e,t){const n=oQ(e);return Math.round(t*n)/n}function sQ(e){const t=X.useRef(e);return rQ((()=>{t.current=e})),t}function lQ(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=X.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=X.useState(r);aQ(p,r)||f(r);const[h,m]=X.useState(null),[g,y]=X.useState(null),b=X.useCallback((e=>{e!==w.current&&(w.current=e,m(e))}),[]),v=X.useCallback((e=>{e!==E.current&&(E.current=e,y(e))}),[]),k=o||h,x=i||g,w=X.useRef(null),E=X.useRef(null),_=X.useRef(u),S=null!=l,T=sQ(l),C=sQ(a),A=sQ(c),N=X.useCallback((()=>{if(!w.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};C.current&&(e.platform=C.current),nQ(w.current,E.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};I.current&&!aQ(_.current,t)&&(_.current=t,ue.flushSync((()=>{d(t)})))}))}),[p,t,n,C,A]);rQ((()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const I=X.useRef(!1);rQ((()=>(I.current=!0,()=>{I.current=!1})),[]),rQ((()=>{if(k&&(w.current=k),x&&(E.current=x),k&&x){if(T.current)return T.current(k,x,N);N()}}),[k,x,N,T,S]);const O=X.useMemo((()=>({reference:w,floating:E,setReference:b,setFloating:v})),[b,v]),R=X.useMemo((()=>({reference:k,floating:x})),[k,x]),P=X.useMemo((()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=iQ(R.floating,u.x),r=iQ(R.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...oQ(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,R.floating,u.x,u.y]);return X.useMemo((()=>({...u,update:N,refs:O,elements:R,floatingStyles:P})),[u,N,O,R,P])}const cQ=(e,t)=>{const n=ZX(e);return{name:n.name,fn:n.fn,options:[e,t]}},uQ=(e,t)=>{const n=KX(e);return{name:n.name,fn:n.fn,options:[e,t]}},dQ=(e,t)=>({fn:tQ(e).fn,options:[e,t]}),pQ=(e,t)=>{const n=XX(e);return{name:n.name,fn:n.fn,options:[e,t]}},fQ=(e,t)=>{const n=QX(e);return{name:n.name,fn:n.fn,options:[e,t]}},hQ=(e,t)=>{const n=JX(e);return{name:n.name,fn:n.fn,options:[e,t]}},mQ=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?eQ({element:n.current,padding:r}).fn(t):{}:n?eQ({element:n,padding:r}).fn(t):{};var a}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}};var gQ=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx(bK.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));gQ.displayName="Arrow";var yQ=gQ;function bQ(e){const[t,n]=X.useState(void 0);return NK((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}var vQ="Popper",[kQ,xQ]=dK(vQ),[wQ,EQ]=kQ(vQ),_Q=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(wQ,{scope:t,anchor:r,onAnchorChange:a,children:n})};_Q.displayName=vQ;var SQ="PopperAnchor",TQ=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=EQ(SQ,n),i=X.useRef(null),s=uK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:og.jsx(bK.div,{...a,ref:s})}));TQ.displayName=SQ;var CQ="PopperContent",[AQ,NQ]=kQ(CQ),IQ=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=EQ(CQ,l),[E,_]=X.useState(null),S=uK(t,(e=>_(e))),[T,C]=X.useState(null),A=bQ(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(LQ),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=lQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>YX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[cQ({mainAxis:u+I,alignmentAxis:p}),h&&uQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?dQ():void 0,...D}),h&&pQ({...D}),fQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&mQ({element:T,padding:f}),DQ({arrowWidth:N,arrowHeight:I}),b&&hQ({strategy:"referenceHidden",...D})]}),[H,U]=MQ(j),$=vK(k);NK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return NK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(AQ,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx(bK.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));IQ.displayName=CQ;var OQ="PopperArrow",RQ={top:"bottom",right:"left",bottom:"top",left:"right"},PQ=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=NQ(OQ,n),o=RQ[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(yQ,{...r,ref:t,style:{...r.style,display:"block"}})})}));function LQ(e){return null!==e}PQ.displayName=OQ;var DQ=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=MQ(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function MQ(e){const[t,n="center"]=e.split("-");return[t,n]}var FQ=_Q,jQ=TQ,zQ=IQ,BQ=PQ;var HQ=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=X.useState(),r=X.useRef({}),a=X.useRef(e),o=X.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return X.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return X.useEffect((()=>{const e=UQ(r.current);o.current="mounted"===s?e:"none"}),[s]),NK((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=UQ(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),NK((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=UQ(r.current).includes(o.animationName);if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=UQ(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:X.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):X.Children.only(n),o=uK(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?X.cloneElement(a,{ref:o}):null};function UQ(e){return(null==e?void 0:e.animationName)||"none"}function $Q({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=function({defaultProp:e,onChange:t}){const n=X.useState(e),[r]=n,a=X.useRef(r),o=vK(t);return X.useEffect((()=>{a.current!==r&&(o(r),a.current=r)}),[r,a,o]),n}({defaultProp:t,onChange:n}),o=void 0!==e,i=o?e:r,s=vK(n);return[i,X.useCallback((t=>{if(o){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)}),[o,e,a,s])]}HQ.displayName="Presence";var VQ=X.forwardRef(((e,t)=>og.jsx(bK.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));VQ.displayName="VisuallyHidden";var GQ=VQ,[qQ]=dK("Tooltip",[xQ]),WQ=xQ(),YQ="TooltipProvider",ZQ=700,KQ="tooltip.open",[XQ,QQ]=qQ(YQ),JQ=e=>{const{__scopeTooltip:t,delayDuration:n=ZQ,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,[i,s]=X.useState(!0),l=X.useRef(!1),c=X.useRef(0);return X.useEffect((()=>{const e=c.current;return()=>window.clearTimeout(e)}),[]),og.jsx(XQ,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:X.useCallback((()=>{window.clearTimeout(c.current),s(!1)}),[]),onClose:X.useCallback((()=>{window.clearTimeout(c.current),c.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:l,onPointerInTransitChange:X.useCallback((e=>{l.current=e}),[]),disableHoverableContent:a,children:o})};JQ.displayName=YQ;var eJ="Tooltip",[tJ,nJ]=qQ(eJ),rJ=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,l=QQ(eJ,e.__scopeTooltip),c=WQ(t),[u,d]=X.useState(null),p=RK(),f=X.useRef(0),h=i??l.disableHoverableContent,m=s??l.delayDuration,g=X.useRef(!1),[y=!1,b]=$Q({prop:r,defaultProp:a,onChange:e=>{e?(l.onOpen(),document.dispatchEvent(new CustomEvent(KQ))):l.onClose(),null==o||o(e)}}),v=X.useMemo((()=>y?g.current?"delayed-open":"instant-open":"closed"),[y]),k=X.useCallback((()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,b(!0)}),[b]),x=X.useCallback((()=>{window.clearTimeout(f.current),f.current=0,b(!1)}),[b]),w=X.useCallback((()=>{window.clearTimeout(f.current),f.current=window.setTimeout((()=>{g.current=!0,b(!0),f.current=0}),m)}),[m,b]);return X.useEffect((()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)}),[]),og.jsx(FQ,{...c,children:og.jsx(tJ,{scope:t,contentId:p,open:y,stateAttribute:v,trigger:u,onTriggerChange:d,onTriggerEnter:X.useCallback((()=>{l.isOpenDelayed?w():k()}),[l.isOpenDelayed,w,k]),onTriggerLeave:X.useCallback((()=>{h?x():(window.clearTimeout(f.current),f.current=0)}),[x,h]),onOpen:k,onClose:x,disableHoverableContent:h,children:n})})};rJ.displayName=eJ;var aJ="TooltipTrigger",oJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=nJ(aJ,n),o=QQ(aJ,n),i=WQ(n),s=uK(t,X.useRef(null),a.onTriggerChange),l=X.useRef(!1),c=X.useRef(!1),u=X.useCallback((()=>l.current=!1),[]);return X.useEffect((()=>()=>document.removeEventListener("pointerup",u)),[u]),og.jsx(jQ,{asChild:!0,...i,children:og.jsx(bK.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:s,onPointerMove:sK(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(c.current||o.isPointerInTransitRef.current||(a.onTriggerEnter(),c.current=!0))})),onPointerLeave:sK(e.onPointerLeave,(()=>{a.onTriggerLeave(),c.current=!1})),onPointerDown:sK(e.onPointerDown,(()=>{l.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:sK(e.onFocus,(()=>{l.current||a.onOpen()})),onBlur:sK(e.onBlur,a.onClose),onClick:sK(e.onClick,a.onClose)})})}));oJ.displayName=aJ;var[iJ,sJ]=qQ("TooltipPortal",{forceMount:void 0}),lJ="TooltipContent",cJ=X.forwardRef(((e,t)=>{const n=sJ(lJ,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=nJ(lJ,e.__scopeTooltip);return og.jsx(HQ,{present:r||i.open,children:i.disableHoverableContent?og.jsx(fJ,{side:a,...o,ref:t}):og.jsx(uJ,{side:a,...o,ref:t})})})),uJ=X.forwardRef(((e,t)=>{const n=nJ(lJ,e.__scopeTooltip),r=QQ(lJ,e.__scopeTooltip),a=X.useRef(null),o=uK(t,a),[i,s]=X.useState(null),{trigger:l,onClose:c}=n,u=a.current,{onPointerInTransitChange:d}=r,p=X.useCallback((()=>{s(null),d(!1)}),[d]),f=X.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},a=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),o=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const n=e[r];for(;t.length>=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const t=e[r];for(;n.length>=2;){const e=n[n.length-1],r=n[n.length-2];if(!((e.x-r.x)*(t.y-r.y)>=(e.y-r.y)*(t.x-r.x)))break;n.pop()}n.push(t)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...a,...function(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}(t.getBoundingClientRect())]);s(o),d(!0)}),[d]);return X.useEffect((()=>()=>p()),[p]),X.useEffect((()=>{if(l&&u){const e=e=>f(e,u),t=e=>f(e,l);return l.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{l.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}}),[l,u,f,p]),X.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==l?void 0:l.contains(t))||(null==u?void 0:u.contains(t)),a=!function(e,t){const{x:n,y:r}=e;let a=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const e=t[o].x,s=t[o].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-e)*(r-s)/(c-s)+e&&(a=!a)}return a}(n,i);r?p():a&&(p(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[l,u,i,c,p]),og.jsx(fJ,{...e,ref:o})})),[dJ,pJ]=qQ(eJ,{isInside:!1}),fJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,l=nJ(lJ,n),c=WQ(n),{onClose:u}=l;return X.useEffect((()=>(document.addEventListener(KQ,u),()=>document.removeEventListener(KQ,u))),[u]),X.useEffect((()=>{if(l.trigger){const e=e=>{const t=e.target;(null==t?void 0:t.contains(l.trigger))&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[l.trigger,u]),og.jsx(TK,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:og.jsxs(zQ,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[og.jsx(mK,{children:r}),og.jsx(dJ,{scope:n,isInside:!0,children:og.jsx(GQ,{id:l.contentId,role:"tooltip",children:a||r})})]})})}));cJ.displayName=lJ;var hJ="TooltipArrow",mJ=X.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=WQ(n);return pJ(hJ,n).isInside?null:og.jsx(BQ,{...a,...r,ref:t})}));mJ.displayName=hJ;var gJ=JQ,yJ=oJ,bJ=mJ;const vJ=X.createContext(void 0),kJ=({children:e,...t})=>{const n=tK();return og.jsx(vJ.Provider,{value:{...n,...t},children:og.jsx(oK,{children:og.jsx(gJ,{children:e})})})},xJ=()=>{const e=X.useContext(vJ);if(!e)throw new Error("useChat must be used within a ChatProvider");return e},wJ=X.createContext(void 0);const EJ=({layout:e,children:t})=>{const n=function(e){const{stop:t,clear:n,conversationId:r,isStreaming:a,loadAndRestoreSession:o,authToken:i,refreshSession:s,getCaptchaHeader:l,invalidateCaptcha:c}=xJ(),{aiChatSettings:u,baseSettings:d}=oR(),{baseUrl:p,appId:f,apiKey:h}=u,m=!!d.getAuthToken,g=!h&&!!f&&(!!i||m),{fetchWithAuth:y}=UZ({appId:f,authToken:i,getCaptchaHeader:l,invalidateCaptcha:c,refreshSession:s}),[b,v]=X.useState(!1),[k,x]=X.useState([]),[w,E]=X.useState(!i&&g),[_,S]=X.useState(0),[T,C]=X.useState(!1),A=X.useRef(!1),N=X.useRef(null),I=X.useRef(m),O=X.useRef(i);X.useEffect((()=>{const e=I.current,t=O.current;I.current=m,O.current=i,(e!==m||null!==t&&null!==i&&t!==i)&&(x([]),S(0),C(!1),A.current=!1)}),[m,i]);const R=X.useRef([]);R.current=k;const P=X.useRef(y);P.current=y;const L=X.useCallback((async(e,t=!1)=>{if(p&&i&&g){t||E(!0);try{const n=`${p}/run/v1/conversations?page=${e+1}&limit=25`,r=await P.current(n);if(!r.ok)throw new Error(`Failed to fetch conversations: ${r.status}`);const a=await r.json(),o=(a.data??[]).map((e=>({id:e.id,title:e.title??"",createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)})));x((n=>{if(0===e&&!t)return o;if(0===e&&t){const e=new Set(o.map((e=>e.id)));return[...o,...n.slice(25).filter((t=>!e.has(t.id)))]}const r=new Set(n.map((e=>e.id)));return[...n,...o.filter((e=>!r.has(e.id)))]}));const{page:i,pages:s}=a.pagination??{};C(null!=i&&null!=s&&i<s),t||S(e)}catch(jNe){console.error("[useChatHistory] Failed to load conversations:",jNe)}finally{E(!1)}}}),[p,i,g]);X.useEffect((()=>{b&&(i||m)&&g&&("stack"===e?L(0):!A.current&&i&&(A.current=!0,L(0)))}),[b,i,m,g,e,L]);const D=X.useRef("");X.useEffect((()=>{g&&"sidepane"===e&&r&&a&&A.current&&D.current!==r&&(R.current.some((e=>e.id===r))||(D.current=r,L(0,!0)))}),[r,g,e,L,a]);const M=X.useCallback((()=>{!w&&T&&L(_+1)}),[w,T,_,L]),F=X.useCallback((()=>{t(),n(),"sidepane"!==e&&v(!1)}),[e,t,n]),j=X.useCallback((async t=>{var n;null==(n=N.current)||n.abort();const r=new AbortController;N.current=r,await o(t,r.signal),r.signal.aborted||"sidepane"===e||v(!1)}),[e,o]);return{isEnabled:g,isOpen:b,setIsOpen:v,sessions:k,isLoading:w,hasMore:T,loadMore:M,startNewConversation:F,loadSession:j}}(e);return og.jsx(wJ.Provider,{value:n,children:"function"==typeof t?t(n):t})},_J=()=>{const e=X.useContext(wJ);if(!e)throw new Error("useChatHistory must be used within a ChatHistoryProvider");return e},SJ=X.createContext(void 0),TJ=({children:e,field:t,fieldProps:n,autoFocus:r})=>{const{errors:a}=jP(),o=a[t.name];return og.jsx(SJ.Provider,{value:{field:t,fieldProps:n,error:o,autoFocus:r},children:e})},CJ=()=>{const e=X.useContext(SJ);if(!e)throw new Error("useFormField must be used within a FormFieldProvider");return e},AJ=X.createContext(void 0);const NJ=({children:e,value:t})=>og.jsx(AJ.Provider,{value:t,children:e}),IJ=["light","dark"],OJ="(prefers-color-scheme: dark)",RJ="undefined"==typeof window,PJ=X.createContext(void 0),LJ={setColorMode:e=>{},colorModes:[]};function DJ(e,t){const n=X.useContext(PJ)??LJ;return"dark"===(n.forcedColorMode??n.resolvedColorMode)?t:e}const MJ=e=>(X.useContext(PJ),og.jsx(jJ,{...e})),FJ=["light","dark"],jJ=({forcedColorMode:e,disableTransitionOnChange:t=!1,enableSystem:n=!1,enableColorScheme:r=!0,storageKey:a="inkeep-colorMode",colorModes:o=FJ,defaultColorMode:i=(n?"system":"light"),attribute:s="data-theme",value:l,children:c,nonce:u,shadowHostId:d,rootId:p})=>{const[f,h]=X.useState((()=>BJ(a,i))),[m,g]=X.useState((()=>BJ(a))),y=l?Object.values(l):o,b=X.useCallback((e=>{var a;let o=e;if(!o)return;"system"===e&&n&&(o=UJ());const c=l?l[o]:o,u=t?HJ():null,f=d&&p&&(null==(a=document.getElementById(d))?void 0:a.shadowRoot),h=f?f.getElementById(p)??document.documentElement:document.documentElement;if("class"===s?(h.classList.remove(...y),c&&h.classList.add(c)):c?h.setAttribute(s,c):h.removeAttribute(s),r){const e=IJ.includes(i)?i:null,t=IJ.includes(o)?o:e;h.style.colorScheme=t}null==u||u()}),[]),v=X.useCallback((e=>{h(e);try{localStorage.setItem(a,e)}catch(Dce){}}),[e]),k=X.useCallback((t=>{const r=UJ(t);g(r),"system"===f&&n&&!e&&b("system")}),[f,e]);X.useEffect((()=>{const e=window.matchMedia(OJ);return e.addListener(k),k(e),()=>e.removeListener(k)}),[k]),X.useEffect((()=>{const e=e=>{if(e.key!==a)return;const t=e.newValue||i;v(t)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[v]),X.useEffect((()=>{b(e??f)}),[e,f]);const x=X.useMemo((()=>({colorMode:f,setColorMode:v,forcedColorMode:e,resolvedColorMode:"system"===f?m:f,colorModes:n?[...o,"system"]:o,systemColorMode:n?m:void 0})),[f,v,e,m,n,o]);return og.jsxs(PJ.Provider,{value:x,children:[og.jsx(zJ,{forcedColorMode:e,disableTransitionOnChange:t,enableSystem:n,enableColorScheme:r,storageKey:a,colorModes:o,defaultColorMode:i,attribute:s,value:l,children:c,attrs:y,nonce:u,shadowHostId:d,rootId:p}),c]})},zJ=X.memo((({forcedColorMode:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultColorMode:o,value:i,attrs:s,nonce:l,shadowHostId:c,rootId:u})=>{const d="system"===o,p=(()=>{const e=c&&u?`document.getElementById('${c}').shadowRoot.getElementById('${u}')`:"document.documentElement";if("class"===n){return`var d=${e},c=d.classList;${`c.remove(${s.map((e=>`'${e}'`)).join(",")})`};`}return`var d=${e},n='${n}',s='setAttribute';`})(),f=(()=>{if(!a)return"";return(IJ.includes(o)?o:null)?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e"})(),h=(e,t=!1,r=!0)=>{const o=i?i[e]:e,s=t?`${e}|| ''`:`'${o}'`;let l="";return a&&r&&!t&&IJ.includes(e)&&(l+=`d.style.colorScheme = '${e}';`),"class"===n?l+=t||o?`c.add(${s})`:"null":o&&(l+=`d[s](n,${s})`),l},m=e?`!function(){${p}${h(e)}}()`:r?`!function(){try{${p}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${d})){var t='${OJ}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}${d?"":`else{${h(o,!1,!1)}}`}${f}}catch(e){}}()`:`!function(){try{${p}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${h(i?"x[e]":"e",!0)}}else{${h(o,!1,!1)};}${f}}catch(t){}}();`;return og.jsx("script",{nonce:l,dangerouslySetInnerHTML:{__html:m}})}),(()=>!0)),BJ=(e,t)=>{if(RJ)return;let n;try{n=localStorage.getItem(e)||void 0}catch(Dce){}return n||t},HJ=()=>{const e=document.createElement("style");return e.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(e),()=>{window.getComputedStyle(document.body),setTimeout((()=>{document.head.removeChild(e)}),1)}},UJ=e=>{e||(e=window.matchMedia(OJ));return e.matches?"dark":"light"};var $J=Object.prototype.hasOwnProperty;function VJ(e,t,n){for(n of e.keys())if(GJ(n,t))return n}function GJ(e,t){var n,r,a;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&GJ(e[r],t[r]););return-1===r}if(n===Set){if(e.size!==t.size)return!1;for(r of e){if((a=r)&&"object"==typeof a&&!(a=VJ(t,a)))return!1;if(!t.has(a))return!1}return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e){if((a=r[0])&&"object"==typeof a&&!(a=VJ(t,a)))return!1;if(!GJ(r[1],t.get(a)))return!1}return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return-1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if($J.call(e,n)&&++r&&!$J.call(t,n))return!1;if(!(n in t)||!GJ(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function qJ(){const{baseSettings:e}=oR(),[t,n]=X.useState([]),r=function(e){const t=X.useRef(void 0);GJ(t.current,e)||(t.current=e);return t.current}(e.theme.styles),{customStyles:a,linksCount:o}=X.useMemo((()=>{if(!r||!Array.isArray(r))return{customStyles:null,loaded:!0};const{links:e,styleSheets:t}=r.reduce(((e,t)=>("link"===t.type?e.links.push(t):"style"===t.type&&e.styleSheets.push(t),e)),{links:[],styleSheets:[]}),a=t.map((e=>og.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:e.value}},e.key??XZ("link_")))),o=e.map((e=>{const t=e.key??XZ("stylesheet_");return og.jsx("link",{id:t,rel:"stylesheet",type:"text/css",href:e.value,onLoad:()=>{n((t=>[...new Set([...t,e.value])]))}},t)}));return{customStyles:og.jsxs(og.Fragment,{children:[o,a]}),linksCount:e.length}}),[r]);return{customStyles:a,loaded:t.length>=(o??0)}}const WJ=({children:e})=>{const{baseSettings:t}=oR(),{theme:n,primaryBrandColor:r,shadowHost:a,rootElement:o,colorMode:i}=t,{primaryColors:s,varsClassName:l}=n,{disableLoadingDefaultFont:c,fontFamily:u,fontSize:d,zIndex:p}=n,f=bk(s,r),h=function(e){const t={};for(const[n,r]of Object.entries(e)){const e=kk[n]||n,a=(n,r=[])=>{for(const[o,i]of Object.entries(n)){const n=[...r,o];if("object"==typeof i&&null!==i)a(i,n);else{const r=n.map((e=>e.replace(/([A-Z])/g,"-$1").toLowerCase())).join("-");t[`--ikp-${e}-${r}`]=i}}};a(r)}return t}({colors:Gm(n.colors,f),fontFamily:u,fontSize:d,zIndex:p}),{customStyles:m,loaded:g}=qJ(),{sync:y,forcedColorMode:b,...v}=i??{},[k,x]=X.useState(),w=X.useRef(null);return X.useEffect((()=>{var e,t;if(!(null==y?void 0:y.target))return;const n="string"==typeof y.target?document.querySelector(y.target):y.target;if(!n)return;function r(e,t){return t.reduce(((t,n)=>({...t,[n]:e.getAttribute(n)})),{})}const a=new MutationObserver((()=>{var e,t;const a=r(n,y.attributes),o=(null==(e=y.isDarkMode)?void 0:e.call(y,a))?"dark":"light";null==(t=y.onChange)||t.call(y,o),x(o)}));a.observe(n,{attributes:!0,attributeFilter:y.attributes,childList:!1,subtree:!1}),w.current=a;const o=(null==(e=y.isDarkMode)?void 0:e.call(y,r(n,null==y?void 0:y.attributes)))?"dark":"light";return null==(t=y.onChange)||t.call(y,o),x(o),()=>a.disconnect()}),[y]),og.jsxs(og.Fragment,{children:[!c&&og.jsx("style",{type:"text/css",dangerouslySetInnerHTML:{__html:"\n @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');\n "}}),m,g&&og.jsx(MJ,{forcedColorMode:b??k,...v,shadowHostId:null==a?void 0:a.id,rootId:null==o?void 0:o.id,children:og.jsx("div",{className:l,style:{display:"contents",...h},children:e})})]})};function YJ(e){const{children:t,config:n,componentType:r}=e;return og.jsx(aR,{value:{...n,componentType:r},children:og.jsx(WJ,{children:og.jsx(sR,{children:t})})})}const ZJ=X.createContext(void 0),KJ=({children:e,source:t})=>og.jsx(ZJ.Provider,{value:{source:t},children:e}),XJ=()=>{const e=X.useContext(ZJ);if(!e)throw new Error("useSourceItem must be used within a SourceItemProvider");return e},QJ=X.createContext(void 0),JJ=({children:e,widget:t})=>og.jsx(QJ.Provider,{value:t,children:e}),e0=()=>X.useContext(QJ);var t0=X.useLayoutEffect,n0=function(e,t){"function"!=typeof e?e.current=t:e(t)},r0={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},a0=function(e){Object.keys(r0).forEach((function(t){e.style.setProperty(t,r0[t],"important")}))},o0=null,i0=function(e,t){var n=e.scrollHeight;return"border-box"===t.sizingStyle.boxSizing?n+t.borderSize:n-t.paddingSize};var s0=function(){},l0=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],c0=!!document.documentElement.currentStyle,u0=function(e){var t=window.getComputedStyle(e);if(null===t)return null;var n,r=(n=t,l0.reduce((function(e,t){return e[t]=n[t],e}),{})),a=r.boxSizing;return""===a?null:(c0&&"border-box"===a&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px"),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function d0(e,t,n){var r,a,o=(r=n,a=Q.useRef(r),t0((function(){a.current=r})),a);X.useLayoutEffect((function(){var n=function(e){return o.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}}),[])}var p0=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],f0=function(e,t){var n=e.cacheMeasurements,r=e.maxRows,a=e.minRows,o=e.onChange,i=void 0===o?s0:o,s=e.onHeightChange,l=void 0===s?s0:s,c=a$(e,p0),u=void 0!==c.value,d=X.useRef(null),p=function(e,t){var n=Q.useRef();return Q.useCallback((function(r){e.current=r,n.current&&n0(n.current,null),n.current=t,t&&n0(t,r)}),[t])}(d,t),f=X.useRef(0),h=X.useRef(),m=function(){var e=d.current,t=n&&h.current?h.current:u0(e);if(t){h.current=t;var o=function(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=1/0),o0||((o0=document.createElement("textarea")).setAttribute("tabindex","-1"),o0.setAttribute("aria-hidden","true"),a0(o0)),null===o0.parentNode&&document.body.appendChild(o0);var a=e.paddingSize,o=e.borderSize,i=e.sizingStyle,s=i.boxSizing;Object.keys(i).forEach((function(e){var t=e;o0.style[t]=i[t]})),a0(o0),o0.value=t;var l=i0(o0,e);o0.value=t,l=i0(o0,e),o0.value="x";var c=o0.scrollHeight-a,u=c*n;"border-box"===s&&(u=u+a+o),l=Math.max(u,l);var d=c*r;return"border-box"===s&&(d=d+a+o),[l=Math.min(d,l),c]}(t,e.value||e.placeholder||"x",a,r),i=o[0],s=o[1];f.current!==i&&(f.current=i,e.style.setProperty("height",i+"px","important"),l(i,{rowHeight:s}))}};return X.useLayoutEffect(m),function(e,t){d0(document.body,"reset",(function(n){e.current.form===n.target&&t(n)}))}(d,(function(){if(!u){var e=d.current,t=e.value;requestAnimationFrame((function(){t!==e.value&&m()}))}})),d0(window,"resize",m),function(e){d0(document.fonts,"loadingdone",e)}(m),X.createElement("textarea",o$({},c,{onChange:function(e){u||m(),i(e)},ref:p}))},h0=X.forwardRef(f0),m0="Avatar",[g0]=dK(m0),[y0,b0]=g0(m0),v0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,o]=X.useState("idle");return og.jsx(y0,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:og.jsx(bK.span,{...r,ref:t})})}));v0.displayName=m0;var k0="AvatarImage",x0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...o}=e,i=b0(k0,n),s=function(e,t){const[n,r]=X.useState("idle");return NK((()=>{if(!e)return void r("error");let n=!0;const a=new window.Image,o=e=>()=>{n&&r(e)};return r("loading"),a.onload=o("loaded"),a.onerror=o("error"),a.src=e,t&&(a.referrerPolicy=t),()=>{n=!1}}),[e,t]),n}(r,o.referrerPolicy),l=vK((e=>{a(e),i.onImageLoadingStatusChange(e)}));return NK((()=>{"idle"!==s&&l(s)}),[s,l]),"loaded"===s?og.jsx(bK.img,{...o,ref:t,src:r}):null}));x0.displayName=k0;var w0="AvatarFallback",E0=X.forwardRef(((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,o=b0(w0,n),[i,s]=X.useState(void 0===r);return X.useEffect((()=>{if(void 0!==r){const e=window.setTimeout((()=>s(!0)),r);return()=>window.clearTimeout(e)}}),[r]),i&&"loaded"!==o.imageLoadingStatus?og.jsx(bK.span,{...a,ref:t}):null}));E0.displayName=w0;var _0=v0,S0=x0,T0=E0;var C0="Checkbox",[A0]=dK(C0),[N0,I0]=A0(C0),O0=X.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:i,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[p,f]=X.useState(null),h=uK(t,(e=>f(e))),m=X.useRef(!1),g=!p||(u||!!p.closest("form")),[y=!1,b]=$Q({prop:a,defaultProp:o,onChange:c}),v=X.useRef(y);return X.useEffect((()=>{const e=null==p?void 0:p.form;if(e){const t=()=>b(v.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[p,b]),og.jsxs(N0,{scope:n,state:y,disabled:s,children:[og.jsx(bK.button,{type:"button",role:"checkbox","aria-checked":D0(y)?"mixed":y,"aria-required":i,"data-state":M0(y),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onKeyDown:sK(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:sK(e.onClick,(e=>{b((e=>!!D0(e)||!e)),g&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))}),g&&og.jsx(L0,{control:p,bubbles:!m.current,name:r,value:l,checked:y,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"},defaultChecked:!D0(o)&&o})]})}));O0.displayName=C0;var R0="CheckboxIndicator",P0=X.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=I0(R0,n);return og.jsx(HQ,{present:r||D0(o.state)||!0===o.state,children:og.jsx(bK.span,{"data-state":M0(o.state),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})}));P0.displayName=R0;var L0=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:a,...o}=e,i=X.useRef(null),s=function(e){const t=X.useRef({value:e,previous:e});return X.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}(n),l=bQ(t);X.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(s!==n&&a){const t=new Event("click",{bubbles:r});e.indeterminate=D0(n),a.call(e,!D0(n)&&n),e.dispatchEvent(t)}}),[s,n,r]);const c=X.useRef(!D0(n)&&n);return og.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??c.current,...o,tabIndex:-1,ref:i,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function D0(e){return"indeterminate"===e}function M0(e){return D0(e)?"indeterminate":e?"checked":"unchecked"}var F0=O0,j0=P0,z0=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.Children.toArray(n),o=a.find(U0);if(o){const e=o.props.children,n=a.map((t=>t===o?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(B0,{...r,ref:t,children:X.isValidElement(e)?X.cloneElement(e,void 0,n):null})}return og.jsx(B0,{...r,ref:t,children:n})}));z0.displayName="Slot";var B0=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?cK(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));B0.displayName="SlotClone";var H0=({children:e})=>og.jsx(og.Fragment,{children:e});function U0(e){return X.isValidElement(e)&&e.type===H0}var $0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const n=X.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?z0:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(o,{...a,ref:n})}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});var V0,G0="dismissableLayer.update",q0="dismissableLayer.pointerDownOutside",W0="dismissableLayer.focusOutside",Y0=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Z0=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(Y0),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=uK(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=vK(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){X0(q0,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=vK(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){X0(W0,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return kK((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(V0=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),K0(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=V0)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),K0())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(G0,e),()=>document.removeEventListener(G0,e)}),[]),og.jsx($0.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:sK(e.onFocusCapture,w.onFocusCapture),onBlurCapture:sK(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:sK(e.onPointerDownCapture,x.onPointerDownCapture)})}));Z0.displayName="DismissableLayer";function K0(){const e=new CustomEvent(G0);document.dispatchEvent(e)}function X0(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(Y0),r=X.useRef(null),a=uK(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx($0.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var Q0=0;function J0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var e1="focusScope.autoFocusOnMount",t1="focusScope.autoFocusOnUnmount",n1={bubbles:!1,cancelable:!0},r1=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=vK(a),u=vK(o),d=X.useRef(null),p=uK(t,(e=>l(e))),f=X.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;X.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:s1(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||s1(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&s1(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),X.useEffect((()=>{if(s){l1.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(e1,n1);s.addEventListener(e1,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(s1(r,{select:t}),document.activeElement!==n)return}((e=a1(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&s1(s))}return()=>{s.removeEventListener(e1,c),setTimeout((()=>{const e=new CustomEvent(t1,n1);s.addEventListener(t1,u),s.dispatchEvent(e),e.defaultPrevented||s1(t??document.body,{select:!0}),s.removeEventListener(t1,u),l1.remove(f)}),0)}}var e}),[s,c,u,f]);const h=X.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=a1(e),n=o1(t,e),r=o1(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&s1(o,{select:!0})):(e.preventDefault(),n&&s1(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return og.jsx($0.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function a1(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function o1(e,t){for(const n of e)if(!i1(n,{upTo:t}))return n}function i1(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function s1(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}r1.displayName="FocusScope";var l1=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=c1(e,t),e.unshift(t)},remove(t){var n;e=c1(e,t),null==(n=e[0])||n.resume()}}}();function c1(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var u1=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx($0.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));u1.displayName="Arrow";var d1=u1,p1="Popper",[f1,h1]=dK(p1),[m1,g1]=f1(p1),y1=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(m1,{scope:t,anchor:r,onAnchorChange:a,children:n})};y1.displayName=p1;var b1="PopperAnchor",v1=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=g1(b1,n),i=X.useRef(null),s=uK(t,i);return X.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:og.jsx($0.div,{...a,ref:s})}));v1.displayName=b1;var k1="PopperContent",[x1,w1]=f1(k1),E1=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=g1(k1,l),[E,_]=X.useState(null),S=uK(t,(e=>_(e))),[T,C]=X.useState(null),A=bQ(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(C1),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=lQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>YX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[cQ({mainAxis:u+I,alignmentAxis:p}),h&&uQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?dQ():void 0,...D}),h&&pQ({...D}),fQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&mQ({element:T,padding:f}),A1({arrowWidth:N,arrowHeight:I}),b&&hQ({strategy:"referenceHidden",...D})]}),[H,U]=N1(j),$=vK(k);NK((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return NK((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(x1,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx($0.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));E1.displayName=k1;var _1="PopperArrow",S1={top:"bottom",right:"left",bottom:"top",left:"right"},T1=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=w1(_1,n),o=S1[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(d1,{...r,ref:t,style:{...r.style,display:"block"}})})}));function C1(e){return null!==e}T1.displayName=_1;var A1=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=N1(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function N1(e){const[t,n="center"]=e.split("-");return[t,n]}var I1=y1,O1=v1,R1=E1,P1=T1,L1=new WeakMap,D1=new WeakMap,M1={},F1=0,j1=function(e){return e&&(e.host||j1(e.parentNode))},z1=function(e,t,n,r){var a=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=j1(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);M1[n]||(M1[n]=new WeakMap);var o=M1[n],i=[],s=new Set,l=new Set(a),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};a.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),a=null!==t&&"false"!==t,l=(L1.get(e)||0)+1,c=(o.get(e)||0)+1;L1.set(e,l),o.set(e,c),i.push(e),1===l&&a&&D1.set(e,!0),1===c&&e.setAttribute(n,"true"),a||e.setAttribute(r,"true")}catch(Dce){console.error("aria-hidden: cannot operate on ",e,Dce)}}))};return u(t),s.clear(),F1++,function(){i.forEach((function(e){var t=L1.get(e)-1,a=o.get(e)-1;L1.set(e,t),o.set(e,a),t||(D1.has(e)||e.removeAttribute(r),D1.delete(e)),a||e.removeAttribute(n)})),--F1||(L1=new WeakMap,L1=new WeakMap,D1=new WeakMap,M1={})}},B1=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),z1(r,a,n,"aria-hidden")):function(){return null}},H1="right-scroll-bar-position",U1="width-before-scroll-bar";function $1(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var V1="undefined"!=typeof window?X.useLayoutEffect:X.useEffect,G1=new WeakMap;function q1(e,t){var n,r,a,o=(n=null,r=function(t){return e.forEach((function(e){return $1(e,t)}))},(a=X.useState((function(){return{value:n,callback:r,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=r,a.facade);return V1((function(){var t=G1.get(o);if(t){var n=new Set(t),r=new Set(e),a=o.current;n.forEach((function(e){r.has(e)||$1(e,null)})),r.forEach((function(e){n.has(e)||$1(e,a)}))}G1.set(o,e)}),[e]),o}function W1(e){return e}var Y1=function(e){var t=e.sideCar,n=l$(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return X.createElement(r,s$({},n))};Y1.isSideCarExport=!0;var Z1=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=W1);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var a=t(e,r);return n.push(a),function(){n=n.filter((function(e){return e!==a}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var a=n;n=[],a.forEach(e),t=n}var o=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(o)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=s$({async:!0,ssr:!1},e),t}(),K1=function(){},X1=X.forwardRef((function(e,t){var n=X.useRef(null),r=X.useState({onScrollCapture:K1,onWheelCapture:K1,onTouchMoveCapture:K1}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,f=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,b=void 0===y?"div":y,v=e.gapMode,k=l$(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,w=q1([n,t]),E=s$(s$({},k),a);return X.createElement(X.Fragment,null,u&&X.createElement(x,{sideCar:Z1,removeScrollBar:c,shards:d,noRelative:f,noIsolation:h,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:v}),i?X.cloneElement(X.Children.only(s),s$(s$({},E),{ref:w})):X.createElement(b,s$({},E,{className:l,ref:w}),s))}));X1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},X1.classNames={fullWidth:U1,zeroRight:H1};function Q1(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var J1=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=Q1())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},e2=function(){var e,t=(e=J1(),function(t,n){X.useEffect((function(){return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},t2={left:0,top:0,right:0,gap:0},n2=function(e){return parseInt(e||"",10)||0},r2=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return t2;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[n2(n),n2(r),n2(a)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},a2=e2(),o2="data-scroll-locked",i2=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(o2,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(H1," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(U1," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(H1," .").concat(H1," {\n right: 0 ").concat(r,";\n }\n \n .").concat(U1," .").concat(U1," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(o2,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},s2=function(){var e=parseInt(document.body.getAttribute(o2)||"0",10);return isFinite(e)?e:0},l2=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;X.useEffect((function(){return document.body.setAttribute(o2,(s2()+1).toString()),function(){var e=s2()-1;e<=0?document.body.removeAttribute(o2):document.body.setAttribute(o2,e.toString())}}),[]);var o=X.useMemo((function(){return r2(a)}),[a]);return X.createElement(a2,{styles:i2(o,!t,a,n?"":"!important")})},c2=!1;if("undefined"!=typeof window)try{var u2=Object.defineProperty({},"passive",{get:function(){return c2=!0,!0}});window.addEventListener("test",u2,u2),window.removeEventListener("test",u2,u2)}catch(jNe){c2=!1}var d2=!!c2&&{passive:!1},p2=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},f2=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),h2(e,r)){var a=m2(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},h2=function(e,t){return"v"===e?function(e){return p2(e,"overflowY")}(t):function(e){return p2(e,"overflowX")}(t)},m2=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},g2=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},y2=function(e){return[e.deltaX,e.deltaY]},b2=function(e){return e&&"current"in e?e.current:e},v2=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},k2=0,x2=[];function w2(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const E2=(_2=function(e){var t=X.useRef([]),n=X.useRef([0,0]),r=X.useRef(),a=X.useState(k2++)[0],o=X.useState(e2)[0],i=X.useRef(e);X.useEffect((function(){i.current=e}),[e]),X.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=c$([e.lockRef.current],(e.shards||[]).map(b2),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=X.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=g2(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-o[0],c="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var p=window.getSelection(),f=p&&p.anchorNode;if(f&&(f===u||f.contains(u)))return!1;var h=f2(d,u);if(!h)return!0;if(h?a=d:(a="v"===d?"h":"v",h=f2(d,u)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||c)&&(r.current=a),!a)return!0;var m=r.current||a;return function(e,t,n,r){var a=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),o=a*r,i=n.target,s=t.contains(i),l=!1,c=o>0,u=0,d=0;do{if(!i)break;var p=m2(e,i),f=p[0],h=p[1]-p[2]-a*f;(f||h)&&h2(e,i)&&(u+=h,d+=f);var m=i.parentNode;i=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(m,t,e,"h"===m?l:c)}),[]),l=X.useCallback((function(e){var n=e;if(x2.length&&x2[x2.length-1]===o){var r="deltaY"in n?y2(n):g2(n),a=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,a=r,t[0]===a[0]&&t[1]===a[1]);var t,a}))[0];if(a&&a.should)n.cancelable&&n.preventDefault();else if(!a){var l=(i.current.shards||[]).map(b2).filter(Boolean).filter((function(e){return e.contains(n.target)}));(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),c=X.useCallback((function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:w2(r)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),u=X.useCallback((function(e){n.current=g2(e),r.current=void 0}),[]),d=X.useCallback((function(t){c(t.type,y2(t),t.target,s(t,e.lockRef.current))}),[]),p=X.useCallback((function(t){c(t.type,g2(t),t.target,s(t,e.lockRef.current))}),[]);X.useEffect((function(){return x2.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,d2),document.addEventListener("touchmove",l,d2),document.addEventListener("touchstart",u,d2),function(){x2=x2.filter((function(e){return e!==o})),document.removeEventListener("wheel",l,d2),document.removeEventListener("touchmove",l,d2),document.removeEventListener("touchstart",u,d2)}}),[]);var f=e.removeScrollBar,h=e.inert;return X.createElement(X.Fragment,null,h?X.createElement(o,{styles:v2(a)}):null,f?X.createElement(l2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Z1.useMedium(_2),Y1);var _2,S2=X.forwardRef((function(e,t){return X.createElement(X1,s$({},e,{ref:t,sideCar:E2}))}));S2.classNames=X1.classNames;var T2="Popover",[C2]=dK(T2,[h1]),A2=h1(),[N2,I2]=C2(T2),O2=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!1}=e,s=A2(t),l=X.useRef(null),[c,u]=X.useState(!1),[d=!1,p]=$Q({prop:r,defaultProp:a,onChange:o});return og.jsx(I1,{...s,children:og.jsx(N2,{scope:t,contentId:RK(),triggerRef:l,open:d,onOpenChange:p,onOpenToggle:X.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:c,onCustomAnchorAdd:X.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:X.useCallback((()=>u(!1)),[]),modal:i,children:n})})};O2.displayName=T2;var R2="PopoverAnchor";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=I2(R2,n),o=A2(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=a;return X.useEffect((()=>(i(),()=>s())),[i,s]),og.jsx(O1,{...o,...r,ref:t})})).displayName=R2;var P2="PopoverTrigger",L2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=I2(P2,n),o=A2(n),i=uK(t,a.triggerRef),s=og.jsx($0.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":V2(a.open),...r,ref:i,onClick:sK(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?s:og.jsx(O1,{asChild:!0,...o,children:s})}));L2.displayName=P2;var[D2,M2]=C2("PopoverPortal",{forceMount:void 0}),F2="PopoverContent",j2=X.forwardRef(((e,t)=>{const n=M2(F2,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,o=I2(F2,e.__scopePopover);return og.jsx(HQ,{present:r||o.open,children:o.modal?og.jsx(z2,{...a,ref:t}):og.jsx(B2,{...a,ref:t})})}));j2.displayName=F2;var z2=X.forwardRef(((e,t)=>{const n=I2(F2,e.__scopePopover),r=X.useRef(null),a=uK(t,r),o=X.useRef(!1);return X.useEffect((()=>{const e=r.current;if(e)return B1(e)}),[]),og.jsx(S2,{as:z0,allowPinchZoom:!0,children:og.jsx(H2,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:sK(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),o.current||null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:sK(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;o.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:sK(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),B2=X.forwardRef(((e,t)=>{const n=I2(F2,e.__scopePopover),r=X.useRef(!1),a=X.useRef(!1);return og.jsx(H2,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null==(o=e.onCloseAutoFocus)||o.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),H2=X.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,p=I2(F2,n),f=A2(n);return X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??J0()),document.body.insertAdjacentElement("beforeend",e[1]??J0()),Q0++,()=>{1===Q0&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),Q0--}}),[]),og.jsx(r1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:og.jsx(Z0,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:og.jsx(R1,{"data-state":V2(p.open),role:"dialog",id:p.contentId,...f,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),U2="PopoverClose";X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=I2(U2,n);return og.jsx($0.button,{type:"button",...r,ref:t,onClick:sK(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=U2;var $2=X.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,a=A2(n);return og.jsx(P1,{...a,...r,ref:t})}));function V2(e){return e?"open":"closed"}$2.displayName="PopoverArrow";var G2=O2,q2=L2,W2=j2,Y2=$2,Z2=X.createContext(void 0);var K2="ScrollArea",[X2]=dK(K2),[Q2,J2]=X2(K2),e5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:o=600,...i}=e,[s,l]=X.useState(null),[c,u]=X.useState(null),[d,p]=X.useState(null),[f,h]=X.useState(null),[m,g]=X.useState(null),[y,b]=X.useState(0),[v,k]=X.useState(0),[x,w]=X.useState(!1),[E,_]=X.useState(!1),S=uK(t,(e=>l(e))),T=function(e){const t=X.useContext(Z2);return e||t||"ltr"}(a);return og.jsx(Q2,{scope:n,type:r,dir:T,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:p,scrollbarX:f,onScrollbarXChange:h,scrollbarXEnabled:x,onScrollbarXEnabledChange:w,scrollbarY:m,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:b,onCornerHeightChange:k,children:og.jsx(bK.div,{dir:T,...i,ref:S,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":v+"px",...e.style}})})}));e5.displayName=K2;var t5="ScrollAreaViewport",n5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...o}=e,i=J2(t5,n),s=uK(t,X.useRef(null),i.onViewportChange);return og.jsxs(og.Fragment,{children:[og.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),og.jsx(bK.div,{"data-radix-scroll-area-viewport":"",...o,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:og.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})}));n5.displayName=t5;var r5="ScrollAreaScrollbar",a5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=J2(r5,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=a,s="horizontal"===e.orientation;return X.useEffect((()=>(s?o(!0):i(!0),()=>{s?o(!1):i(!1)})),[s,o,i]),"hover"===a.type?og.jsx(o5,{...r,ref:t,forceMount:n}):"scroll"===a.type?og.jsx(i5,{...r,ref:t,forceMount:n}):"auto"===a.type?og.jsx(s5,{...r,ref:t,forceMount:n}):"always"===a.type?og.jsx(l5,{...r,ref:t}):null}));a5.displayName=r5;var o5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=J2(r5,e.__scopeScrollArea),[o,i]=X.useState(!1);return X.useEffect((()=>{const e=a.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout((()=>i(!1)),a.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}}),[a.scrollArea,a.scrollHideDelay]),og.jsx(HQ,{present:n||o,children:og.jsx(s5,{"data-state":o?"visible":"hidden",...r,ref:t})})})),i5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=J2(r5,e.__scopeScrollArea),o="horizontal"===e.orientation,i=C5((()=>l("SCROLL_END")),100),[s,l]=(c="hidden",u={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},X.useReducer(((e,t)=>u[e][t]??e),c));var c,u;return X.useEffect((()=>{if("idle"===s){const e=window.setTimeout((()=>l("HIDE")),a.scrollHideDelay);return()=>window.clearTimeout(e)}}),[s,a.scrollHideDelay,l]),X.useEffect((()=>{const e=a.viewport,t=o?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[a.viewport,o,l,i]),og.jsx(HQ,{present:n||"hidden"!==s,children:og.jsx(l5,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:sK(e.onPointerEnter,(()=>l("POINTER_ENTER"))),onPointerLeave:sK(e.onPointerLeave,(()=>l("POINTER_LEAVE")))})})})),s5=X.forwardRef(((e,t)=>{const n=J2(r5,e.__scopeScrollArea),{forceMount:r,...a}=e,[o,i]=X.useState(!1),s="horizontal"===e.orientation,l=C5((()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}}),10);return A5(n.viewport,l),A5(n.content,l),og.jsx(HQ,{present:r||o,children:og.jsx(l5,{"data-state":o?"visible":"hidden",...a,ref:t})})})),l5=X.forwardRef(((e,t)=>{const{orientation:n="vertical",...r}=e,a=J2(r5,e.__scopeScrollArea),o=X.useRef(null),i=X.useRef(0),[s,l]=X.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=x5(s.viewport,s.content),u={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(c>0&&c<1),onThumbChange:e=>o.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const a=w5(n),o=a/2,i=t||o,s=a-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d="ltr"===r?[0,u]:[-1*u,0];return _5([l,c],d)(e)}(e,i.current,s,t)}return"horizontal"===n?og.jsx(c5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=E5(a.viewport.scrollLeft,s,a.dir);o.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=d(e,a.dir))}}):"vertical"===n?og.jsx(u5,{...u,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const e=E5(a.viewport.scrollTop,s);o.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=d(e))}}):null})),c5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=J2(r5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=uK(t,l,o.onScrollbarXChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),og.jsx(f5,{"data-orientation":"horizontal",...a,ref:c,sizes:n,style:{bottom:0,left:"rtl"===o.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===o.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":w5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),S5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:k5(i.paddingLeft),paddingEnd:k5(i.paddingRight)}})}})})),u5=X.forwardRef(((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,o=J2(r5,e.__scopeScrollArea),[i,s]=X.useState(),l=X.useRef(null),c=uK(t,l,o.onScrollbarYChange);return X.useEffect((()=>{l.current&&s(getComputedStyle(l.current))}),[l]),og.jsx(f5,{"data-orientation":"vertical",...a,ref:c,sizes:n,style:{top:0,right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":w5(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){const r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),S5(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:k5(i.paddingTop),paddingEnd:k5(i.paddingBottom)}})}})})),[d5,p5]=X2(r5),f5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...p}=e,f=J2(r5,n),[h,m]=X.useState(null),g=uK(t,(e=>m(e))),y=X.useRef(null),b=X.useRef(""),v=f.viewport,k=r.content-r.viewport,x=vK(u),w=vK(l),E=C5(d,10);function _(e){if(y.current){const t=e.clientX-y.current.left,n=e.clientY-y.current.top;c({x:t,y:n})}}return X.useEffect((()=>{const e=e=>{const t=e.target;(null==h?void 0:h.contains(t))&&x(e,k)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[v,h,k,x]),X.useEffect(w,[r,w]),A5(h,E),A5(f.content,E),og.jsx(d5,{scope:n,scrollbar:h,hasThumb:a,onThumbChange:vK(o),onThumbPointerUp:vK(i),onThumbPositionChange:w,onThumbPointerDown:vK(s),children:og.jsx(bK.div,{...p,ref:g,style:{position:"absolute",...p.style},onPointerDown:sK(e.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),y.current=h.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",f.viewport&&(f.viewport.style.scrollBehavior="auto"),_(e)}})),onPointerMove:sK(e.onPointerMove,_),onPointerUp:sK(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,f.viewport&&(f.viewport.style.scrollBehavior=""),y.current=null}))})})})),h5="ScrollAreaThumb",m5=X.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,a=p5(h5,e.__scopeScrollArea);return og.jsx(HQ,{present:n||a.hasThumb,children:og.jsx(g5,{ref:t,...r})})})),g5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,o=J2(h5,n),i=p5(h5,n),{onThumbPositionChange:s}=i,l=uK(t,(e=>i.onThumbChange(e))),c=X.useRef(void 0),u=C5((()=>{c.current&&(c.current(),c.current=void 0)}),100);return X.useEffect((()=>{const e=o.viewport;if(e){const t=()=>{if(u(),!c.current){const t=T5(e,s);c.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[o.viewport,u,s]),og.jsx(bK.div,{"data-state":i.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:sK(e.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})})),onPointerUp:sK(e.onPointerUp,i.onThumbPointerUp)})}));m5.displayName=h5;var y5="ScrollAreaCorner",b5=X.forwardRef(((e,t)=>{const n=J2(y5,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?og.jsx(v5,{...e,ref:t}):null}));b5.displayName=y5;var v5=X.forwardRef(((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=J2(y5,n),[o,i]=X.useState(0),[s,l]=X.useState(0),c=Boolean(o&&s);return A5(a.scrollbarX,(()=>{var e;const t=(null==(e=a.scrollbarX)?void 0:e.offsetHeight)||0;a.onCornerHeightChange(t),l(t)})),A5(a.scrollbarY,(()=>{var e;const t=(null==(e=a.scrollbarY)?void 0:e.offsetWidth)||0;a.onCornerWidthChange(t),i(t)})),c?og.jsx(bK.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:0,...e.style}}):null}));function k5(e){return e?parseInt(e,10):0}function x5(e,t){const n=e/t;return isNaN(n)?0:n}function w5(e){const t=x5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function E5(e,t,n="ltr"){const r=w5(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,i=t.content-t.viewport,s=o-r,l=function(e,[t,n]){return Math.min(n,Math.max(t,e))}(e,"ltr"===n?[0,i]:[-1*i,0]);return _5([0,i],[0,s])(l)}function _5(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function S5(e,t){return e>0&&e<t}var T5=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function a(){const o={left:e.scrollLeft,top:e.scrollTop},i=n.left!==o.left,s=n.top!==o.top;(i||s)&&t(),n=o,r=window.requestAnimationFrame(a)}(),()=>window.cancelAnimationFrame(r)};function C5(e,t){const n=vK(e),r=X.useRef(0);return X.useEffect((()=>()=>window.clearTimeout(r.current)),[]),X.useCallback((()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)}),[n,t])}function A5(e,t){const n=vK(t);NK((()=>{let t=0;if(e){const r=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}}),[e,n])}var N5=e5,I5=n5,O5=b5;function R5(e,[t,n]){return Math.min(n,Math.max(t,e))}function P5(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function L5(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r);a.displayName=t+"Context";const o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},D5(r,...t)]}function D5(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function M5(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function F5(...e){return t=>{let n=!1;const r=e.map((e=>{const r=M5(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():M5(e[t],null)}}}}function j5(...e){return X.useCallback(F5(...e),e)}var z5=Symbol.for("react.lazy"),B5=J[" use ".trim().toString()];function H5(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===z5&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function U5(e){const t=$5(e),n=X.forwardRef(((e,n)=>{let{children:r,...a}=e;H5(r)&&"function"==typeof B5&&(r=B5(r._payload));const o=X.Children.toArray(r),i=o.find(G5);if(i){const e=i.props.children,r=o.map((t=>t===i?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return og.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function $5(e){const t=X.forwardRef(((e,t)=>{let{children:n,...r}=e;if(H5(n)&&"function"==typeof B5&&(n=B5(n._payload)),X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?F5(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var V5=Symbol("radix.slottable");function G5(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===V5}var q5=X.createContext(void 0);function W5(e){const t=X.useContext(q5);return e||t||"ltr"}function Y5(e){const t=Z5(e),n=X.forwardRef(((e,n)=>{const{children:r,...a}=e,o=X.Children.toArray(r),i=o.find(X5);if(i){const e=i.props.children,r=o.map((t=>t===i?X.Children.count(e)>1?X.Children.only(null):X.isValidElement(e)?e.props.children:null:t));return og.jsx(t,{...a,ref:n,children:X.isValidElement(e)?X.cloneElement(e,void 0,r):null})}return og.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function Z5(e){const t=X.forwardRef(((e,t)=>{const{children:n,...r}=e;if(X.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{const t=o(...e);return a(...e),t}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==X.Fragment&&(a.ref=t?F5(t,e):e),X.cloneElement(n,a)}return X.Children.count(n)>1?X.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var K5=Symbol("radix.slottable");function X5(e){return X.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===K5}var Q5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=Y5(`Primitive.${t}`),r=X.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function J5(e){const t=X.useRef(e);return X.useEffect((()=>{t.current=e})),X.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}var e3,t3="dismissableLayer.update",n3="dismissableLayer.pointerDownOutside",r3="dismissableLayer.focusOutside",a3=X.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),o3=X.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...l}=e,c=X.useContext(a3),[u,d]=X.useState(null),p=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,f]=X.useState({}),h=j5(t,(e=>d(e))),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=u?m.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,k=b>=y,x=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=J5(e),r=X.useRef(!1),a=X.useRef((()=>{}));return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){s3(n3,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));k&&!n&&(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p),w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=J5(e),r=X.useRef(!1);return X.useEffect((()=>{const e=e=>{if(e.target&&!r.current){s3(r3,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),p);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=J5(e);X.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}((e=>{b===c.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),p),X.useEffect((()=>{if(u)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(e3=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),i3(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=e3)}}),[u,p,n,c]),X.useEffect((()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),i3())}),[u,c]),X.useEffect((()=>{const e=()=>f({});return document.addEventListener(t3,e),()=>document.removeEventListener(t3,e)}),[]),og.jsx(Q5.div,{...l,ref:h,style:{pointerEvents:v?k?"auto":"none":void 0,...e.style},onFocusCapture:P5(e.onFocusCapture,w.onFocusCapture),onBlurCapture:P5(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:P5(e.onPointerDownCapture,x.onPointerDownCapture)})}));o3.displayName="DismissableLayer";function i3(){const e=new CustomEvent(t3);document.dispatchEvent(e)}function s3(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?function(e,t){e&&ue.flushSync((()=>e.dispatchEvent(t)))}(a,o):a.dispatchEvent(o)}X.forwardRef(((e,t)=>{const n=X.useContext(a3),r=X.useRef(null),a=j5(t,r);return X.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),og.jsx(Q5.div,{...e,ref:a})})).displayName="DismissableLayerBranch";var l3=0;function c3(){X.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??u3()),document.body.insertAdjacentElement("beforeend",e[1]??u3()),l3++,()=>{1===l3&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),l3--}}),[])}function u3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var d3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce(((e,t)=>{const n=U5(`Primitive.${t}`),r=X.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),og.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),p3="focusScope.autoFocusOnMount",f3="focusScope.autoFocusOnUnmount",h3={bubbles:!1,cancelable:!0},m3=X.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,l]=X.useState(null),c=J5(a),u=J5(o),d=X.useRef(null),p=j5(t,(e=>l(e))),f=X.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;X.useEffect((()=>{if(r){let e=function(e){if(f.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:v3(d.current,{select:!0})},t=function(e){if(f.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||v3(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&v3(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,f.paused]),X.useEffect((()=>{if(s){k3.add(f);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(p3,h3);s.addEventListener(p3,c),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(v3(r,{select:t}),document.activeElement!==n)return}((e=g3(s),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&v3(s))}return()=>{s.removeEventListener(p3,c),setTimeout((()=>{const e=new CustomEvent(f3,h3);s.addEventListener(f3,u),s.dispatchEvent(e),e.defaultPrevented||v3(t??document.body,{select:!0}),s.removeEventListener(f3,u),k3.remove(f)}),0)}}var e}),[s,c,u,f]);const h=X.useCallback((e=>{if(!n&&!r)return;if(f.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=function(e){const t=g3(e),n=y3(t,e),r=y3(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&v3(o,{select:!0})):(e.preventDefault(),n&&v3(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,f.paused]);return og.jsx(d3.div,{tabIndex:-1,...i,ref:p,onKeyDown:h})}));function g3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function y3(e,t){for(const n of e)if(!b3(n,{upTo:t}))return n}function b3(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function v3(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}m3.displayName="FocusScope";var k3=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=x3(e,t),e.unshift(t)},remove(t){var n;e=x3(e,t),null==(n=e[0])||n.resume()}}}();function x3(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var w3=X.forwardRef(((e,t)=>{const{children:n,width:r=10,height:a=5,...o}=e;return og.jsx(Q5.svg,{...o,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:og.jsx("polygon",{points:"0,0 30,0 15,10"})})}));w3.displayName="Arrow";var E3=w3;function _3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>X.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return X.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=X.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,c=X.useMemo((()=>s),Object.values(s));return og.jsx(l.Provider,{value:c,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,c=X.useContext(l);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},S3(r,...t)]}function S3(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return X.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}var T3="Popper",[C3,A3]=_3(T3),[N3,I3]=C3(T3),O3=e=>{const{__scopePopper:t,children:n}=e,[r,a]=X.useState(null);return og.jsx(N3,{scope:t,anchor:r,onAnchorChange:a,children:n})};O3.displayName=T3;var R3="PopperAnchor",P3=X.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=I3(R3,n),i=X.useRef(null),s=j5(t,i),l=X.useRef(null);return X.useEffect((()=>{const e=l.current;l.current=(null==r?void 0:r.current)||i.current,e!==l.current&&o.onAnchorChange(l.current)})),r?null:og.jsx(Q5.div,{...a,ref:s})}));P3.displayName=R3;var L3="PopperContent",[D3,M3]=C3(L3),F3=X.forwardRef(((e,t)=>{var n,r,a,o,i,s;const{__scopePopper:l,side:c="bottom",sideOffset:u=0,align:d="center",alignOffset:p=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:g=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:v="optimized",onPlaced:k,...x}=e,w=I3(L3,l),[E,_]=X.useState(null),S=j5(t,(e=>_(e))),[T,C]=X.useState(null),A=function(e){const[t,n]=X.useState(void 0);return HO((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}(T),N=(null==A?void 0:A.width)??0,I=(null==A?void 0:A.height)??0,O=c+("center"!==d?"-"+d:""),R="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},P=Array.isArray(m)?m:[m],L=P.length>0,D={padding:R,boundary:P.filter(H3),altBoundary:L},{refs:M,floatingStyles:F,placement:j,isPositioned:z,middlewareData:B}=lQ({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>YX(...e,{animationFrame:"always"===v}),elements:{reference:w.anchor},middleware:[cQ({mainAxis:u+I,alignmentAxis:p}),h&&uQ({mainAxis:!0,crossAxis:!1,limiter:"partial"===y?dQ():void 0,...D}),h&&pQ({...D}),fQ({...D,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),T&&mQ({element:T,padding:f}),U3({arrowWidth:N,arrowHeight:I}),b&&hQ({strategy:"referenceHidden",...D})]}),[H,U]=$3(j),$=J5(k);HO((()=>{z&&(null==$||$())}),[z,$]);const V=null==(n=B.arrow)?void 0:n.x,G=null==(r=B.arrow)?void 0:r.y,q=0!==(null==(a=B.arrow)?void 0:a.centerOffset),[W,Y]=X.useState();return HO((()=>{E&&Y(window.getComputedStyle(E).zIndex)}),[E]),og.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:z?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[null==(o=B.transformOrigin)?void 0:o.x,null==(i=B.transformOrigin)?void 0:i.y].join(" "),...(null==(s=B.hide)?void 0:s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:og.jsx(D3,{scope:l,placedSide:H,onArrowChange:C,arrowX:V,arrowY:G,shouldHideArrow:q,children:og.jsx(Q5.div,{"data-side":H,"data-align":U,...x,ref:S,style:{...x.style,animation:z?void 0:"none"}})})})}));F3.displayName=L3;var j3="PopperArrow",z3={top:"bottom",right:"left",bottom:"top",left:"right"},B3=X.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,a=M3(j3,n),o=z3[a.placedSide];return og.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:og.jsx(E3,{...r,ref:t,style:{...r.style,display:"block"}})})}));function H3(e){return null!==e}B3.displayName=j3;var U3=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a;const{placement:o,rects:i,middlewareData:s}=t,l=0!==(null==(n=s.arrow)?void 0:n.centerOffset),c=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[d,p]=$3(o),f={start:"0%",center:"50%",end:"100%"}[p],h=((null==(r=s.arrow)?void 0:r.x)??0)+c/2,m=((null==(a=s.arrow)?void 0:a.y)??0)+u/2;let g="",y="";return"bottom"===d?(g=l?f:`${h}px`,y=-u+"px"):"top"===d?(g=l?f:`${h}px`,y=`${i.floating.height+u}px`):"right"===d?(g=-u+"px",y=l?f:`${m}px`):"left"===d&&(g=`${i.floating.width+u}px`,y=l?f:`${m}px`),{data:{x:g,y:y}}}});function $3(e){const[t,n="center"]=e.split("-");return[t,n]}var V3=O3,G3=P3,q3=F3,W3=B3,Y3=X.forwardRef(((e,t)=>{var n;const{container:r,...a}=e,[o,i]=X.useState(!1);HO((()=>i(!0)),[]);const s=r||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?de.createPortal(og.jsx(d3.div,{...a,ref:t}),s):null}));Y3.displayName="Portal";const Z3=[" ","Enter","ArrowUp","ArrowDown"],K3=[" ","Enter"],X3="Select",[Q3,J3,e4]=function(e){const t=e+"CollectionProvider",[n,r]=L5(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e=>{const{scope:t,children:n}=e,r=Q.useRef(null),o=Q.useRef(new Map).current;return og.jsx(a,{scope:t,itemMap:o,collectionRef:r,children:n})};i.displayName=t;const s=e+"CollectionSlot",l=U5(s),c=Q.forwardRef(((e,t)=>{const{scope:n,children:r}=e,a=j5(t,o(s,n).collectionRef);return og.jsx(l,{ref:a,children:r})}));c.displayName=s;const u=e+"CollectionItemSlot",d="data-radix-collection-item",p=U5(u),f=Q.forwardRef(((e,t)=>{const{scope:n,children:r,...a}=e,i=Q.useRef(null),s=j5(t,i),l=o(u,n);return Q.useEffect((()=>(l.itemMap.set(i,{ref:i,...a}),()=>{l.itemMap.delete(i)}))),og.jsx(p,{[d]:"",ref:s,children:r})}));return f.displayName=u,[{Provider:i,Slot:c,ItemSlot:f},function(t){const n=o(e+"CollectionConsumer",t);return Q.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}(X3),[t4]=L5(X3,[e4,A3]),n4=A3(),[r4,a4]=t4(X3),[o4,i4]=t4(X3),s4=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:s,onValueChange:l,dir:c,disabled:u,required:d}=e,p=n4(t),[f,h]=X.useState(null),[m,g]=X.useState(null),[y,b]=X.useState(!1),v=W5(c),[k,x]=SZ({prop:r,defaultProp:a??!1,onChange:o,caller:X3}),[w,E]=SZ({prop:i,defaultProp:s,onChange:l,caller:X3}),_=X.useRef(null),[S,T]=X.useState(new Set);return og.jsx(V3,{...p,children:og.jsx(r4,{required:d,scope:t,trigger:f,onTriggerChange:h,valueNode:m,onValueNodeChange:g,valueNodeHasChildren:y,onValueNodeHasChildrenChange:b,contentId:VO(),value:w,onValueChange:E,open:!!k,onOpenChange:x,dir:v,triggerPointerDownPosRef:_,disabled:u,children:og.jsx(Q3.Provider,{scope:t,children:og.jsx(o4,{scope:e.__scopeSelect,onNativeOptionAdd:X.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:X.useCallback((e=>{T((t=>{const n=new Set(t);return n.delete(e),n}))}),[]),children:n})})})})};s4.displayName=X3;const l4="SelectTrigger",c4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=n4(n),i=a4(l4,n),s=i.disabled||r,l=j5(t,i.onTriggerChange),c=J3(n),u=X.useRef("touch"),[d,p,f]=$4((e=>{const t=c().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=V4(t,e,n);void 0!==r&&i.onValueChange(r.value)})),h=e=>{s||(i.onOpenChange(!0),f()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return og.jsx(G3,{asChild:!0,...o,children:og.jsx(d3.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":U4(i.value)?"":void 0,...a,ref:l,onClick:P5(a.onClick,(e=>{e.currentTarget.focus(),"mouse"!==u.current&&h(e)})),onPointerDown:P5(a.onPointerDown,(e=>{u.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())})),onKeyDown:P5(a.onKeyDown,(e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||Z3.includes(e.key)&&(h(),e.preventDefault())}))})})}));c4.displayName=l4;const u4="SelectValue",d4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,l=a4(u4,n),{onValueNodeHasChildrenChange:c}=l,u=void 0!==o,d=j5(t,l.onValueNodeChange);return HO((()=>{c(u)}),[c,u]),og.jsx(d3.span,{...s,ref:d,style:{pointerEvents:"none"},children:U4(l.value)?og.jsx(og.Fragment,{children:i}):o})}));d4.displayName=u4;const p4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return og.jsx(d3.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})}));p4.displayName="SelectIcon";const f4="SelectContent",h4=X.forwardRef(((e,t)=>{const n=a4(f4,e.__scopeSelect),[r,a]=X.useState();if(HO((()=>{a(new DocumentFragment)}),[]),!n.open){const t=r;return t?ue.createPortal(og.jsx(g4,{scope:e.__scopeSelect,children:og.jsx(Q3.Slot,{scope:e.__scopeSelect,children:og.jsx("div",{children:e.children})})}),t):null}return og.jsx(v4,{...e,ref:t})}));h4.displayName=f4;const m4=10,[g4,y4]=t4(f4),b4=U5("SelectContent.RemoveScroll"),v4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g,...y}=e,b=a4(f4,n),[v,k]=X.useState(null),[x,w]=X.useState(null),E=j5(t,(e=>k(e))),[_,S]=X.useState(null),[T,C]=X.useState(null),A=J3(n),[N,I]=X.useState(!1),O=X.useRef(!1);X.useEffect((()=>{if(v)return B1(v)}),[v]),c3();const R=X.useCallback((e=>{const[t,...n]=A().map((e=>e.ref.current)),[r]=n.slice(-1),a=document.activeElement;for(const o of e){if(o===a)return;if(null==o||o.scrollIntoView({block:"nearest"}),o===t&&x&&(x.scrollTop=0),o===r&&x&&(x.scrollTop=x.scrollHeight),null==o||o.focus(),document.activeElement!==a)return}}),[A,x]),P=X.useCallback((()=>R([_,v])),[R,_,v]);X.useEffect((()=>{N&&P()}),[N,P]);const{onOpenChange:L,triggerPointerDownPosRef:D}=b;X.useEffect((()=>{if(v){let e={x:0,y:0};const t=t=>{var n,r;e={x:Math.abs(Math.round(t.pageX)-((null==(n=D.current)?void 0:n.x)??0)),y:Math.abs(Math.round(t.pageY)-((null==(r=D.current)?void 0:r.y)??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():v.contains(n.target)||L(!1),document.removeEventListener("pointermove",t),D.current=null};return null!==D.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[v,L,D]),X.useEffect((()=>{const e=()=>L(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[L]);const[M,F]=$4((e=>{const t=A().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=V4(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),j=X.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&(S(e),r&&(O.current=!0))}),[b.value]),z=X.useCallback((()=>null==v?void 0:v.focus()),[v]),B=X.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&C(e)}),[b.value]),H="popper"===r?x4:k4,U=H===x4?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:p,collisionPadding:f,sticky:h,hideWhenDetached:m,avoidCollisions:g}:{};return og.jsx(g4,{scope:n,content:v,viewport:x,onViewportChange:w,itemRefCallback:j,selectedItem:_,onItemLeave:z,itemTextRefCallback:B,focusSelectedItem:P,selectedItemText:T,position:r,isPositioned:N,searchRef:M,children:og.jsx(S2,{as:b4,allowPinchZoom:!0,removeScrollBar:!1,children:og.jsx(m3,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:P5(a,(e=>{var t;null==(t=b.trigger)||t.focus({preventScroll:!0}),e.preventDefault()})),children:og.jsx(o3,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:og.jsx(H,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...y,...U,onPlaced:()=>I(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:P5(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||F(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=A().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>R(t))),e.preventDefault()}}))})})})})})}));v4.displayName="SelectContentImpl";const k4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=a4(f4,n),i=y4(f4,n),[s,l]=X.useState(null),[c,u]=X.useState(null),d=j5(t,(e=>u(e))),p=J3(n),f=X.useRef(!1),h=X.useRef(!0),{viewport:m,selectedItem:g,selectedItemText:y,focusSelectedItem:b}=i,v=X.useCallback((()=>{if(o.trigger&&o.valueNode&&s&&c&&m&&g&&y){const e=o.trigger.getBoundingClientRect(),t=c.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=y.getBoundingClientRect();if("rtl"!==o.dir){const r=a.left-t.left,o=n.left-r,i=e.left-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-m4,d=R5(o,[m4,Math.max(m4,u-c)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-a.right,o=window.innerWidth-n.right-r,i=window.innerWidth-e.right-o,l=e.width+i,c=Math.max(l,t.width),u=window.innerWidth-m4,d=R5(o,[m4,Math.max(m4,u-c)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=p(),l=window.innerHeight-2*m4,u=m.scrollHeight,d=window.getComputedStyle(c),h=Number.parseInt(d.borderTopWidth,10),b=Number.parseInt(d.paddingTop,10),v=Number.parseInt(d.borderBottomWidth,10),k=h+b+u+Number.parseInt(d.paddingBottom,10)+v,x=Math.min(5*g.offsetHeight,k),w=window.getComputedStyle(m),E=Number.parseInt(w.paddingTop,10),_=Number.parseInt(w.paddingBottom,10),S=e.top+e.height/2-m4,T=l-S,C=g.offsetHeight/2,A=h+b+(g.offsetTop+C),N=k-A;if(A<=S){const e=i.length>0&&g===i[i.length-1].ref.current;s.style.bottom="0px";const t=c.clientHeight-m.offsetTop-m.offsetHeight,n=A+Math.max(T,C+(e?_:0)+t+v);s.style.height=n+"px"}else{const e=i.length>0&&g===i[0].ref.current;s.style.top="0px";const t=Math.max(S,h+m.offsetTop+(e?E:0)+C)+N;s.style.height=t+"px",m.scrollTop=A-S+m.offsetTop}s.style.margin=`${m4}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",null==r||r(),requestAnimationFrame((()=>f.current=!0))}}),[p,o.trigger,o.valueNode,s,c,m,g,y,o.dir,r]);HO((()=>v()),[v]);const[k,x]=X.useState();HO((()=>{c&&x(window.getComputedStyle(c).zIndex)}),[c]);const w=X.useCallback((e=>{e&&!0===h.current&&(v(),null==b||b(),h.current=!1)}),[v,b]);return og.jsx(w4,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:f,onScrollButtonChange:w,children:og.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:og.jsx(d3.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));k4.displayName="SelectItemAlignedPosition";const x4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=m4,...o}=e,i=n4(n);return og.jsx(q3,{...i,...o,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));x4.displayName="SelectPopperPosition";const[w4,E4]=t4(f4,{}),_4="SelectViewport",S4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,o=y4(_4,n),i=E4(_4,n),s=j5(t,o.onViewportChange),l=X.useRef(0);return og.jsxs(og.Fragment,{children:[og.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),og.jsx(Q3.Slot,{scope:n,children:og.jsx(d3.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:P5(a.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if((null==r?void 0:r.current)&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*m4,a=Number.parseFloat(n.style.minHeight),o=Number.parseFloat(n.style.height),i=Math.max(a,o);if(i<r){const a=i+e,o=Math.min(r,a),s=a-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop}))})})]})}));S4.displayName=_4;const T4="SelectGroup",[C4,A4]=t4(T4);X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=VO();return og.jsx(C4,{scope:n,id:a,children:og.jsx(d3.div,{role:"group","aria-labelledby":a,...r,ref:t})})})).displayName=T4;const N4="SelectLabel";X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=A4(N4,n);return og.jsx(d3.div,{id:a.id,...r,ref:t})})).displayName=N4;const I4="SelectItem",[O4,R4]=t4(I4),P4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=a4(I4,n),l=y4(I4,n),c=s.value===r,[u,d]=X.useState(o??""),[p,f]=X.useState(!1),h=j5(t,(e=>{var t;return null==(t=l.itemRefCallback)?void 0:t.call(l,e,r,a)})),m=VO(),g=X.useRef("touch"),y=()=>{a||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return og.jsx(O4,{scope:n,value:r,disabled:a,textId:m,isSelected:c,onItemTextChange:X.useCallback((e=>{d((t=>t||((null==e?void 0:e.textContent)??"").trim()))}),[]),children:og.jsx(Q3.ItemSlot,{scope:n,value:r,disabled:a,textValue:u,children:og.jsx(d3.div,{role:"option","aria-labelledby":m,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...i,ref:h,onFocus:P5(i.onFocus,(()=>f(!0))),onBlur:P5(i.onBlur,(()=>f(!1))),onClick:P5(i.onClick,(()=>{"mouse"!==g.current&&y()})),onPointerUp:P5(i.onPointerUp,(()=>{"mouse"===g.current&&y()})),onPointerDown:P5(i.onPointerDown,(e=>{g.current=e.pointerType})),onPointerMove:P5(i.onPointerMove,(e=>{var t;g.current=e.pointerType,a?null==(t=l.onItemLeave)||t.call(l):"mouse"===g.current&&e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:P5(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null==(t=l.onItemLeave)||t.call(l))})),onKeyDown:P5(i.onKeyDown,(e=>{var t;""!==(null==(t=l.searchRef)?void 0:t.current)&&" "===e.key||(K3.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))})})})}));P4.displayName=I4;const L4="SelectItemText",D4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=a4(L4,n),s=y4(L4,n),l=R4(L4,n),c=i4(L4,n),[u,d]=X.useState(null),p=j5(t,(e=>d(e)),l.onItemTextChange,(e=>{var t;return null==(t=s.itemTextRefCallback)?void 0:t.call(s,e,l.value,l.disabled)})),f=null==u?void 0:u.textContent,h=X.useMemo((()=>og.jsx("option",{value:l.value,disabled:l.disabled,children:f},l.value)),[l.disabled,l.value,f]),{onNativeOptionAdd:m,onNativeOptionRemove:g}=c;return HO((()=>(m(h),()=>g(h))),[m,g,h]),og.jsxs(og.Fragment,{children:[og.jsx(d3.span,{id:l.textId,...o,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ue.createPortal(o.children,i.valueNode):null]})}));D4.displayName=L4;const M4="SelectItemIndicator",F4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return R4(M4,n).isSelected?og.jsx(d3.span,{"aria-hidden":!0,...r,ref:t}):null}));F4.displayName=M4;const j4="SelectScrollUpButton";X.forwardRef(((e,t)=>{const n=y4(j4,e.__scopeSelect),r=E4(j4,e.__scopeSelect),[a,o]=X.useState(!1),i=j5(t,r.onScrollButtonChange);return HO((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;o(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?og.jsx(B4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null})).displayName=j4;const z4="SelectScrollDownButton";X.forwardRef(((e,t)=>{const n=y4(z4,e.__scopeSelect),r=E4(z4,e.__scopeSelect),[a,o]=X.useState(!1),i=j5(t,r.onScrollButtonChange);return HO((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;o(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?og.jsx(B4,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null})).displayName=z4;const B4=X.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=y4("SelectScrollButton",n),i=X.useRef(null),s=J3(n),l=X.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return X.useEffect((()=>()=>l()),[l]),HO((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==(e=null==t?void 0:t.ref.current)||e.scrollIntoView({block:"nearest"})}),[s]),og.jsx(d3.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:P5(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:P5(a.onPointerMove,(()=>{var e;null==(e=o.onItemLeave)||e.call(o),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:P5(a.onPointerLeave,(()=>{l()}))})}));X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return og.jsx(d3.div,{"aria-hidden":!0,...r,ref:t})})).displayName="SelectSeparator";const H4="SelectArrow";function U4(e){return""===e||void 0===e}function $4(e){const t=J5(e),n=X.useRef(""),r=X.useRef(0),a=X.useCallback((e=>{const a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(a)}),[t]),o=X.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return X.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,a,o]}function V4(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,a=n?e.indexOf(n):-1;let o=(i=e,s=Math.max(a,0),i.map(((e,t)=>i[(s+t)%i.length])));var i,s;1===r.length&&(o=o.filter((e=>e!==n)));const l=o.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return l!==n?l:void 0}X.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=n4(n),o=a4(H4,n),i=y4(H4,n);return o.open&&"popper"===i.position?og.jsx(W3,{...a,...r,ref:t}):null})).displayName=H4;const G4=s4,q4=c4,W4=d4,Y4=p4,Z4=h4,K4=S4,X4=P4,Q4=D4,J4=F4;var e6=(e,t=[])=>({parts:(...n)=>{if(n6(t))return e6(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>e6(e,[...t,...n]),omit:(...n)=>e6(e,t.filter((e=>!n.includes(e)))),rename:e=>e6(e,t),keys:()=>t,build:()=>[...new Set(t)].reduce(((t,n)=>Object.assign(t,{[n]:{selector:[`&[data-scope="${t6(e)}"][data-part="${t6(n)}"]`,`& [data-scope="${t6(e)}"][data-part="${t6(n)}"]`].join(", "),attrs:{"data-scope":t6(e),"data-part":t6(n)}}})),{})}),t6=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),n6=e=>0===e.length,r6=e6("combobox").parts("root","clearTrigger","content","control","input","item","itemGroup","itemGroupLabel","itemIndicator","itemText","label","list","positioner","trigger").build(),a6=Object.defineProperty,o6=(e,t,n)=>((e,t,n)=>t in e?a6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),i6={itemToValue:e=>"string"==typeof e?e:Aq(e)&&Iq(e,"value")?e.value:"",itemToString:e=>"string"==typeof e?e:Aq(e)&&Iq(e,"label")?e.label:i6.itemToValue(e),isItemDisabled:e=>!(!Aq(e)||!Iq(e,"disabled"))&&!!e.disabled},s6=class e{constructor(t){this.options=t,o6(this,"items"),o6(this,"indexMap",null),o6(this,"copy",(t=>new e({...this.options,items:t??[...this.items]}))),o6(this,"isEqual",(e=>Tq(this.items,e.items))),o6(this,"setItems",(e=>this.copy(e))),o6(this,"getValues",((e=this.items)=>{const t=[];for(const n of e){const e=this.getItemValue(n);null!=e&&t.push(e)}return t})),o6(this,"find",(e=>{if(null==e)return null;const t=this.indexOf(e);return-1!==t?this.at(t):null})),o6(this,"findMany",(e=>{const t=[];for(const n of e){const e=this.find(n);null!=e&&t.push(e)}return t})),o6(this,"at",(e=>{if(!this.options.groupBy&&!this.options.groupSort)return this.items[e]??null;let t=0;const n=this.group();for(const[,r]of n)for(const n of r){if(t===e)return n;t++}return null})),o6(this,"sortFn",((e,t)=>(this.indexOf(e)??0)-(this.indexOf(t)??0))),o6(this,"sort",(e=>[...e].sort(this.sortFn.bind(this)))),o6(this,"getItemValue",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToValue)?void 0:n.call(t,e))??i6.itemToValue(e)})),o6(this,"getItemDisabled",(e=>{var t,n;return null!=e&&((null==(n=(t=this.options).isItemDisabled)?void 0:n.call(t,e))??i6.isItemDisabled(e))})),o6(this,"stringifyItem",(e=>{var t,n;return null==e?null:(null==(n=(t=this.options).itemToString)?void 0:n.call(t,e))??i6.itemToString(e)})),o6(this,"stringify",(e=>null==e?null:this.stringifyItem(this.find(e)))),o6(this,"stringifyItems",((e,t=", ")=>{const n=[];for(const r of e){const e=this.stringifyItem(r);null!=e&&n.push(e)}return n.join(t)})),o6(this,"stringifyMany",((e,t)=>this.stringifyItems(this.findMany(e),t))),o6(this,"has",(e=>-1!==this.indexOf(e))),o6(this,"hasItem",(e=>null!=e&&this.has(this.getItemValue(e)))),o6(this,"group",(()=>{const{groupBy:e,groupSort:t}=this.options;if(!e)return[["",[...this.items]]];const n=new Map;this.items.forEach(((t,r)=>{const a=e(t,r);n.has(a)||n.set(a,[]),n.get(a).push(t)}));let r=Array.from(n.entries());return t&&r.sort((([e],[n])=>{if("function"==typeof t)return t(e,n);if(Array.isArray(t)){const r=t.indexOf(e),a=t.indexOf(n);return-1===r?1:-1===a?-1:r-a}return"asc"===t?e.localeCompare(n):"desc"===t?n.localeCompare(e):0})),r})),o6(this,"getNextValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.min(r+t,this.size-1):r+t;r<=this.size&&this.getItemDisabled(this.at(r));)r++;return this.getItemValue(this.at(r))})),o6(this,"getPreviousValue",((e,t=1,n=!1)=>{let r=this.indexOf(e);if(-1===r)return null;for(r=n?Math.max(r-t,0):r-t;r>=0&&this.getItemDisabled(this.at(r));)r--;return this.getItemValue(this.at(r))})),o6(this,"indexOf",(e=>{if(null==e)return-1;if(!this.options.groupBy&&!this.options.groupSort)return this.items.findIndex((t=>this.getItemValue(t)===e));if(!this.indexMap){this.indexMap=new Map;let e=0;const t=this.group();for(const[,n]of t)for(const t of n){const n=this.getItemValue(t);null!=n&&this.indexMap.set(n,e),e++}}return this.indexMap.get(e)??-1})),o6(this,"getByText",((e,t)=>{const n=null!=t?this.indexOf(t):-1,r=1===e.length;for(let a=0;a<this.items.length;a++){const o=this.items[(n+a+1)%this.items.length];if((!r||this.getItemValue(o)!==t)&&(!this.getItemDisabled(o)&&l6(this.stringifyItem(o),e)))return o}})),o6(this,"search",((e,t)=>{const{state:n,currentValue:r,timeout:a=350}=t,o=n.keysSoFar+e,i=o.length>1&&Array.from(o).every((e=>e===o[0]))?o[0]:o,s=this.getByText(i,r),l=this.getItemValue(s);function c(){clearTimeout(n.timer),n.timer=-1}return function e(t){n.keysSoFar=t,c(),""!==t&&(n.timer=+setTimeout((()=>{e(""),c()}),a))}(o),l})),o6(this,"update",((e,t)=>{let n=this.indexOf(e);return-1===n?this:this.copy([...this.items.slice(0,n),t,...this.items.slice(n+1)])})),o6(this,"upsert",((e,t,n="append")=>{let r=this.indexOf(e);if(-1===r){return("append"===n?this.append:this.prepend)(t)}return this.copy([...this.items.slice(0,r),t,...this.items.slice(r+1)])})),o6(this,"insert",((e,...t)=>this.copy(c6(this.items,e,...t)))),o6(this,"insertBefore",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(c6(this.items,n,...t))})),o6(this,"insertAfter",((e,...t)=>{let n=this.indexOf(e);if(-1===n){if(0!==this.items.length)return this;n=0}return this.copy(c6(this.items,n+1,...t))})),o6(this,"prepend",((...e)=>this.copy(c6(this.items,0,...e)))),o6(this,"append",((...e)=>this.copy(c6(this.items,this.items.length,...e)))),o6(this,"filter",(e=>{const t=this.items.filter(((t,n)=>e(this.stringifyItem(t),n,t)));return this.copy(t)})),o6(this,"remove",((...e)=>{const t=e.map((e=>"string"==typeof e?e:this.getItemValue(e)));return this.copy(this.items.filter((e=>{const n=this.getItemValue(e);return null!=n&&!t.includes(n)})))})),o6(this,"move",((e,t)=>{const n=this.indexOf(e);return-1===n?this:this.copy(u6(this.items,[n],t))})),o6(this,"moveBefore",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(u6(this.items,r,n))})),o6(this,"moveAfter",((e,...t)=>{let n=this.items.findIndex((t=>this.getItemValue(t)===e));if(-1===n)return this;let r=t.map((e=>this.items.findIndex((t=>this.getItemValue(t)===e)))).sort(((e,t)=>e-t));return this.copy(u6(this.items,r,n+1))})),o6(this,"reorder",((e,t)=>this.copy(u6(this.items,[e],t)))),o6(this,"compareValue",((e,t)=>{const n=this.indexOf(e),r=this.indexOf(t);return n<r?-1:n>r?1:0})),o6(this,"range",((e,t)=>{let n=[],r=e;for(;null!=r;){if(this.find(r)&&n.push(r),r===t)return n;r=this.getNextValue(r)}return[]})),o6(this,"getValueRange",((e,t)=>e&&t?this.compareValue(e,t)<=0?this.range(e,t):this.range(t,e):[])),o6(this,"toString",(()=>{let e="";for(const t of this.items){e+=[this.getItemValue(t),this.stringifyItem(t),this.getItemDisabled(t)].filter(Boolean).join(":")+","}return e})),o6(this,"toJSON",(()=>({size:this.size,first:this.firstValue,last:this.lastValue}))),this.items=[...t.items]}get size(){return this.items.length}get firstValue(){let e=0;for(;this.getItemDisabled(this.at(e));)e++;return this.getItemValue(this.at(e))}get lastValue(){let e=this.size-1;for(;this.getItemDisabled(this.at(e));)e--;return this.getItemValue(this.at(e))}*[Symbol.iterator](){yield*this.items}},l6=(e,t)=>!!(null==e?void 0:e.toLowerCase().startsWith(t.toLowerCase()));function c6(e,t,...n){return[...e.slice(0,t),...n,...e.slice(t)]}function u6(e,t,n){const r=(t=[...t].sort(((e,t)=>e-t))).map((t=>e[t]));for(let a=t.length-1;a>=0;a--)e=[...e.slice(0,t[a]),...e.slice(t[a]+1)];return n=Math.max(0,n-t.filter((e=>e<n)).length),[...e.slice(0,n),...r,...e.slice(n)]}function d6({values:e,collection:t,selectedItemMap:n}){const r=[];for(const a of e){const e=t.find(a)??n.get(a);null!=e&&r.push(e)}return r}function p6({selectedItemMap:e,values:t,selectedItems:n,collection:r}){const a=new Map(e);for(const i of n){const e=r.getItemValue(i);null!=e&&a.set(e,i)}const o=new Set(t);for(const i of a.keys())o.has(i)||a.delete(i);return a}function f6({values:e,collection:t,selectedItemMap:n}){const r=d6({values:e,collection:t,selectedItemMap:n});return{selectedItems:r,nextSelectedItemMap:p6({selectedItemMap:n,values:e,selectedItems:r,collection:t})}}function h6({selectedItems:e,collection:t}){return p6({selectedItemMap:new Map,values:e.map((e=>t.getItemValue(e))).filter(Boolean),selectedItems:e,collection:t})}var m6=e=>new s6(e);function g6(e=0,t=0,n=0,r=0){if("function"==typeof DOMRect)return new DOMRect(e,t,n,r);const a={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return{...a,toJSON:()=>a}}function y6(e,t){return{contextElement:dW(e)?e:null==e?void 0:e.contextElement,getBoundingClientRect:()=>{const n=e,r=null==t?void 0:t(n);return r||!n?function(e){if(!e)return g6();const{x:t,y:n,width:r,height:a}=e;return g6(t,n,r,a)}(r):n.getBoundingClientRect()}}}m6.empty=()=>new s6({items:[]});var b6=e=>({variable:e,reference:`var(${e})`}),v6={arrowSize:b6("--arrow-size"),arrowSizeHalf:b6("--arrow-size-half"),arrowBg:b6("--arrow-background"),transformOrigin:b6("--transform-origin"),arrowOffset:b6("--arrow-offset")};function k6(e,t){return{name:"transformOrigin",fn(n){var r,a,o,i;const{elements:s,middlewareData:l,placement:c,rects:u,y:d}=n,p=c.split("-")[0],f=(e=>"top"===e||"bottom"===e?"y":"x")(p),h=(null==(r=l.arrow)?void 0:r.x)||0,m=(null==(a=l.arrow)?void 0:a.y)||0,g=(null==t?void 0:t.clientWidth)||0,y=(null==t?void 0:t.clientHeight)||0,b=h+g/2,v=m+y/2,k=Math.abs((null==(o=l.shift)?void 0:o.y)||0),x=u.reference.height/2,w=y/2,E=(null==(i=e.offset)?void 0:i.mainAxis)??e.gutter,_="number"==typeof E?E+w:E??w,S=k>_,T={top:`${b}px calc(100% + ${_}px)`,bottom:`${b}px ${-_}px`,left:`calc(100% + ${_}px) ${v}px`,right:`${-_}px ${v}px`}[p],C=`${b}px ${u.reference.y+x-d}px`,A=Boolean(e.overlap)&&"y"===f&&S;return s.floating.style.setProperty(v6.transformOrigin.variable,A?C:T),{data:{transformOrigin:A?C:T}}}}}var x6={name:"rects",fn:({rects:e})=>({data:e})},w6=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:a}=n.arrow,o=t.split("-")[0];return Object.assign(e.style,{left:null!=r?`${r}px`:"",top:null!=a?`${a}px`:"",[o]:`calc(100% + ${v6.arrowOffset.reference})`}),{}}}};var E6={strategy:"absolute",placement:"bottom",listeners:!0,restoreStyles:!1,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function _6(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function S6(e,t){return null!=e&&Math.abs(e-t)<.5}function T6(e){return"function"==typeof e?e():"clipping-ancestors"===e?"clippingAncestors":e}function C6(e,t,n){const r=e||t.createElement("div");return eQ({element:r,padding:n.arrowPadding})}function A6(e,t){if(null!=(t.offset??t.gutter))return ZX((({placement:n})=>{var r,a;const o=((null==e?void 0:e.clientHeight)||0)/2,i=(null==(r=t.offset)?void 0:r.mainAxis)??t.gutter,s="number"==typeof i?i+o:i??o,{hasAlign:l}=function(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:null!=n}}(n),c=l?void 0:t.shift;return zq({crossAxis:(null==(a=t.offset)?void 0:a.crossAxis)??c,mainAxis:s,alignmentAxis:t.shift})}))}function N6(e){if(!e.flip)return;const t=T6(e.boundary);return XX({...t?{boundary:t}:void 0,padding:e.overflowPadding,fallbackPlacements:!0===e.flip?void 0:e.flip})}function I6(e){if(!e.slide&&!e.overlap)return;const t=T6(e.boundary);return KX({...t?{boundary:t}:void 0,mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:tQ()})}function O6(e){if(!1===e.sizeMiddleware&&!e.sameWidth&&!e.fitViewport)return;let t,n,r,a;return QX({padding:e.overflowPadding,apply({elements:e,rects:o,availableHeight:i,availableWidth:s}){const l=e.floating,c=Math.round(o.reference.width),u=Math.round(o.reference.height);s=Math.floor(s),i=Math.floor(i),S6(t,c)||(l.style.setProperty("--reference-width",`${c}px`),t=c),S6(n,u)||(l.style.setProperty("--reference-height",`${u}px`),n=u),S6(r,s)||(l.style.setProperty("--available-width",`${s}px`),r=s),S6(a,i)||(l.style.setProperty("--available-height",`${i}px`),a=i)}})}function R6(e){if(e.hideWhenDetached)return JX({strategy:"referenceHidden",boundary:T6(e.boundary)??"clippingAncestors"})}var P6=["transform","visibility","pointer-events","--x","--y","--z-index","--reference-width","--reference-height","--available-width","--available-height","--transform-origin"],L6=["top","right","bottom","left"];function D6(e,t){if(!e)return Mq;const n=new Map(t.map((t=>[t,e.style.getPropertyValue(t)])));return()=>{n.forEach(((t,n)=>{t?e.style.setProperty(n,t):e.style.removeProperty(n)})),0===e.style.length&&e.removeAttribute("style")}}function M6(e,t,n={}){const{defer:r,...a}=n,o=r?sY:e=>e(),i=[];return i.push(o((()=>{const n="function"==typeof e?e():e,r="function"==typeof t?t():t;i.push(function(e,t,n={}){var r;const a=y6((null==(r=n.getAnchorElement)?void 0:r.call(n))??e,n.getAnchorRect);if(!t||!a)return;const o=Object.assign({},E6,n),i=t.querySelector("[data-part=arrow]"),s=o.restoreStyles?D6(t,P6):void 0,l=o.restoreStyles?D6(i,L6):void 0,c=[A6(i,o),N6(o),I6(o),C6(i,t.ownerDocument,o),w6(i),k6({gutter:o.gutter,offset:o.offset,overlap:o.overlap},i),O6(o),R6(o),x6],{placement:u,strategy:d,onComplete:p,onPositioned:f}=o;let h,m,g=!1;const y=async()=>{var e;if(!a||!t)return;const n=await nQ(a,t,{placement:u,middleware:c,strategy:d});null==p||p(n);const r=xW(t),i=_6(r,n.x),s=_6(r,n.y);if(t.style.transform=`translate3d(${i}px, ${s}px, 0)`,S6(h,i)||(t.style.setProperty("--x",`${i}px`),h=i),S6(m,s)||(t.style.setProperty("--y",`${s}px`),m=s),o.hideWhenDetached&&((null==(e=n.middlewareData.hide)?void 0:e.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events"))),!g){const e=t.firstElementChild;e&&(t.style.setProperty("--z-index",TW(e).zIndex),g=!0)}},b=async()=>{n.updatePosition?(await n.updatePosition({updatePosition:y,floatingElement:t}),null==f||f({placed:!0})):await y()},v=function(e){return e?!0===e?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}(o.listeners),k=o.listeners?YX(a,t,b,v):Mq;return b(),()=>{null==k||k(),null==l||l(),null==s||s(),null==f||f({placed:!1})}}(n,r,a))}))),()=>{i.forEach((e=>null==e?void 0:e()))}}var F6={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};var j6=e=>{var t;return(null==(t=e.ids)?void 0:t.label)??`combobox:${e.id}:label`},z6=e=>{var t;return(null==(t=e.ids)?void 0:t.control)??`combobox:${e.id}:control`},B6=e=>{var t;return(null==(t=e.ids)?void 0:t.input)??`combobox:${e.id}:input`},H6=e=>{var t;return(null==(t=e.ids)?void 0:t.content)??`combobox:${e.id}:content`},U6=e=>{var t;return(null==(t=e.ids)?void 0:t.positioner)??`combobox:${e.id}:popper`},$6=e=>{var t;return(null==(t=e.ids)?void 0:t.trigger)??`combobox:${e.id}:toggle-btn`},V6=e=>{var t;return(null==(t=e.ids)?void 0:t.clearTrigger)??`combobox:${e.id}:clear-btn`},G6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroup)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup:${t}`},q6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.itemGroupLabel)?void 0:r.call(n,t))??`combobox:${e.id}:optgroup-label:${t}`},W6=(e,t)=>{var n,r;return(null==(r=null==(n=e.ids)?void 0:n.item)?void 0:r.call(n,t))??`combobox:${e.id}:option:${t}`},Y6=e=>e.getById(H6(e)),Z6=e=>e.getById(B6(e)),K6=e=>e.getById(U6(e)),X6=e=>e.getById(z6(e)),Q6=e=>e.getById($6(e)),J6=(e,t)=>{if(null==t)return null;const n=`[role=option][data-value="${CSS.escape(t)}"]`;return function(e,t){return(null==e?void 0:e.querySelector(t))??null}(Y6(e),n)},e8=e=>{const t=Z6(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0}),iW(t)};function t8(e,t){const{context:n,prop:r,state:a,send:o,scope:i,computed:s,event:l}=e,c=r("translations"),u=r("collection"),d=!!r("disabled"),p=s("isInteractive"),f=!!r("invalid"),h=!!r("required"),m=!!r("readOnly"),g=a.hasTag("open"),y=a.hasTag("focused"),b=r("composite"),v=n.get("highlightedValue"),k=function(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:a="absolute"}=e;return{arrow:{position:"absolute",width:v6.arrowSize.reference,height:v6.arrowSize.reference,[v6.arrowSizeHalf.variable]:`calc(${v6.arrowSize.reference} / 2)`,[v6.arrowOffset.variable]:`calc(${v6.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?F6[t.split("-")[0]]:void 0,background:v6.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:a,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)"}}}({...r("positioning"),placement:n.get("currentPlacement")});function x(e){const t=u.getItemDisabled(e.item),r=u.getItemValue(e.item);return Uq(r,(()=>`[zag-js] No value found for item ${JSON.stringify(e.item)}`)),{value:r,disabled:Boolean(d||t),highlighted:v===r,selected:n.get("value").includes(r)}}return{focused:y,open:g,inputValue:n.get("inputValue"),highlightedValue:v,highlightedItem:n.get("highlightedItem"),value:n.get("value"),valueAsString:s("valueAsString"),hasSelectedItems:s("hasSelectedItems"),selectedItems:s("selectedItems"),collection:r("collection"),multiple:!!r("multiple"),disabled:!!d,syncSelectedItems(){o({type:"SELECTED_ITEMS.SYNC"})},reposition(e={}){o({type:"POSITIONING.SET",options:e})},setHighlightValue(e){o({type:"HIGHLIGHTED_VALUE.SET",value:e})},clearHighlightValue(){o({type:"HIGHLIGHTED_VALUE.CLEAR"})},selectValue(e){o({type:"ITEM.SELECT",value:e})},setValue(e){o({type:"VALUE.SET",value:e})},setInputValue(e,t="script"){o({type:"INPUT_VALUE.SET",value:e,src:t})},clearValue(e){o(null!=e?{type:"ITEM.CLEAR",value:e}:{type:"VALUE.CLEAR"})},focus(){var e;null==(e=Z6(i))||e.focus()},setOpen(e,t="script"){a.hasTag("open")!==e&&o({type:e?"OPEN":"CLOSE",src:t})},getRootProps(){return t.element({...r6.root.attrs,dir:r("dir"),id:(e=i,(null==(n=e.ids)?void 0:n.root)??`combobox:${e.id}`),"data-invalid":cW(f),"data-readonly":cW(m)});var e,n},getLabelProps:()=>t.label({...r6.label.attrs,dir:r("dir"),htmlFor:B6(i),id:j6(i),"data-readonly":cW(m),"data-disabled":cW(d),"data-invalid":cW(f),"data-required":cW(h),"data-focus":cW(y),onClick(e){var t;b||(e.preventDefault(),null==(t=Q6(i))||t.focus({preventScroll:!0}))}}),getControlProps:()=>t.element({...r6.control.attrs,dir:r("dir"),id:z6(i),"data-state":g?"open":"closed","data-focus":cW(y),"data-disabled":cW(d),"data-invalid":cW(f)}),getPositionerProps:()=>t.element({...r6.positioner.attrs,dir:r("dir"),id:U6(i),style:k.floating}),getInputProps:()=>t.input({...r6.input.attrs,dir:r("dir"),"aria-invalid":uW(f),"data-invalid":cW(f),"data-autofocus":cW(r("autoFocus")),name:r("name"),form:r("form"),disabled:d,required:r("required"),autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:"false",readOnly:m,placeholder:r("placeholder"),id:B6(i),type:"text",role:"combobox",defaultValue:n.get("inputValue"),"aria-autocomplete":s("autoComplete")?"both":"list","aria-controls":H6(i),"aria-expanded":g,"data-state":g?"open":"closed","aria-activedescendant":v?W6(i,v):void 0,onClick(e){e.defaultPrevented||r("openOnClick")&&p&&o({type:"INPUT.CLICK",src:"input-click"})},onFocus(){d||o({type:"INPUT.FOCUS"})},onBlur(){d||o({type:"INPUT.BLUR"})},onChange(e){o({type:"INPUT.CHANGE",value:e.currentTarget.value,src:"input-change"})},onKeyDown(e){if(e.defaultPrevented)return;if(!p)return;if(e.ctrlKey||e.shiftKey||function(e){return function(e){return e.nativeEvent??e}(e).isComposing||229===e.keyCode}(e))return;const t=r("openOnKeyPress"),n=e.ctrlKey||e.metaKey||e.shiftKey,a=!0,l={ArrowDown(e){(t||g)&&(o({type:e.altKey?"OPEN":"INPUT.ARROW_DOWN",keypress:a,src:"arrow-key"}),e.preventDefault())},ArrowUp(){(t||g)&&(o({type:e.altKey?"CLOSE":"INPUT.ARROW_UP",keypress:a,src:"arrow-key"}),e.preventDefault())},Home(e){n||(o({type:"INPUT.HOME",keypress:a}),g&&e.preventDefault())},End(e){n||(o({type:"INPUT.END",keypress:a}),g&&e.preventDefault())},Enter(e){var t;o({type:"INPUT.ENTER",keypress:a,src:"item-select"});const n=s("isCustomValue")&&r("allowCustomValue"),l=null!=v,c=r("alwaysSubmitOnEnter");if(g&&!n&&!c&&l&&e.preventDefault(),null==v)return;const u=J6(i,v);var d;(null==(d=u)?void 0:d.matches("a[href]"))&&(null==(t=r("navigate"))||t({value:v,node:u,href:u.href}))},Escape(){o({type:"INPUT.ESCAPE",keypress:a,src:"escape-key"}),e.preventDefault()}}[qW(e,{dir:r("dir")})];null==l||l(e)}}),getTriggerProps:(e={})=>t.button({...r6.trigger.attrs,dir:r("dir"),id:$6(i),"aria-haspopup":b?"listbox":"dialog",type:"button",tabIndex:e.focusable?void 0:-1,"aria-label":c.triggerLabel,"aria-expanded":g,"data-state":g?"open":"closed","aria-controls":g?H6(i):void 0,disabled:d,"data-invalid":cW(f),"data-focusable":cW(e.focusable),"data-readonly":cW(m),"data-disabled":cW(d),onFocus(){e.focusable&&o({type:"INPUT.FOCUS",src:"trigger"})},onClick(e){e.defaultPrevented||p&&UW(e)&&o({type:"TRIGGER.CLICK",src:"trigger-click"})},onPointerDown(e){p&&"touch"!==e.pointerType&&UW(e)&&(e.preventDefault(),queueMicrotask((()=>{e8(i)})))},onKeyDown(e){if(e.defaultPrevented)return;if(b)return;const t={ArrowDown(){o({type:"INPUT.ARROW_DOWN",src:"arrow-key"})},ArrowUp(){o({type:"INPUT.ARROW_UP",src:"arrow-key"})}}[qW(e,{dir:r("dir")})];t&&(t(e),e.preventDefault())}}),getContentProps:()=>t.element({...r6.content.attrs,dir:r("dir"),id:H6(i),role:b?"listbox":"dialog",tabIndex:-1,hidden:!g,"data-state":g?"open":"closed","data-placement":n.get("currentPlacement"),"aria-labelledby":j6(i),"aria-multiselectable":!(!r("multiple")||!b)||void 0,"data-empty":cW(0===u.size),onPointerDown(e){UW(e)&&e.preventDefault()}}),getListProps:()=>t.element({...r6.list.attrs,role:b?void 0:"listbox","data-empty":cW(0===u.size),"aria-labelledby":j6(i),"aria-multiselectable":!(!r("multiple")||b)||void 0}),getClearTriggerProps:()=>t.button({...r6.clearTrigger.attrs,dir:r("dir"),id:V6(i),type:"button",tabIndex:-1,disabled:d,"data-invalid":cW(f),"aria-label":c.clearTriggerLabel,"aria-controls":B6(i),hidden:!n.get("value").length,onPointerDown(e){UW(e)&&e.preventDefault()},onClick(e){e.defaultPrevented||p&&o({type:"VALUE.CLEAR",src:"clear-trigger"})}}),getItemState:x,getItemProps(e){const n=x(e),a=n.value;return t.element({...r6.item.attrs,dir:r("dir"),id:W6(i,a),role:"option",tabIndex:-1,"data-highlighted":cW(n.highlighted),"data-state":n.selected?"checked":"unchecked","aria-selected":uW(n.selected),"aria-disabled":uW(n.disabled),"data-disabled":cW(n.disabled),"data-value":n.value,onPointerMove(){n.disabled||n.highlighted||o({type:"ITEM.POINTER_MOVE",value:a})},onPointerLeave(){if(e.persistFocus)return;if(n.disabled)return;const t=l.previous();(null==t?void 0:t.type.includes("POINTER"))&&o({type:"ITEM.POINTER_LEAVE",value:a})},onClick(e){(function(e){const t=e.currentTarget;if(!t)return!1;const n=t.localName;return!!e.altKey&&("a"===n||"button"===n&&"submit"===t.type||"input"===n&&"submit"===t.type)})(e)||BW(e)||$W(e)||n.disabled||o({type:"ITEM.CLICK",src:"item-select",value:a})}})},getItemTextProps(e){const n=x(e);return t.element({...r6.itemText.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked","data-disabled":cW(n.disabled),"data-highlighted":cW(n.highlighted)})},getItemIndicatorProps(e){const n=x(e);return t.element({"aria-hidden":!0,...r6.itemIndicator.attrs,dir:r("dir"),"data-state":n.selected?"checked":"unchecked",hidden:!n.selected})},getItemGroupProps(e){const{id:n}=e;return t.element({...r6.itemGroup.attrs,dir:r("dir"),id:G6(i,n),"aria-labelledby":q6(i,n),"data-empty":cW(0===u.size),role:"group"})},getItemGroupLabelProps(e){const{htmlFor:n}=e;return t.element({...r6.itemGroupLabel.attrs,dir:r("dir"),id:q6(i,n),role:"presentation"})}}}var n8="pointerdown.outside",r8="focus.outside";function a8(e){for(const t of e)if(dW(t)&&nY(t))return!0;return!1}var o8=e=>"clientY"in e;function i8(e,t){if(!t||!o8(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,a=t.scrollWidth>t.clientWidth,o=a&&e.clientY>t.offsetTop+t.clientHeight;return!!function(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}({x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(a?16:0)},{x:e.clientX,y:e.clientY})&&(r||o)}function s8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:a,onInteractOutside:o,defer:i,followControlledElements:s=!0}=t;if(!e)return;const l=kW(e),c=xW(e),u=function(e){const t={each(t){var n;for(let r=0;r<(null==(n=e.frames)?void 0:n.length);r+=1){const n=e.frames[r];n&&t(n)}},addEventListener:(e,n,r)=>(t.each((t=>{try{t.document.addEventListener(e,n,r)}catch{}})),()=>{try{t.removeEventListener(e,n,r)}catch{}}),removeEventListener(e,n,r){t.each((t=>{try{t.document.removeEventListener(e,n,r)}catch{}}))}};return t}(c),d=function(e){const t=null!=e.frameElement?e.parent:null;return{addEventListener:(e,n,r)=>{try{null==t||t.addEventListener(e,n,r)}catch{}return()=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}},removeEventListener:(e,n,r)=>{try{null==t||t.removeEventListener(e,n,r)}catch{}}}}(c);function p(t,r){if(!dW(r))return!1;if(!r.isConnected)return!1;if(vW(e,r))return!1;if(function(e,t){if(!o8(t)||!e)return!1;const n=e.getBoundingClientRect();return 0!==n.width&&0!==n.height&&n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}(e,t))return!1;if(s&&IW(e,r))return!1;const a=l.querySelector(`[aria-controls="${e.id}"]`);if(a){if(i8(t,dY(a)))return!1}return!i8(t,dY(e))&&!(null==n?void 0:n(r))}const f=new Set,h=mW(null==e?void 0:e.getRootNode());let m=!1;function g(t){m=!0;const n=()=>{m=!1};function r(n){var r;const s=i&&!MW()?sY:e=>e(),l=n??t,c=(null==(r=null==l?void 0:l.composedPath)?void 0:r.call(l))??[null==l?void 0:l.target];s((()=>{const n=h?c[0]:zW(t);if(e&&p(t,n)){if(a||o){const t=Fq(a,o);e.addEventListener(n8,t,{once:!0})}c8(e,n8,{bubbles:!1,cancelable:!0,detail:{originalEvent:l,contextmenu:$W(l),focusable:a8(c),target:n}})}}))}l.addEventListener("pointerup",n,{once:!0}),c.addEventListener("pointerup",n,{once:!0}),"touch"===t.pointerType?(f.forEach((e=>e())),f.add(WW(l,"click",r,{once:!0})),f.add(d.addEventListener("click",r,{once:!0})),f.add(u.addEventListener("click",r,{once:!0}))):r()}const y=new Set,b=setTimeout((()=>{y.add(WW(l,"pointerdown",g,!0)),y.add(d.addEventListener("pointerdown",g,!0)),y.add(u.addEventListener("pointerdown",g,!0))}),0);function v(t){if(m)return;(i?sY:e=>e())((()=>{var n;const a=(null==(n=null==t?void 0:t.composedPath)?void 0:n.call(t))??[null==t?void 0:t.target],i=h?a[0]:zW(t);if(e&&p(t,i)){if(r||o){const t=Fq(r,o);e.addEventListener(r8,t,{once:!0})}c8(e,r8,{bubbles:!1,cancelable:!0,detail:{originalEvent:t,contextmenu:!1,focusable:nY(i),target:i}})}}))}return MW()||(y.add(WW(l,"focusin",v,!0)),y.add(d.addEventListener("focusin",v,!0)),y.add(u.addEventListener("focusin",v,!0))),()=>{clearTimeout(b),f.forEach((e=>e())),y.forEach((e=>e()))}}function l8(e,t){const{defer:n}=t,r=n?sY:e=>e(),a=[];return a.push(r((()=>{const n="function"==typeof e?e():e;a.push(s8(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}function c8(e,t,n){const r=new(e.ownerDocument.defaultView||window).CustomEvent(t,n);return e.dispatchEvent(r)}function u8(e,t){return WW(kW(e),"keydown",(e=>{"Escape"===e.key&&(e.isComposing||null==t||t(e))}),{capture:!0})}var d8,p8="layer:request-dismiss",f8={layers:[],branches:[],recentlyRemoved:new Set,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 t;return this.indexOf(e)<(this.topMostPointerBlockingLayer()?this.indexOf(null==(t=this.topMostPointerBlockingLayer())?void 0:t.node):-1)},isTopMost(e){const t=this.layers[this.count()-1];return(null==t?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-1===n?[]:this.layers.slice(n+1).filter((e=>e.type===t))},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find((e=>e.type===t))},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return!!this.getNestedLayers(e).some((e=>vW(e.node,t)))||this.recentlyRemoved.size>0},isInBranch(e){return Array.from(this.branches).some((t=>vW(t,e)))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);if(!(t<0)){if(this.recentlyRemoved.add(e),lY((()=>this.recentlyRemoved.delete(e))),t<this.count()-1){this.getNestedLayers(e).forEach((t=>f8.dismiss(t.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 n=this.countNestedLayersOfType(e.node,e.type);n>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${n}`)}))},indexOf(e){return this.layers.findIndex((t=>t.node===e))},dismiss(e,t){const n=this.indexOf(e);if(-1===n)return;const r=this.layers[n];var a,o;a=p8,o=e=>{var t;null==(t=r.requestDismiss)||t.call(r,e),e.defaultPrevented||null==r||r.dismiss()},e.addEventListener(a,o,{once:!0}),function(e,t,n){const r=e.ownerDocument.defaultView||window,a=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});e.dispatchEvent(a)}(e,p8,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function h8(){f8.layers.forEach((({node:e})=>{e.style.pointerEvents=f8.isBelowPointerBlockingLayer(e)?"none":"auto"}))}function m8(e,t){const n=kW(e),r=[];return f8.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(d8=document.body.style.pointerEvents,queueMicrotask((()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")}))),null==t||t.forEach((e=>{const[t,n]=yY((()=>{const t=e();return dW(t)?t:null}),{timeout:1e3});t.then((e=>r.push(gY(e,{pointerEvents:"auto"})))),r.push(n)})),()=>{f8.hasPointerBlockingLayer()||(queueMicrotask((()=>{n.body.style.pointerEvents=d8,n.body.removeAttribute("data-inert"),0===n.body.style.length&&n.body.removeAttribute("style")})),r.forEach((e=>e())))}}function g8(e,t){const{defer:n}=t,r=n?sY:e=>e(),a=[];return a.push(r((()=>{const n=Nq(e)?e():e;a.push(function(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e)return void Bq("[@zag-js/dismissable] node is `null` or `undefined`");if(!e)return;const{onDismiss:r,onRequestDismiss:a,pointerBlocking:o,exclude:i,debug:s,type:l="dialog"}=t,c={dismiss:r,node:e,type:l,pointerBlocking:o,requestDismiss:a};f8.add(c),h8();const u=[o?m8(e,t.persistentElements):void 0,u8(e,(function(n){var a;f8.isTopMost(e)&&(null==(a=t.onEscapeKeyDown)||a.call(t,n),!n.defaultPrevented&&r&&(n.preventDefault(),r()))})),l8(e,{exclude:function(n){var r;if(!e)return!1;const a="function"==typeof i?i():i,o=Array.isArray(a)?a:[a],s=null==(r=t.persistentElements)?void 0:r.map((e=>e())).filter(dW);return s&&o.push(...s),o.some((e=>vW(e,n)))||f8.isInNestedLayer(e,n)},onFocusOutside:function(e){var n,a;const o=zW(e.detail.originalEvent);f8.isInBranch(o)||(null==(n=t.onFocusOutside)||n.call(t,e),null==(a=t.onInteractOutside)||a.call(t,e),e.defaultPrevented||(s&&console.log("onFocusOutside:",e.detail.originalEvent),null==r||r()))},onPointerDownOutside:function(n){var a,o;const i=zW(n.detail.originalEvent);f8.isBelowPointerBlockingLayer(e)||f8.isInBranch(i)||(null==(a=t.onPointerDownOutside)||a.call(t,n),null==(o=t.onInteractOutside)||o.call(t,n),n.defaultPrevented||(s&&console.log("onPointerDownOutside:",n.detail.originalEvent),null==r||r()))},defer:t.defer})];return()=>{f8.remove(e),h8(),function(e){e.style.pointerEvents=""}(e),u.forEach((e=>null==e?void 0:e()))}}(n,t))}))),()=>{a.forEach((e=>null==e?void 0:e()))}}var y8=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);var b8=null,v8=new Set,k8=new Map,x8=!1,w8=!1,E8={Tab:!0,Escape:!0};function _8(e,t){for(let n of v8)n(e,t)}function S8(e){x8=!0,function(e){return!(e.metaKey||!jW()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&(b8="keyboard",_8("keyboard",e))}function T8(e){b8="pointer","mousedown"!==e.type&&"pointerdown"!==e.type||(x8=!0,_8("pointer",e))}function C8(e){HW(e)&&(x8=!0,b8="virtual")}function A8(e){const t=zW(e);t!==xW(t)&&t!==kW(t)&&e.isTrusted&&(x8||w8||(b8="virtual",_8("virtual",e)),x8=!1,w8=!1)}function N8(){x8=!1,w8=!0}var I8=(e,t)=>{const n=xW(e),r=kW(e),a=k8.get(n);if(a){try{Object.defineProperty(n.HTMLElement.prototype,"focus",{configurable:!0,value:a.focus})}catch{}r.removeEventListener("keydown",S8,!0),r.removeEventListener("keyup",S8,!0),r.removeEventListener("click",C8,!0),n.removeEventListener("focus",A8,!0),n.removeEventListener("blur",N8,!1),void 0!==n.PointerEvent?(r.removeEventListener("pointerdown",T8,!0),r.removeEventListener("pointermove",T8,!0),r.removeEventListener("pointerup",T8,!0)):(r.removeEventListener("mousedown",T8,!0),r.removeEventListener("mousemove",T8,!0),r.removeEventListener("mouseup",T8,!0)),k8.delete(n)}};function O8(){return"keyboard"===b8||"virtual"===b8}function R8(e={}){const{isTextInput:t,autoFocus:n,onChange:r,root:a}=e;!function(e){if("undefined"==typeof window||k8.get(xW(e)))return;const t=xW(e),n=kW(e);let r=t.HTMLElement.prototype.focus;try{Object.defineProperty(t.HTMLElement.prototype,"focus",{configurable:!0,value:function(){x8=!0,r.apply(this,arguments)}})}catch{}n.addEventListener("keydown",S8,!0),n.addEventListener("keyup",S8,!0),n.addEventListener("click",C8,!0),t.addEventListener("focus",A8,!0),t.addEventListener("blur",N8,!1),void 0!==t.PointerEvent?(n.addEventListener("pointerdown",T8,!0),n.addEventListener("pointermove",T8,!0),n.addEventListener("pointerup",T8,!0)):(n.addEventListener("mousedown",T8,!0),n.addEventListener("mousemove",T8,!0),n.addEventListener("mouseup",T8,!0)),t.addEventListener("beforeunload",(()=>{I8(e)}),{once:!0}),k8.set(t,{focus:r})}(a),null==r||r({isFocusVisible:n||O8(),modality:b8});const o=(e,n)=>{(function(e,t,n){const r=n?zW(n):null,a=kW(r),o=xW(r),i=wW(a);return!((e=e||i instanceof o.HTMLInputElement&&!y8.has(null==i?void 0:i.type)||i instanceof o.HTMLTextAreaElement||i instanceof o.HTMLElement&&i.isContentEditable)&&"keyboard"===t&&n instanceof o.KeyboardEvent&&!Reflect.has(E8,n.key))})(!!t,e,n)&&(null==r||r({isFocusVisible:O8(),modality:e}))};return v8.add(o),()=>{v8.delete(o)}}var{guards:P8,createMachine:L8,choose:D8}={guards:{and:(...e)=>function(t){return e.every((e=>t.guard(e)))},or:(...e)=>function(t){return e.some((e=>t.guard(e)))},not:e=>function(t){return!t.guard(e)}},createMachine:e=>tW(e),choose:e=>function({choose:t}){var n;return null==(n=t(e))?void 0:n.actions}},{and:M8,not:F8}=P8,j8=L8({props:({props:e})=>({loopFocus:!0,openOnClick:!1,defaultValue:[],defaultInputValue:"",closeOnSelect:!e.multiple,allowCustomValue:!1,alwaysSubmitOnEnter:!1,inputBehavior:"none",selectionBehavior:e.multiple?"clear":"replace",openOnKeyPress:!0,openOnChange:!0,composite:!0,navigate({node:e}){uY(e)},collection:m6.empty(),...e,positioning:{placement:"bottom",sameWidth:!0,...e.positioning},translations:{triggerLabel:"Toggle suggestions",clearTriggerLabel:"Clear value",...e.translations}}),initialState:({prop:e})=>e("open")||e("defaultOpen")?"open.suggesting":"closed.idle",context({prop:e,bindable:t,getContext:n,getEvent:r}){const a=e("value")??e("defaultValue")??[],o=e("collection").findMany(a);return{currentPlacement:t((()=>({defaultValue:void 0}))),value:t((()=>({defaultValue:e("defaultValue"),value:e("value"),isEqual:Tq,hash:e=>e.join(","),onChange(t){var r;const a=n(),o=e("collection"),i=f6({values:t,collection:o,selectedItemMap:a.get("selectedItemMap")}),s=e("value")??t,l=s===t?i:f6({values:s,collection:o,selectedItemMap:i.nextSelectedItemMap});a.set("selectedItemMap",l.nextSelectedItemMap),null==(r=e("onValueChange"))||r({value:t,items:i.selectedItems})}}))),highlightedValue:t((()=>({defaultValue:e("defaultHighlightedValue")||null,value:e("highlightedValue"),onChange(t){var n;const r=e("collection").find(t);null==(n=e("onHighlightChange"))||n({highlightedValue:t,highlightedItem:r})}}))),inputValue:t((()=>{let t=e("inputValue")||e("defaultInputValue");const n=e("value")||e("defaultValue");if(!t.trim()&&!e("multiple")){const r=e("collection").stringifyMany(n);t=jq(e("selectionBehavior"),{preserve:t||r,replace:r,clear:""})}return{defaultValue:t,value:e("inputValue"),onChange(t){var n;const a=r(),o=(a.previousEvent||a).src;null==(n=e("onInputValueChange"))||n({inputValue:t,reason:o})}}})),highlightedItem:t((()=>{const t=e("highlightedValue");return{defaultValue:e("collection").find(t)}})),selectedItemMap:t((()=>({defaultValue:h6({selectedItems:o,collection:e("collection")})})))}},computed:{isInputValueEmpty:({context:e})=>0===e.get("inputValue").length,isInteractive:({prop:e})=>!(e("readOnly")||e("disabled")),autoComplete:({prop:e})=>"autocomplete"===e("inputBehavior"),autoHighlight:({prop:e})=>"autohighlight"===e("inputBehavior"),hasSelectedItems:({context:e})=>e.get("value").length>0,selectedItems:({context:e,prop:t})=>d6({values:e.get("value"),collection:t("collection"),selectedItemMap:e.get("selectedItemMap")}),valueAsString:({computed:e,prop:t})=>t("collection").stringifyItems(e("selectedItems")),isCustomValue:({context:e,computed:t})=>e.get("inputValue")!==t("valueAsString")},watch({context:e,prop:t,track:n,action:r,send:a}){n([()=>e.hash("value")],(()=>{r(["syncSelectedItems"])})),n([()=>e.get("inputValue")],(()=>{r(["syncInputValue"])})),n([()=>e.get("highlightedValue")],(()=>{r(["syncHighlightedItem","autofillInputValue"])})),n([()=>t("open")],(()=>{r(["toggleVisibility"])})),n([()=>t("collection").toString()],(()=>{a({type:"CHILDREN_CHANGE"})}))},on:{"SELECTED_ITEMS.SYNC":{actions:["syncSelectedItems"]},"HIGHLIGHTED_VALUE.SET":{actions:["setHighlightedValue"]},"HIGHLIGHTED_VALUE.CLEAR":{actions:["clearHighlightedValue"]},"ITEM.SELECT":{actions:["selectItem"]},"ITEM.CLEAR":{actions:["clearItem"]},"VALUE.SET":{actions:["setValue"]},"INPUT_VALUE.SET":{actions:["setInputValue"]},"POSITIONING.SET":{actions:["reposition"]}},entry:D8([{guard:"autoFocus",actions:["setInitialFocus"]}]),states:{closed:{tags:["closed"],initial:"idle",states:{idle:{tags:["idle"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":{target:"open.interacting"},"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.FOCUS":{target:"focused"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{target:"focused",actions:["clearInputValue","clearSelectedItems","setInitialFocus"]}}},focused:{tags:["focused"],entry:["scrollContentToTop","clearHighlightedValue"],on:{"CONTROLLED.OPEN":[{guard:"isChangeEvent",target:"open.suggesting"},{target:"open.interacting"}],"INPUT.CHANGE":[{guard:M8("isOpenControlled","openOnChange"),actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{guard:"openOnChange",target:"open.suggesting",actions:["setInputValue","invokeOnOpen","highlightFirstItemIfNeeded"]},{actions:["setInputValue"]}],"LAYER.INTERACT_OUTSIDE":{target:"idle"},"INPUT.ESCAPE":{guard:M8("isCustomValue",F8("allowCustomValue")),actions:["revertInputValue"]},"INPUT.BLUR":{target:"idle"},"INPUT.CLICK":[{guard:"isOpenControlled",actions:["highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstSelectedItem","invokeOnOpen"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["setInitialFocus","highlightFirstSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_DOWN":[{guard:M8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightFirstOrSelectedItem","invokeOnOpen"]}],"INPUT.ARROW_UP":[{guard:M8("isOpenControlled","autoComplete"),actions:["invokeOnOpen"]},{guard:"autoComplete",target:"open.interacting",actions:["invokeOnOpen"]},{guard:"isOpenControlled",actions:["highlightLastOrSelectedItem","invokeOnOpen"]},{target:"open.interacting",actions:["highlightLastOrSelectedItem","invokeOnOpen"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open.interacting",actions:["invokeOnOpen"]}],"VALUE.CLEAR":{actions:["clearInputValue","clearSelectedItems"]}}}}},open:{tags:["open","focused"],entry:["setInitialFocus"],effects:["trackFocusVisible","scrollToHighlightedItem","trackDismissableLayer","trackPlacement"],on:{"CONTROLLED.CLOSE":[{guard:"restoreFocus",target:"closed.focused",actions:["setFinalFocus"]},{target:"closed.idle"}],"INPUT.ENTER":[{guard:M8("isOpenControlled","isCustomValue",F8("hasHighlightedItem"),F8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:M8("isCustomValue",F8("hasHighlightedItem"),F8("allowCustomValue")),target:"closed.focused",actions:["revertInputValue","invokeOnClose"]},{guard:M8("isOpenControlled","closeOnSelect"),actions:["selectHighlightedItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectHighlightedItem","invokeOnClose","setFinalFocus"]},{actions:["selectHighlightedItem"]}],"ITEM.CLICK":[{guard:M8("isOpenControlled","closeOnSelect"),actions:["selectItem","invokeOnClose"]},{guard:"closeOnSelect",target:"closed.focused",actions:["selectItem","invokeOnClose","setFinalFocus"]},{actions:["selectItem"]}],"TRIGGER.CLICK":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"LAYER.INTERACT_OUTSIDE":[{guard:M8("isOpenControlled","isCustomValue",F8("allowCustomValue")),actions:["revertInputValue","invokeOnClose"]},{guard:M8("isCustomValue",F8("allowCustomValue")),target:"closed.idle",actions:["revertInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.idle",actions:["invokeOnClose"]}],CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}],"VALUE.CLEAR":[{guard:"isOpenControlled",actions:["clearInputValue","clearSelectedItems","invokeOnClose"]},{target:"closed.focused",actions:["clearInputValue","clearSelectedItems","invokeOnClose","setFinalFocus"]}]},initial:"interacting",states:{interacting:{on:{CHILDREN_CHANGE:[{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{actions:["scrollToHighlightedItem"]}],"INPUT.HOME":{actions:["highlightFirstItem"]},"INPUT.END":{actions:["highlightLastItem"]},"INPUT.ARROW_DOWN":[{guard:M8("autoComplete","isLastItemHighlighted"),actions:["clearHighlightedValue","scrollContentToTop"]},{actions:["highlightNextItem"]}],"INPUT.ARROW_UP":[{guard:M8("autoComplete","isFirstItemHighlighted"),actions:["clearHighlightedValue"]},{actions:["highlightPrevItem"]}],"INPUT.CHANGE":[{guard:"autoComplete",target:"suggesting",actions:["setInputValue"]},{target:"suggesting",actions:["clearHighlightedValue","setInputValue"]}],"ITEM.POINTER_MOVE":{actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]},"LAYER.ESCAPE":[{guard:M8("isOpenControlled","autoComplete"),actions:["syncInputValue","invokeOnClose"]},{guard:"autoComplete",target:"closed.focused",actions:["syncInputValue","invokeOnClose"]},{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose","setFinalFocus"]}]}},suggesting:{on:{CHILDREN_CHANGE:[{guard:M8("isHighlightedItemRemoved","hasCollectionItems","autoHighlight"),actions:["clearHighlightedValue","highlightFirstItem"]},{guard:"isHighlightedItemRemoved",actions:["clearHighlightedValue"]},{guard:"autoHighlight",actions:["highlightFirstItem"]}],"INPUT.ARROW_DOWN":{target:"interacting",actions:["highlightNextItem"]},"INPUT.ARROW_UP":{target:"interacting",actions:["highlightPrevItem"]},"INPUT.HOME":{target:"interacting",actions:["highlightFirstItem"]},"INPUT.END":{target:"interacting",actions:["highlightLastItem"]},"INPUT.CHANGE":{actions:["setInputValue"]},"LAYER.ESCAPE":[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed.focused",actions:["invokeOnClose"]}],"ITEM.POINTER_MOVE":{target:"interacting",actions:["setHighlightedValue"]},"ITEM.POINTER_LEAVE":{actions:["clearHighlightedValue"]}}}}}},implementations:{guards:{isInputValueEmpty:({computed:e})=>e("isInputValueEmpty"),autoComplete:({computed:e,prop:t})=>e("autoComplete")&&!t("multiple"),autoHighlight:({computed:e})=>e("autoHighlight"),isFirstItemHighlighted:({prop:e,context:t})=>e("collection").firstValue===t.get("highlightedValue"),isLastItemHighlighted:({prop:e,context:t})=>e("collection").lastValue===t.get("highlightedValue"),isCustomValue:({computed:e})=>e("isCustomValue"),allowCustomValue:({prop:e})=>!!e("allowCustomValue"),hasHighlightedItem:({context:e})=>null!=e.get("highlightedValue"),closeOnSelect:({prop:e})=>!!e("closeOnSelect"),isOpenControlled:({prop:e})=>null!=e("open"),openOnChange:({prop:e,context:t})=>{const n=e("openOnChange");return!0===(r=n)||!1===r?n:!!(null==n?void 0:n({inputValue:t.get("inputValue")}));var r},restoreFocus:({event:e})=>{var t;const n=e.restoreFocus??(null==(t=e.previousEvent)?void 0:t.restoreFocus);return null==n||!!n},isChangeEvent:({event:e})=>{var t;return"INPUT.CHANGE"===(null==(t=e.previousEvent)?void 0:t.type)},autoFocus:({prop:e})=>!!e("autoFocus"),isHighlightedItemRemoved:({prop:e,context:t})=>!e("collection").has(t.get("highlightedValue")),hasCollectionItems:({prop:e})=>e("collection").size>0},effects:{trackFocusVisible({scope:e}){var t;return R8({root:null==(t=e.getRootNode)?void 0:t.call(e)})},trackDismissableLayer({send:e,prop:t,scope:n}){if(t("disableLayer"))return;return g8((()=>Y6(n)),{type:"listbox",defer:!0,exclude:()=>{return[Z6(n),Q6(n),(e=n,e.getById(V6(e)))];var e},onFocusOutside:t("onFocusOutside"),onPointerDownOutside:t("onPointerDownOutside"),onInteractOutside:t("onInteractOutside"),onEscapeKeyDown(t){t.preventDefault(),t.stopPropagation(),e({type:"LAYER.ESCAPE",src:"escape-key"})},onDismiss(){e({type:"LAYER.INTERACT_OUTSIDE",src:"interact-outside",restoreFocus:!1})}})},trackPlacement:({context:e,prop:t,scope:n})=>(e.set("currentPlacement",t("positioning").placement),M6((()=>X6(n)||Q6(n)),(()=>K6(n)),{...t("positioning"),defer:!0,onComplete(t){e.set("currentPlacement",t.placement)}})),scrollToHighlightedItem({context:e,prop:t,scope:n}){const r=Z6(n);let a=[];const o=r=>{if("pointer"===b8)return;const o=e.get("highlightedValue");if(!o)return;const i=Y6(n),s=t("scrollToIndexFn");if(s){return void s({index:t("collection").indexOf(o),immediate:r,getElement:()=>J6(n,o)})}const l=J6(n,o),c=sY((()=>{mY(l,{rootEl:i,block:"nearest"})}));a.push(c)},i=sY((()=>{var e;b8=e="virtual",_8(e,null),o(!0)}));a.push(i);const s=cY(r,{attributes:["aria-activedescendant"],callback:()=>o(!1)});return a.push(s),()=>{a.forEach((e=>e()))}}},actions:{reposition({context:e,prop:t,scope:n,event:r}){M6((()=>X6(n)),(()=>K6(n)),{...t("positioning"),...r.options,defer:!0,listeners:!1,onComplete(t){e.set("currentPlacement",t.placement)}})},setHighlightedValue({context:e,event:t}){null!=t.value&&e.set("highlightedValue",t.value)},clearHighlightedValue({context:e}){e.set("highlightedValue",null)},selectHighlightedItem(e){var t;const{context:n,prop:r}=e,a=r("collection"),o=n.get("highlightedValue");if(!o||!a.has(o))return;const i=r("multiple")?_q(n.get("value"),o):[o];null==(t=r("onSelect"))||t({value:i,itemValue:o}),n.set("value",i);const s=jq(r("selectionBehavior"),{preserve:n.get("inputValue"),replace:a.stringifyMany(i),clear:""});n.set("inputValue",s)},scrollToHighlightedItem({context:e,prop:t,scope:n}){lY((()=>{const r=e.get("highlightedValue");if(null==r)return;const a=J6(n,r),o=Y6(n),i=t("scrollToIndexFn");if(i){i({index:t("collection").indexOf(r),immediate:!0,getElement:()=>J6(n,r)})}else mY(a,{rootEl:o,block:"nearest"})}))},selectItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{var e;const r=a("multiple")?_q(t.get("value"),n.value):[n.value];null==(e=a("onSelect"))||e({value:r,itemValue:n.value}),t.set("value",r);const o=jq(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r),clear:""});t.set("inputValue",o)}))},clearItem(e){const{context:t,event:n,flush:r,prop:a}=e;null!=n.value&&r((()=>{const e=Eq(t.get("value"),n.value);t.set("value",e);const r=jq(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(e),clear:""});t.set("inputValue",r)}))},setInitialFocus({scope:e}){sY((()=>{e8(e)}))},setFinalFocus({scope:e}){sY((()=>{const t=Q6(e);null==(null==t?void 0:t.dataset.focusable)?e8(e):(e=>{const t=Q6(e);e.isActiveElement(t)||null==t||t.focus({preventScroll:!0})})(e)}))},syncInputValue({context:e,scope:t,event:n}){const r=Z6(t);r&&(r.value=e.get("inputValue"),queueMicrotask((()=>{"INPUT.CHANGE"!==n.current().type&&iW(r)})))},setInputValue({context:e,event:t}){e.set("inputValue",t.value)},clearInputValue({context:e}){e.set("inputValue","")},revertInputValue({context:e,prop:t,computed:n}){const r=jq(t("selectionBehavior"),{replace:n("hasSelectedItems")?n("valueAsString"):"",preserve:e.get("inputValue"),clear:""});e.set("inputValue",r)},setValue(e){const{context:t,flush:n,event:r,prop:a}=e;n((()=>{t.set("value",r.value);const e=jq(a("selectionBehavior"),{preserve:t.get("inputValue"),replace:a("collection").stringifyMany(r.value),clear:""});t.set("inputValue",e)}))},clearSelectedItems(e){const{context:t,flush:n,prop:r}=e;n((()=>{t.set("value",[]);const e=jq(r("selectionBehavior"),{preserve:t.get("inputValue"),replace:r("collection").stringifyMany([]),clear:""});t.set("inputValue",e)}))},scrollContentToTop({prop:e,scope:t}){const n=e("scrollToIndexFn");if(n){const r=e("collection").firstValue;n({index:0,immediate:!0,getElement:()=>J6(t,r)})}else{const e=Y6(t);if(!e)return;e.scrollTop=0}},invokeOnOpen({prop:e,event:t,context:n}){var r;const a=z8(t);null==(r=e("onOpenChange"))||r({open:!0,reason:a,value:n.get("value")})},invokeOnClose({prop:e,event:t,context:n}){var r;const a=z8(t);null==(r=e("onOpenChange"))||r({open:!1,reason:a,value:n.get("value")})},highlightFirstItem({context:e,prop:t,scope:n}){(Y6(n)?queueMicrotask:sY)((()=>{const n=t("collection").firstValue;n&&e.set("highlightedValue",n)}))},highlightFirstItemIfNeeded({computed:e,action:t}){e("autoHighlight")&&t(["highlightFirstItem"])},highlightLastItem({context:e,prop:t,scope:n}){(Y6(n)?queueMicrotask:sY)((()=>{const n=t("collection").lastValue;n&&e.set("highlightedValue",n)}))},highlightNextItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getNextValue(r),!n&&t("loopFocus")&&(n=a.firstValue)):n=a.firstValue,n&&e.set("highlightedValue",n)},highlightPrevItem({context:e,prop:t}){let n=null;const r=e.get("highlightedValue"),a=t("collection");r?(n=a.getPreviousValue(r),!n&&t("loopFocus")&&(n=a.lastValue)):n=a.lastValue,n&&e.set("highlightedValue",n)},highlightFirstSelectedItem({context:e,prop:t}){sY((()=>{const[n]=t("collection").sort(e.get("value"));n&&e.set("highlightedValue",n)}))},highlightFirstOrSelectedItem({context:e,prop:t,computed:n}){sY((()=>{let r=null;r=n("hasSelectedItems")?t("collection").sort(e.get("value"))[0]:t("collection").firstValue,r&&e.set("highlightedValue",r)}))},highlightLastOrSelectedItem({context:e,prop:t,computed:n}){sY((()=>{const r=t("collection");let a=null;a=n("hasSelectedItems")?r.sort(e.get("value"))[0]:r.lastValue,a&&e.set("highlightedValue",a)}))},autofillInputValue({context:e,computed:t,prop:n,event:r,scope:a}){const o=Z6(a),i=n("collection");if(!t("autoComplete")||!o||!r.keypress)return;const s=i.stringify(e.get("highlightedValue"));sY((()=>{o.value=s||e.get("inputValue")}))},syncSelectedItems(e){queueMicrotask((()=>{const{context:t,prop:n}=e,r=n("collection"),a=t.get("value"),o=f6({values:a,collection:r,selectedItemMap:t.get("selectedItemMap")});t.set("selectedItemMap",o.nextSelectedItemMap);const i=jq(n("selectionBehavior"),{preserve:t.get("inputValue"),replace:r.stringifyMany(a),clear:""});t.set("inputValue",i)}))},syncHighlightedItem({context:e,prop:t}){const n=t("collection").find(e.get("highlightedValue"));e.set("highlightedItem",n)},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}});function z8(e){return(e.previousEvent||e).src}const B8=X.forwardRef(((e,t)=>{const{children:n,defaultValue:r=[],items:a,multiple:o=!1,placeholder:i,name:s,disabled:l,required:c,id:u,onValueChange:d}=e,p=X.useId(),f=u??p,h=qO(),[m,g]=X.useState(a),y=X.useMemo((()=>m6({items:m,itemToValue:e=>e.value,itemToString:e=>e.label})),[m]),b=t8(xY(j8,{id:f,collection:y,defaultValue:r,multiple:o,placeholder:i,name:s,disabled:l,required:c,openOnClick:!0,getRootNode:()=>{var e;return(null==(e=null==h?void 0:h.shadowHost)?void 0:e.shadowRoot)??document},selectionBehavior:o?"clear":"replace",onOpenChange(e){e.open||g(a)},onInputValueChange(e){const t=""===e.inputValue.trim()?a:a.filter((t=>t.label.toLowerCase().includes(e.inputValue.toLowerCase())));g(t.length>0?t:[])},onValueChange(e){null==d||d(e)}}),SY),v=X.useMemo((()=>({api:b,options:m})),[b,m]),k=b.getRootProps();return og.jsx("div",{"data-scope":"combobox","data-part":"root",...k,children:og.jsx(e9.Provider,{value:v,children:n})})}));B8.displayName="ComboboxRoot";const H8=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=t9(),o=a.getControlProps();return og.jsx("div",{"data-scope":"combobox","data-part":"control","data-state":a.open?"open":"closed","data-disabled":a.disabled?"":void 0,"data-focus":a.focused?"":void 0,...o,ref:U8(t,o.ref),...r,children:n})}));function U8(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))}}H8.displayName="ComboboxControl";const $8=X.forwardRef(((e,t)=>{const n=t9(),r=n.getInputProps();return og.jsx("input",{"data-scope":"combobox","data-part":"input","data-state":n.open?"open":"closed",...r,...e,ref:U8(t,r.ref)})}));$8.displayName="ComboboxInput";const V8=X.forwardRef(((e,t)=>{const n=t9(),r=n.getTriggerProps();return og.jsx("button",{type:"button","data-scope":"combobox","data-part":"trigger","data-state":n.open?"open":"closed","data-disabled":n.disabled?"":void 0,...r,ref:U8(t,r.ref),...e,children:e.children??"▼"})}));V8.displayName="ComboboxTrigger";const G8=X.forwardRef((function(e,t){const n=t9();return og.jsx("div",{ref:t,...n.getPositionerProps(),...e})})),q8=X.forwardRef(((e,t)=>{const n=t9(),r=n.getContentProps();return og.jsx("div",{"data-scope":"combobox","data-part":"content","data-state":n.open?"open":"closed",...r,ref:U8(t,r.ref),...e,children:e.children})}));q8.displayName="ComboboxContent";const W8=X.forwardRef(((e,t)=>{const n=t9().getListProps();return og.jsx("div",{ref:U8(t,n.ref),"data-scope":"combobox","data-part":"list",...n,...e,children:e.children})}));W8.displayName="ComboboxList";const Y8=({children:e})=>{const t=function(){const e=X.useContext(e9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.options}();return og.jsx(og.Fragment,{children:e(t)})};Y8.displayName="ComboboxListItems";const Z8=X.forwardRef(((e,t)=>{const{children:n="No results found",...r}=e;return og.jsx("div",{ref:t,"data-scope":"combobox","data-part":"list-empty",...r,children:n})}));Z8.displayName="ComboboxListEmpty";const K8=X.createContext(null),X8=X.forwardRef(((e,t)=>{const{item:n,...r}=e,a=t9(),o=a.getItemState({item:n}),i=a.getItemProps({item:n});return og.jsx(K8.Provider,{value:n,children:og.jsx("div",{ref:U8(t,i.ref),"data-scope":"combobox","data-part":"item","data-value":n.value,"data-highlighted":o.highlighted?"":void 0,"data-state":o.selected?"checked":"unchecked","data-disabled":o.disabled?"":void 0,...i,...r,children:e.children})})}));X8.displayName="ComboboxItem";const Q8=X.forwardRef(((e,t)=>{const n=X.useContext(K8),r=t9(),a=n?r.getItemTextProps({item:n}):{};return og.jsx("span",{ref:U8(t,a.ref),"data-scope":"combobox","data-part":"item-text",...a,...e})}));Q8.displayName="ComboboxItemText";const J8=X.forwardRef(((e,t)=>{const{children:n,...r}=e,a=X.useContext(K8),o=t9(),i=a?o.getItemState({item:a}):{selected:!1},s=a?o.getItemIndicatorProps({item:a}):{};return i.selected?og.jsx("span",{ref:U8(t,s.ref),"data-scope":"combobox","data-part":"item-indicator","data-state":"checked","aria-hidden":!0,...s,...r,children:n??og.jsx(bG,{iconSettings:{builtIn:"LuCheck"}})}):null}));J8.displayName="ComboboxItemIndicator";const e9=X.createContext(null);function t9(){const e=X.useContext(e9);if(!e)throw new Error("Combobox components must be used within ComboboxRoot");return e.api}const n9=X.forwardRef(((e,t)=>{const n=t9(),r=n.selectedItems??[],a=n.clearValue;return 0===r.length?null:og.jsx("div",{ref:t,"data-scope":"combobox","data-part":"selected-tags",className:e.className,style:e.style,children:r.map((t=>og.jsxs("span",{"data-scope":"combobox","data-part":"tag",children:[e.renderTag?e.renderTag(t):t.label,og.jsx("button",{type:"button","data-part":"tag-clear","aria-label":`Remove ${t.label}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),null==a||a(t.value)},children:og.jsx(bG,{iconSettings:{builtIn:"IoCloseOutline"}})})]},t.value)))})}));n9.displayName="ComboboxSelectedTags";var r9=Object.defineProperty,a9=(e,t,n)=>((e,t,n)=>t in e?r9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),o9={activateTrap(e,t){if(e.length>0){const n=e[e.length-1];n!==t&&n.pause()}const n=e.indexOf(t);-1===n||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},i9=[],s9=class{constructor(e,t){a9(this,"trapStack"),a9(this,"config"),a9(this,"doc"),a9(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),a9(this,"portalContainers",new Set),a9(this,"listenerCleanups",[]),a9(this,"handleFocus",(e=>{const t=zW(e),n=this.findContainerIndex(t,e)>=0;if(n||pW(t))n&&(this.state.mostRecentlyFocusedNode=t);else{let t;e.stopImmediatePropagation();let n=!0;if(this.state.mostRecentlyFocusedNode)if(oY(this.state.mostRecentlyFocusedNode)>0){const e=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:r}=this.state.containerGroups[e];if(r.length>0){const e=r.findIndex((e=>e===this.state.mostRecentlyFocusedNode));e>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?e+1<r.length&&(t=r[e+1],n=!1):e-1>=0&&(t=r[e-1],n=!1))}}else this.state.containerGroups.some((e=>e.tabbableNodes.some((e=>oY(e)>0))))||(n=!1);else n=!1;n&&(t=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),t?this.tryFocus(t):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0})),a9(this,"handlePointerDown",(e=>{const t=zW(e);this.findContainerIndex(t,e)>=0||(p9(this.config.clickOutsideDeactivates,e)?this.deactivate({returnFocus:this.config.returnFocusOnDeactivate}):p9(this.config.allowOutsideClick,e)||e.preventDefault())})),a9(this,"handleClick",(e=>{const t=zW(e);this.findContainerIndex(t,e)>=0||p9(this.config.clickOutsideDeactivates,e)||p9(this.config.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())})),a9(this,"handleTabKey",(e=>{if(this.config.isKeyForward(e)||this.config.isKeyBackward(e)){this.state.recentNavEvent=e;const t=this.config.isKeyBackward(e),n=this.findNextNavNode({event:e,isBackward:t});if(!n)return;c9(e)&&e.preventDefault(),this.tryFocus(n)}})),a9(this,"handleEscapeKey",(e=>{f9(e)&&!1!==p9(this.config.escapeDeactivates,e)&&(e.preventDefault(),this.deactivate())})),a9(this,"_mutationObserver"),a9(this,"setupMutationObserver",(()=>{const e=this.doc.defaultView||window;this._mutationObserver=new e.MutationObserver((e=>{e.some((e=>Array.from(e.removedNodes).some((e=>e===this.state.mostRecentlyFocusedNode))))&&this.tryFocus(this.getInitialFocusNode());e.some((e=>"attributes"===e.type&&("aria-controls"===e.attributeName||"aria-expanded"===e.attributeName)||"childList"===e.type&&e.addedNodes.length>0&&Array.from(e.addedNodes).some((e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;const t=e;return!!function(e){var t;return!!function(e){return e.hasAttribute("aria-controls")&&"true"===e.getAttribute("aria-expanded")}(e)||Boolean(null==(t=e.querySelector)?void 0:t.call(e,'[aria-controls][aria-expanded="true"]'))}(t)||!(!t.id||this.state.containers.some((e=>e.contains(t))))&&RW(t)}))))&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())}))})),a9(this,"updateObservedNodes",(()=>{var e;null==(e=this._mutationObserver)||e.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map((e=>{var t;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})})),this.portalContainers.forEach((e=>{this.observePortalContainer(e)})))})),a9(this,"getInitialFocusNode",(()=>{let e=this.getNodeForOption("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!nY(e)){const t=wW(this.doc);if(t&&this.findContainerIndex(t)>=0)e=t;else{const t=this.state.tabbableGroups[0];e=t&&t.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else null===e&&(e=this.getNodeForOption("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");if(e.isConnected||(e=this.getNodeForOption("fallbackFocus")),!e||!e.isConnected)throw new Error("Your focus-trap needs to have at least one focusable element");return e})),a9(this,"tryFocus",(e=>{!1!==e&&e!==wW(this.doc)&&(e&&e.focus?(e.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=e,m9(e)&&e.select()):this.tryFocus(this.getInitialFocusNode()))})),a9(this,"deactivate",(e=>{if(!this.state.active)return this;const t={onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus,...e};clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),o9.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const n=this.getOption(t,"onDeactivate"),r=this.getOption(t,"onPostDeactivate"),a=this.getOption(t,"checkCanReturnFocus"),o=this.getOption(t,"returnFocus","returnFocusOnDeactivate");null==n||n();const i=()=>{h9((()=>{if(o){const e=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(e)}null==r||r()}))};if(o&&a){return a(this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation)).then(i,i),this}return i(),this})),a9(this,"pause",(e=>{if(this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onPause"),n=this.getOption(e,"onPostPause");return this.state.paused=!0,null==t||t(),this.removeListeners(),this.updateObservedNodes(),null==n||n(),this})),a9(this,"unpause",(e=>{if(!this.state.paused||!this.state.active)return this;const t=this.getOption(e,"onUnpause"),n=this.getOption(e,"onPostUnpause");return this.state.paused=!1,null==t||t(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n(),this})),a9(this,"updateContainerElements",(e=>(this.state.containers=Array.isArray(e)?e.filter(Boolean):[e].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this))),a9(this,"getReturnFocusNode",(e=>{const t=this.getNodeForOption("setReturnFocus",{params:[e]});return t||!1!==t&&e})),a9(this,"getOption",((e,t,n)=>e&&void 0!==e[t]?e[t]:this.config[n||t])),a9(this,"getNodeForOption",((e,{hasFallback:t=!1,params:n=[]}={})=>{let r=this.config[e];if("function"==typeof r&&(r=r(...n)),!0===r&&(r=void 0),!r){if(void 0===r||!1===r)return r;throw new Error(`\`${e}\` was specified but was not a node, or did not return a node`)}let a=r;if("string"==typeof r){try{a=this.doc.querySelector(r)}catch(jNe){throw new Error(`\`${e}\` appears to be an invalid selector; error="${jNe.message}"`)}if(!a&&!t)throw new Error(`\`${e}\` as selector refers to no known node`)}return a})),a9(this,"findNextNavNode",(e=>{const{event:t,isBackward:n=!1}=e,r=e.target||zW(t);this.updateTabbableNodes();let a=null;if(this.state.tabbableGroups.length>0){const e=this.findContainerIndex(r,t),o=e>=0?this.state.containerGroups[e]:void 0;if(e<0)a=n?this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:this.state.tabbableGroups[0].firstTabbableNode;else if(n){let n=this.state.tabbableGroups.findIndex((({firstTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||nY(r)&&!aY(r)&&!(null==o?void 0:o.nextTabbableNode(r,!1)))&&(n=e),n>=0){const e=0===n?this.state.tabbableGroups.length-1:n-1,t=this.state.tabbableGroups[e];a=oY(r)>=0?t.lastTabbableNode:t.lastDomTabbableNode}else c9(t)||(a=null==o?void 0:o.nextTabbableNode(r,!1))}else{let n=this.state.tabbableGroups.findIndex((({lastTabbableNode:e})=>r===e));if(n<0&&((null==o?void 0:o.container)===r||nY(r)&&!aY(r)&&!(null==o?void 0:o.nextTabbableNode(r)))&&(n=e),n>=0){const e=n===this.state.tabbableGroups.length-1?0:n+1,t=this.state.tabbableGroups[e];a=oY(r)>=0?t.firstTabbableNode:t.firstDomTabbableNode}else c9(t)||(a=null==o?void 0:o.nextTabbableNode(r))}}else a=this.getNodeForOption("fallbackFocus");return a})),this.trapStack=t.trapStack||i9;const n={returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward:u9,isKeyBackward:d9,...t};this.doc=n.document||kW(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;null==(t=this._mutationObserver)||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach((e=>{OW(e).forEach((e=>{this.addPortalContainer(e)}))}))}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return this.state.containerGroups.findIndex((({container:t,tabbableNodes:r})=>t.contains(e)||(null==n?void 0:n.includes(t))||r.find((t=>t===e))||this.isControlledElement(t,e)))}isControlledElement(e,t){return!!this.config.followControlledElements&&IW(e,t)}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map((e=>{const t=rY(e,{getShadowRoot:this.config.getShadowRoot}),n=tY(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],a=t[t.length-1],o=r,i=a;let s=!1;for(let l=0;l<t.length;l++)if(oY(t[l])>0){s=!0;break}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:s,firstTabbableNode:r,lastTabbableNode:a,firstDomTabbableNode:o,lastDomTabbableNode:i,nextTabbableNode:function(e,r=!0){const a=t.indexOf(e);if(a>=0)return t[a+(r?1:-1)];const o=n.indexOf(e);if(!(o<0))if(r){for(let t=o+1;t<n.length;t++)if(aY(n[t]))return n[t]}else for(let t=o-1;t>=0;t--)if(aY(n[t]))return n[t]}}})),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 o9.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?h9((()=>{this.tryFocus(this.getInitialFocusNode())})):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(WW(this.doc,"focusin",this.handleFocus,!0),WW(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),WW(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),WW(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),WW(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),WW(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=wW(this.doc),null==t||t();const a=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),null==n||n()};return r?(r(this.state.containers.concat()).then(a,a),this):(a(),this)}},l9=e=>"keydown"===(null==e?void 0:e.type),c9=e=>l9(e)&&"Tab"===(null==e?void 0:e.key),u9=e=>l9(e)&&"Tab"===e.key&&!(null==e?void 0:e.shiftKey),d9=e=>l9(e)&&"Tab"===e.key&&(null==e?void 0:e.shiftKey),p9=(e,...t)=>"function"==typeof e?e(...t):e,f9=e=>!e.isComposing&&"Escape"===e.key,h9=e=>setTimeout(e,0),m9=e=>"input"===e.localName&&"select"in e&&"function"==typeof e.select;var g9=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=X.useState(),r=X.useRef(null),a=X.useRef(e),o=X.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return X.useReducer(((e,n)=>t[e][n]??e),e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return X.useEffect((()=>{const e=y9(r.current);o.current="mounted"===s?e:"none"}),[s]),HO((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=y9(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,l]),HO((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=y9(r.current).includes(CSS.escape(o.animationName));if(o.target===t&&i&&(l("ANIMATION_END"),!a.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(o.current=y9(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:X.useCallback((e=>{r.current=e?getComputedStyle(e):null,n(e)}),[])}}(t),a="function"==typeof n?n({present:r.isPresent}):X.Children.only(n),o=j5(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof n||r.isPresent?X.cloneElement(a,{ref:o}):null};function y9(e){return(null==e?void 0:e.animationName)||"none"}g9.displayName="Presence";var b9="data-scroll-lock";function v9(e){const t=TW(e),n=null==t?void 0:t.scrollbarGutter;return"stable"===n||!0===(null==n?void 0:n.startsWith("stable "))}function k9(e){const t=e??document,n=t.defaultView??window,{documentElement:r,body:a}=t;if(a.hasAttribute(b9))return;const o=v9(r)||v9(a),i=n.innerWidth-r.clientWidth;a.setAttribute(b9,"");const s=function(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}(r),l=[function(e,t,n){if(!e)return sW;const r=e.style.getPropertyValue(t);return r===n?sW:(e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),0===e.style.length&&e.removeAttribute("style")})}(r,"--scrollbar-width",`${i}px`),FW()?(()=>{const{scrollX:e,scrollY:t,visualViewport:r}=n,l=(null==r?void 0:r.offsetLeft)??0,c=(null==r?void 0:r.offsetTop)??0,u={position:"fixed",overflow:"hidden",top:-(t-Math.floor(c))+"px",left:-(e-Math.floor(l))+"px",right:"0"};!o&&i>0&&(u[s]=`${i}px`);const d=gY(a,u);return()=>{null==d||d(),n.scrollTo({left:e,top:t,behavior:"instant"})}})():(()=>{const e={overflow:"hidden"};return!o&&i>0&&(e[s]=`${i}px`),gY(a,e)})()];return()=>{l.forEach((e=>null==e?void 0:e())),a.removeAttribute(b9)}}const x9="Dialog",[w9]=L5(x9),[E9,_9]=w9(x9),S9=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,s=X.useRef(null),l=X.useRef(null),[c=!1,u]=SZ({prop:r,defaultProp:a??!1,onChange:o});return og.jsx(E9,{scope:t,triggerRef:s,contentRef:l,contentId:VO(),titleId:VO(),descriptionId:VO(),open:c,onOpenChange:u,onOpenToggle:X.useCallback((()=>u((e=>!e))),[u]),modal:i,children:n})};S9.displayName=x9;const T9="DialogTrigger";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=_9(T9,n),o=j5(t,a.triggerRef);return og.jsx(d3.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":V9(a.open),...r,ref:o,onClick:P5(e.onClick,a.onOpenToggle)})})).displayName=T9;const C9="DialogPortal",[A9,N9]=w9(C9,{forceMount:void 0}),I9=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=_9(C9,t);return og.jsx(A9,{scope:t,forceMount:n,children:X.Children.map(r,(e=>og.jsx(g9,{present:n||o.open,children:og.jsx(Y3,{asChild:!0,container:a,children:e})})))})};I9.displayName=C9;const O9="DialogOverlay",R9=X.forwardRef(((e,t)=>{const n=N9(O9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=_9(O9,e.__scopeDialog);return o.modal?og.jsx(g9,{present:r||o.open,children:og.jsx(P9,{...a,ref:t})}):null}));R9.displayName=O9;const P9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=_9(O9,n),o=qO();return X.useEffect((()=>{var e;return k9((null==(e=null==o?void 0:o.rootElement)?void 0:e.ownerDocument)??document)}),[o]),og.jsx(d3.div,{"data-dialog-overlay":"","data-state":V9(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})),L9="DialogContent",D9=X.forwardRef(((e,t)=>{const n=N9(L9,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=_9(L9,e.__scopeDialog);return og.jsx(g9,{present:r||o.open,children:o.modal?og.jsx(M9,{...a,ref:t}):og.jsx(F9,{...a,ref:t})})}));D9.displayName=L9;const M9=X.forwardRef(((e,t)=>{const n=_9(L9,e.__scopeDialog),r=X.useRef(null),a=j5(t,n.contentRef,r);return X.useEffect((()=>{const e=r.current;if(e){const t=document.querySelectorAll("[data-ikp-component]");return B1([e,...Array.from(t)])}}),[]),og.jsx(j9,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onPointerDownOutside:P5(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault();e.target.closest("[data-ikp-component]")&&e.preventDefault()})),onFocusOutside:P5(e.onFocusOutside,(e=>e.preventDefault()))})})),F9=X.forwardRef(((e,t)=>{const n=_9(L9,e.__scopeDialog),r=X.useRef(!1),a=X.useRef(!1);return og.jsx(j9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),j9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=_9(L9,n),l=X.useRef(null),c=j5(t,l);return c3(),X.useEffect((()=>{if(r)return function(e,t={}){let n;const r=sY((()=>{const r=(Array.isArray(e)?e:[e]).map((e=>"function"==typeof e?e():e)).filter((e=>null!=e));if(0===r.length)return;const a=r[0];n=new s9(r,{escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:a,...t,document:kW(a)});try{n.activate()}catch{}}));return function(){null==n||n.deactivate(),r()}}(l.current,{preventScroll:!0,onActivate:a,onDeactivate:o,initialFocus:!1,allowOutsideClick:e=>{var t;const n=(null==(t=e.composedPath)?void 0:t.call(e)[0])??e.target;return!!n.closest("[data-ikp-component]")||!!n.closest("[data-dialog-overlay]")}})}),[]),og.jsx(o3,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":V9(s.open),...i,ref:c,onDismiss:()=>s.onOpenChange(!1)})})),z9="DialogTitle",B9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=_9(z9,n);return og.jsx(d3.h2,{id:a.titleId,...r,ref:t})}));B9.displayName=z9;const H9="DialogDescription";X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=_9(H9,n);return og.jsx(d3.p,{id:a.descriptionId,...r,ref:t})})).displayName=H9;const U9="DialogClose",$9=X.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=_9(U9,n);return og.jsx(d3.button,{type:"button",...r,ref:t,onClick:P5(e.onClick,(()=>a.onOpenChange(!1)))})}));function V9(e){return e?"open":"closed"}$9.displayName=U9;const G9=S9,q9=I9,W9=R9,Y9=D9,Z9=B9,K9=$9,X9=X.forwardRef(((e,t)=>{const n=X.useId();return og.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:"100%",width:"100%",ref:t,...e,children:[og.jsx("title",{children:"AI Avatar"}),og.jsx("path",{d:"M9.937 15.5002C9.84772 15.1542 9.66734 14.8384 9.41462 14.5856C9.1619 14.3329 8.84607 14.1525 8.5 14.0632L2.365 12.4812C2.26033 12.4515 2.16821 12.3885 2.10261 12.3017C2.03702 12.2149 2.00153 12.1091 2.00153 12.0002C2.00153 11.8914 2.03702 11.7856 2.10261 11.6988C2.16821 11.612 2.26033 11.549 2.365 11.5192L8.5 9.93625C8.84595 9.84706 9.16169 9.66682 9.4144 9.41429C9.66711 9.16175 9.84757 8.84614 9.937 8.50025L11.519 2.36525C11.5484 2.26017 11.6114 2.16759 11.6983 2.10164C11.7853 2.0357 11.8914 2 12.0005 2C12.1096 2 12.2157 2.0357 12.3027 2.10164C12.3896 2.16759 12.4526 2.26017 12.482 2.36525L14.063 8.50025C14.1523 8.84632 14.3327 9.16215 14.5854 9.41487C14.8381 9.66759 15.1539 9.84797 15.5 9.93725L21.635 11.5182C21.7405 11.5473 21.8335 11.6103 21.8998 11.6973C21.9661 11.7844 22.0021 11.8908 22.0021 12.0002C22.0021 12.1097 21.9661 12.2161 21.8998 12.3032C21.8335 12.3902 21.7405 12.4531 21.635 12.4822L15.5 14.0632C15.1539 14.1525 14.8381 14.3329 14.5854 14.5856C14.3327 14.8384 14.1523 15.1542 14.063 15.5002L12.481 21.6353C12.4516 21.7403 12.3886 21.8329 12.3017 21.8989C12.2147 21.9648 12.1086 22.0005 11.9995 22.0005C11.8904 22.0005 11.7843 21.9648 11.6973 21.8989C11.6104 21.8329 11.5474 21.7403 11.518 21.6353L9.937 15.5002Z",stroke:`url(#${n}-stroke1)`,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),og.jsx("path",{d:"M18.9838 5.37522C18.9615 5.28871 18.9164 5.20975 18.8532 5.14657C18.79 5.08339 18.7111 5.0383 18.6246 5.01598L17.0909 4.62049C17.0647 4.61306 17.0417 4.5973 17.0253 4.5756C17.0089 4.5539 17 4.52744 17 4.50024C17 4.47304 17.0089 4.44659 17.0253 4.42488C17.0417 4.40318 17.0647 4.38742 17.0909 4.38L18.6246 3.98426C18.7111 3.96196 18.79 3.9169 18.8532 3.85377C18.9163 3.79064 18.9615 3.71174 18.9838 3.62527L19.3793 2.09155C19.3867 2.06528 19.4024 2.04214 19.4241 2.02565C19.4459 2.00917 19.4724 2.00024 19.4997 2.00024C19.527 2.00024 19.5535 2.00917 19.5752 2.02565C19.597 2.04214 19.6127 2.06528 19.6201 2.09155L20.0153 3.62527C20.0376 3.71178 20.0827 3.79074 20.1459 3.85391C20.2091 3.91709 20.288 3.96219 20.3745 3.98451L21.9082 4.37975C21.9346 4.38702 21.9579 4.40275 21.9744 4.42452C21.991 4.44628 22 4.47288 22 4.50024C22 4.5276 21.991 4.55421 21.9744 4.57597C21.9579 4.59774 21.9346 4.61347 21.9082 4.62074L20.3745 5.01598C20.288 5.0383 20.2091 5.08339 20.1459 5.14657C20.0827 5.20975 20.0376 5.28871 20.0153 5.37522L19.6198 6.90893C19.6124 6.9352 19.5967 6.95835 19.575 6.97483C19.5532 6.99132 19.5267 7.00024 19.4994 7.00024C19.4721 7.00024 19.4456 6.99132 19.4239 6.97483C19.4022 6.95835 19.3864 6.9352 19.3791 6.90893L18.9838 5.37522Z",stroke:`url(#${n}-stroke2)`,strokeLinecap:"round",strokeLinejoin:"round"}),og.jsx("path",{d:"M3.98382 20.3752C3.9615 20.2887 3.9164 20.2098 3.85322 20.1466C3.79005 20.0834 3.71109 20.0383 3.62458 20.016L2.09087 19.6205C2.0647 19.6131 2.04167 19.5973 2.02527 19.5756C2.00887 19.5539 2 19.5274 2 19.5002C2 19.473 2.00887 19.4466 2.02527 19.4249C2.04167 19.4032 2.0647 19.3874 2.09087 19.38L3.62458 18.9843C3.71106 18.962 3.78999 18.9169 3.85317 18.8538C3.91635 18.7906 3.96146 18.7117 3.98382 18.6253L4.37931 17.0916C4.38666 17.0653 4.4024 17.0421 4.42414 17.0257C4.44587 17.0092 4.4724 17.0002 4.49968 17.0002C4.52696 17.0002 4.55349 17.0092 4.57522 17.0257C4.59695 17.0421 4.6127 17.0653 4.62005 17.0916L5.01529 18.6253C5.03761 18.7118 5.0827 18.7907 5.14588 18.8539C5.20906 18.9171 5.28801 18.9622 5.37453 18.9845L6.90824 19.3797C6.93461 19.387 6.95787 19.4027 6.97445 19.4245C6.99102 19.4463 7 19.4729 7 19.5002C7 19.5276 6.99102 19.5542 6.97445 19.576C6.95787 19.5977 6.93461 19.6135 6.90824 19.6207L5.37453 20.016C5.28801 20.0383 5.20906 20.0834 5.14588 20.1466C5.0827 20.2098 5.03761 20.2887 5.01529 20.3752L4.6198 21.9089C4.61245 21.9352 4.5967 21.9583 4.57497 21.9748C4.55324 21.9913 4.52671 22.0002 4.49943 22.0002C4.47215 22.0002 4.44562 21.9913 4.42389 21.9748C4.40215 21.9583 4.38641 21.9352 4.37906 21.9089L3.98382 20.3752Z",stroke:`url(#${n}-stroke3)`,strokeLinecap:"round",strokeLinejoin:"round"}),og.jsxs("defs",{children:[og.jsxs("linearGradient",{id:`${n}-stroke1`,x1:"0.149625",y1:"0.148102",x2:"23.8539",y2:"23.8524",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),og.jsxs("linearGradient",{id:`${n}-stroke2`,x1:"16.537",y1:"1.53728",x2:"22.463",y2:"7.46321",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]}),og.jsxs("linearGradient",{id:`${n}-stroke3`,x1:"1.53704",y1:"16.5373",x2:"7.46296",y2:"22.4632",gradientUnits:"userSpaceOnUse",children:[og.jsx("stop",{offset:"0.287444",stopColor:"var(--start-color)"}),og.jsx("stop",{offset:"0.728693",stopColor:"var(--end-color)"})]})]})]})})),Q9=X.forwardRef(((e,t)=>og.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",height:"32px",viewBox:"0 96 960 960",width:"32px",ref:t,...e,children:[og.jsx("title",{children:"User Avatar"}),og.jsx("path",{d:"M222 801q63-40 124.5-60.5T480 720q72 0 134 20.5T739 801q44-54 62.5-109T820 576q0-145-97.5-242.5T480 236q-145 0-242.5 97.5T140 576q0 61 19 116t63 109Zm257.814-195Q422 606 382.5 566.314q-39.5-39.686-39.5-97.5t39.686-97.314q39.686-39.5 97.5-39.5t97.314 39.686q39.5 39.686 39.5 97.5T577.314 566.5q-39.686 39.5-97.5 39.5Zm-.219 370q-83.146 0-156.275-31.5t-127.225-86Q142 804 111 731.159 80 658.319 80 575.5q0-82.819 31.5-155.659Q143 347 197.5 293t127.341-85.5Q397.681 176 480.5 176q82.819 0 155.659 31.5Q709 239 763 293t85.5 127Q880 493 880 575.734q0 82.734-31.5 155.5T763 858.5q-54 54.5-127.129 86T479.595 976Z",fill:"currentColor"})]}))),J9=X.forwardRef((({isExternal:e,...t},n)=>og.jsx("a",{target:e?"_blank":void 0,rel:e?"noopener":void 0,...t,ref:n})));J9.displayName="Link";const e7=X.forwardRef((({href:e,appendToUrl:t,...n},r)=>{const{baseSettings:a}=oR(),o=Object.assign({},a.urlQueryParamsToAppend,t),i=e?function(e,t){if(!t)return e;try{const n=new URL(e);for(const e of Object.keys(t))t[e]&&n.searchParams.append(e,t[e]);return n.href}catch{return e}}(e,o):e;return og.jsx(J9,{ref:r,href:i,...n})}));function t7(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,o=!1;for(;!o;){-1===r&&(r=n.length,o=!0);const e=n.slice(a,r).trim();!e&&o||t.push(e),a=r+1,r=n.indexOf(",",a)}return t}function n7(e,t){const n={};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}e7.displayName="LinkWithQueryParams";const r7=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,a7=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o7={};function i7(e,t){return(o7.jsx?a7:r7).test(e)}const s7=/[ \t\n\f\r]/g;function l7(e){return""===e.replace(s7,"")}class c7{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function u7(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new c7(n,r,t)}function d7(e){return e.toLowerCase()}c7.prototype.normal={},c7.prototype.property={},c7.prototype.space=void 0;class p7{constructor(e,t){this.attribute=t,this.property=e}}p7.prototype.attribute="",p7.prototype.booleanish=!1,p7.prototype.boolean=!1,p7.prototype.commaOrSpaceSeparated=!1,p7.prototype.commaSeparated=!1,p7.prototype.defined=!1,p7.prototype.mustUseProperty=!1,p7.prototype.number=!1,p7.prototype.overloadedBoolean=!1,p7.prototype.property="",p7.prototype.spaceSeparated=!1,p7.prototype.space=void 0;let f7=0;const h7=x7(),m7=x7(),g7=x7(),y7=x7(),b7=x7(),v7=x7(),k7=x7();function x7(){return 2**++f7}const w7=Object.freeze(Object.defineProperty({__proto__:null,boolean:h7,booleanish:m7,commaOrSpaceSeparated:k7,commaSeparated:v7,number:y7,overloadedBoolean:g7,spaceSeparated:b7},Symbol.toStringTag,{value:"Module"})),E7=Object.keys(w7);class _7 extends p7{constructor(e,t,n,r){let a=-1;if(super(e,t),S7(this,"space",r),"number"==typeof n)for(;++a<E7.length;){const e=E7[a];S7(this,E7[a],(n&w7[e])===w7[e])}}}function S7(e,t,n){n&&(e[t]=n)}function T7(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const o=new _7(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[d7(r)]=r,n[d7(o.attribute)]=r}return new c7(t,n,e.space)}_7.prototype.defined=!0;const C7=T7({properties:{ariaActiveDescendant:null,ariaAtomic:m7,ariaAutoComplete:null,ariaBusy:m7,ariaChecked:m7,ariaColCount:y7,ariaColIndex:y7,ariaColSpan:y7,ariaControls:b7,ariaCurrent:null,ariaDescribedBy:b7,ariaDetails:null,ariaDisabled:m7,ariaDropEffect:b7,ariaErrorMessage:null,ariaExpanded:m7,ariaFlowTo:b7,ariaGrabbed:m7,ariaHasPopup:null,ariaHidden:m7,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:b7,ariaLevel:y7,ariaLive:null,ariaModal:m7,ariaMultiLine:m7,ariaMultiSelectable:m7,ariaOrientation:null,ariaOwns:b7,ariaPlaceholder:null,ariaPosInSet:y7,ariaPressed:m7,ariaReadOnly:m7,ariaRelevant:null,ariaRequired:m7,ariaRoleDescription:b7,ariaRowCount:y7,ariaRowIndex:y7,ariaRowSpan:y7,ariaSelected:m7,ariaSetSize:y7,ariaSort:null,ariaValueMax:y7,ariaValueMin:y7,ariaValueNow:y7,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function A7(e,t){return t in e?e[t]:t}function N7(e,t){return A7(e,t.toLowerCase())}const I7=T7({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:v7,acceptCharset:b7,accessKey:b7,action:null,allow:null,allowFullScreen:h7,allowPaymentRequest:h7,allowUserMedia:h7,alt:null,as:null,async:h7,autoCapitalize:null,autoComplete:b7,autoFocus:h7,autoPlay:h7,blocking:b7,capture:null,charSet:null,checked:h7,cite:null,className:b7,cols:y7,colSpan:null,content:null,contentEditable:m7,controls:h7,controlsList:b7,coords:y7|v7,crossOrigin:null,data:null,dateTime:null,decoding:null,default:h7,defer:h7,dir:null,dirName:null,disabled:h7,download:g7,draggable:m7,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:h7,formTarget:null,headers:b7,height:y7,hidden:g7,high:y7,href:null,hrefLang:null,htmlFor:b7,httpEquiv:b7,id:null,imageSizes:null,imageSrcSet:null,inert:h7,inputMode:null,integrity:null,is:null,isMap:h7,itemId:null,itemProp:b7,itemRef:b7,itemScope:h7,itemType:b7,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:h7,low:y7,manifest:null,max:null,maxLength:y7,media:null,method:null,min:null,minLength:y7,multiple:h7,muted:h7,name:null,nonce:null,noModule:h7,noValidate:h7,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:h7,optimum:y7,pattern:null,ping:b7,placeholder:null,playsInline:h7,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:h7,referrerPolicy:null,rel:b7,required:h7,reversed:h7,rows:y7,rowSpan:y7,sandbox:b7,scope:null,scoped:h7,seamless:h7,selected:h7,shadowRootClonable:h7,shadowRootDelegatesFocus:h7,shadowRootMode:null,shape:null,size:y7,sizes:null,slot:null,span:y7,spellCheck:m7,src:null,srcDoc:null,srcLang:null,srcSet:null,start:y7,step:null,style:null,tabIndex:y7,target:null,title:null,translate:null,type:null,typeMustMatch:h7,useMap:null,value:m7,width:y7,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:b7,axis:null,background:null,bgColor:null,border:y7,borderColor:null,bottomMargin:y7,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:h7,declare:h7,event:null,face:null,frame:null,frameBorder:null,hSpace:y7,leftMargin:y7,link:null,longDesc:null,lowSrc:null,marginHeight:y7,marginWidth:y7,noResize:h7,noHref:h7,noShade:h7,noWrap:h7,object:null,profile:null,prompt:null,rev:null,rightMargin:y7,rules:null,scheme:null,scrolling:m7,standby:null,summary:null,text:null,topMargin:y7,valueType:null,version:null,vAlign:null,vLink:null,vSpace:y7,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:h7,disableRemotePlayback:h7,prefix:null,property:null,results:y7,security:null,unselectable:null},space:"html",transform:N7}),O7=T7({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:k7,accentHeight:y7,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:y7,amplitude:y7,arabicForm:null,ascent:y7,attributeName:null,attributeType:null,azimuth:y7,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:y7,by:null,calcMode:null,capHeight:y7,className:b7,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:y7,diffuseConstant:y7,direction:null,display:null,dur:null,divisor:y7,dominantBaseline:null,download:h7,dx:null,dy:null,edgeMode:null,editable:null,elevation:y7,enableBackground:null,end:null,event:null,exponent:y7,externalResourcesRequired:null,fill:null,fillOpacity:y7,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:v7,g2:v7,glyphName:v7,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:y7,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:y7,horizOriginX:y7,horizOriginY:y7,id:null,ideographic:y7,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:y7,k:y7,k1:y7,k2:y7,k3:y7,k4:y7,kernelMatrix:k7,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:y7,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:y7,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:y7,overlineThickness:y7,paintOrder:null,panose1:null,path:null,pathLength:y7,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:b7,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:y7,pointsAtY:y7,pointsAtZ:y7,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:k7,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:k7,rev:k7,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:k7,requiredFeatures:k7,requiredFonts:k7,requiredFormats:k7,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:y7,specularExponent:y7,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:y7,strikethroughThickness:y7,string:null,stroke:null,strokeDashArray:k7,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:y7,strokeOpacity:y7,strokeWidth:null,style:null,surfaceScale:y7,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:k7,tabIndex:y7,tableValues:null,target:null,targetX:y7,targetY:y7,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:k7,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:y7,underlineThickness:y7,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:y7,values:null,vAlphabetic:y7,vMathematical:y7,vectorEffect:null,vHanging:y7,vIdeographic:y7,version:null,vertAdvY:y7,vertOriginX:y7,vertOriginY:y7,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:y7,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:A7}),R7=T7({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),P7=T7({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:N7}),L7=T7({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),D7={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"},M7=/[A-Z]/g,F7=/-[a-z]/g,j7=/^data[-\w.:]+$/i;function z7(e,t){const n=d7(t);let r=t,a=p7;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&j7.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(F7,H7);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!F7.test(e)){let n=e.replace(M7,B7);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}a=_7}return new a(r,t)}function B7(e){return"-"+e.toLowerCase()}function H7(e){return e.charAt(1).toUpperCase()}const U7=u7([C7,I7,R7,P7,L7],"html"),$7=u7([C7,O7,R7,P7,L7],"svg");function V7(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function G7(e){return e.join(" ").trim()}var q7={},W7=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Y7=/\n/g,Z7=/^\s*/,K7=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,X7=/^:\s*/,Q7=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,J7=/^[;\s]*/,eee=/^\s+|\s+$/g,tee="";function nee(e){return e?e.replace(eee,tee):tee}var ree=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(e){var t=e.match(Y7);t&&(n+=t.length);var a=e.lastIndexOf("\n");r=~a?e.length-a:r+e.length}function o(){var e={line:n,column:r};return function(t){return t.position=new i(e),c(),t}}function i(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(a){var o=new Error(t.source+":"+n+":"+r+": "+a);if(o.reason=a,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var r=n[0];return a(r),e=e.slice(r.length),n}}function c(){l(Z7)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=o();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;tee!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,tee===e.charAt(n-1))return s("End of comment missing");var i=e.slice(2,n-2);return r+=2,a(i),e=e.slice(n),r+=2,t({type:"comment",comment:i})}}function p(){var e=o(),t=l(K7);if(t){if(d(),!l(X7))return s("property missing ':'");var n=l(Q7),r=e({type:"declaration",property:nee(t[0].replace(W7,tee)),value:n?nee(n[0].replace(W7,tee)):tee});return l(J7),r}}return i.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},aee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(q7,"__esModule",{value:!0}),q7.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,oee.default)(e),a="function"==typeof t;return r.forEach((e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;a?t(r,o,e):o&&(n=n||{},n[r]=o)})),n};const oee=aee(ree);var iee={};Object.defineProperty(iee,"__esModule",{value:!0}),iee.camelCase=void 0;var see=/^--[a-zA-Z0-9_-]+$/,lee=/-([a-z])/g,cee=/^[^-]+$/,uee=/^-(webkit|moz|ms|o|khtml)-/,dee=/^-(ms)-/,pee=function(e,t){return t.toUpperCase()},fee=function(e,t){return"".concat(t,"-")};iee.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||cee.test(e)||see.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(dee,fee):e.replace(uee,fee)).replace(lee,pee))};var hee=s&&s.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mee=hee(q7),gee=iee;function yee(e,t){var n={};return e&&"string"==typeof e?((0,mee.default)(e,(function(e,r){e&&r&&(n[(0,gee.camelCase)(e,t)]=r)})),n):n}yee.default=yee;const bee=l(yee),vee=xee("end"),kee=xee("start");function xee(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function wee(e){return e&&"object"==typeof e?"position"in e||"type"in e?_ee(e.position):"start"in e||"end"in e?_ee(e):"line"in e||"column"in e?Eee(e):"":""}function Eee(e){return See(e&&e.line)+":"+See(e&&e.column)}function _ee(e){return Eee(e&&e.start)+"-"+Eee(e&&e.end)}function See(e){return e&&"number"==typeof e?e:1}class Tee extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",a={},o=!1;if(t&&(a="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!a.cause&&e&&(o=!0,r=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?a.ruleId=n:(a.source=n.slice(0,e),a.ruleId=n.slice(e+1))}if(!a.place&&a.ancestors&&a.ancestors){const e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}const i=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=i?i.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=i?i.line:void 0,this.name=wee(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&"string"==typeof a.cause.stack?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Tee.prototype.file="",Tee.prototype.name="",Tee.prototype.reason="",Tee.prototype.message="",Tee.prototype.stack="",Tee.prototype.column=void 0,Tee.prototype.line=void 0,Tee.prototype.ancestors=void 0,Tee.prototype.cause=void 0,Tee.prototype.fatal=void 0,Tee.prototype.place=void 0,Tee.prototype.ruleId=void 0,Tee.prototype.source=void 0;const Cee={}.hasOwnProperty,Aee=new Map,Nee=/[A-Z]/g,Iee=new Set(["table","tbody","thead","tfoot","tr"]),Oee=new Set(["td","th"]),Ree="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pee(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,a,o){const i=Array.isArray(a.children),s=kee(n);return t(r,a,o,i,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,a,o){const i=Array.isArray(a.children)?n:t;return o?i(r,a,o):i(r,a)}}(0,t.jsx,t.jsxs)}const a={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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?$7:U7,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=Lee(a,e,void 0);return o&&"string"!=typeof o?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function Lee(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(a=$7,e.schema=a);e.ancestors.push(t);const o=zee(e,t.tagName,!1),i=function(e,t){const n={};let r,a;for(a in t.properties)if("children"!==a&&Cee.call(t.properties,a)){const o=jee(e,a,t.properties[a]);if(o){const[a,i]=o;e.tableCellAlignToStyle&&"align"===a&&"string"==typeof i&&Oee.has(t.tagName)?r=i:n[a]=i}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=Fee(e,t);Iee.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&l7(t.value):l7(t));var t})));return Dee(e,i,o,t),Mee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Bee(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let a=r;"svg"===t.name&&"html"===r.space&&(a=$7,e.schema=a);e.ancestors.push(t);const o=null===t.name?e.Fragment:zee(e,t.name,!0),i=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const a=t.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Bee(e,t.position);else{const a=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,o=e.evaluater.evaluateExpression(t.expression)}else Bee(e,t.position);else o=null===r.value||r.value;n[a]=o}return n}(e,t),s=Fee(e,t);return Dee(e,i,o,t),Mee(i,s),e.ancestors.pop(),e.schema=r,e.create(t,o,i,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Bee(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return Mee(r,Fee(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function Dee(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Mee(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Fee(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Aee;for(;++r<t.children.length;){const o=t.children[r];let i;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=a.get(e)||0;i=e+"-"+t,a.set(e,t+1)}}const s=Lee(e,o,i);void 0!==s&&n.push(s)}return n}function jee(e,t,n){const r=z7(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?n7(n):G7(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return bee(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const t=n,r=new Tee("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:t,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Ree+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)Cee.call(e,n)&&(t[Hee(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?D7[r.property]||r.property:r.attribute,n]}}function zee(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,a=-1;for(;++a<e.length;){const t=i7(e[a])?{type:"Identifier",name:e[a]}:{type:"Literal",value:e[a]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(a&&"Literal"===t.type),optional:!1}:t}r=n}else r=i7(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return Cee.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Bee(e)}function Bee(e,t){const n=new Tee("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=Ree+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Hee(e){let t=e.replace(Nee,Uee);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function Uee(e){return"-"+e.toLowerCase()}const $ee={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"]},Vee={};function Gee(e,t){return qee(e,"boolean"!=typeof Vee.includeImageAlt||Vee.includeImageAlt,"boolean"!=typeof Vee.includeHtml||Vee.includeHtml)}function qee(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Wee(e.children,t,n)}return Array.isArray(e)?Wee(e,t,n):""}function Wee(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=qee(e[a],t,n);return r.join("")}const Yee=document.createElement("i");function Zee(e){const t="&"+e+";";Yee.innerHTML=t;const n=Yee.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function Kee(e,t,n,r){const a=e.length;let o,i=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function Xee(e,t){return e.length>0?(Kee(e,e.length,0,t),e):t}const Qee={}.hasOwnProperty;function Jee(e){const t={};let n=-1;for(;++n<e.length;)ete(t,e[n]);return t}function ete(e,t){let n;for(n in t){const r=(Qee.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Qee.call(r,o)||(r[o]=[]);const e=a[o];tte(r[o],Array.isArray(e)?e:e?[e]:[])}}}function tte(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);Kee(e,0,0,r)}function nte(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function rte(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ate=gte(/[A-Za-z]/),ote=gte(/[\dA-Za-z]/),ite=gte(/[#-'*+\--9=?A-Z^-~]/);function ste(e){return null!==e&&(e<32||127===e)}const lte=gte(/\d/),cte=gte(/[\dA-Fa-f]/),ute=gte(/[!-/:-@[-`{-~]/);function dte(e){return null!==e&&e<-2}function pte(e){return null!==e&&(e<0||32===e)}function fte(e){return-2===e||-1===e||32===e}const hte=gte(new RegExp("\\p{P}|\\p{S}","u")),mte=gte(/\s/);function gte(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function yte(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let i="";if(37===o&&ote(e.charCodeAt(n+1))&&ote(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(i=String.fromCharCode(o,t),a=1):i="�"}else i=String.fromCharCode(o);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function bte(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(fte(r))return e.enter(n),i(r);return t(r)};function i(r){return fte(r)&&o++<a?(e.consume(r),i):(e.exit(n),t(r))}}const vte={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),bte(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,a(t)}function a(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):dte(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),a)}}};const kte={tokenize:function(e){const t=this,n=[];let r,a,o,i=0;return s;function s(r){if(i<n.length){const a=n[i];return t.containerState=a[1],e.attempt(a[0].continuation,l,c)(r)}return c(r)}function l(e){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let a,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){a=t.events[o][1].end;break}y(i);let s=n;for(;s<t.events.length;)t.events[s][1].end={...a},s++;return Kee(t.events,o+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(a){if(i===n.length){if(!r)return p(a);if(r.currentConstruct&&r.currentConstruct.concrete)return h(a);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xte,u,d)(a)}function u(e){return r&&b(),y(i),p(e)}function d(e){return t.parser.lazy[t.now().line]=i!==n.length,o=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(xte,f,h)(n)}function f(e){return i++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:a}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):dte(n)?(e.consume(n),g(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let a,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(a){s=t.events[l][1].end;break}a=!0}for(y(i),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;Kee(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let a=n.length;for(;a-- >r;){const r=n[a];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),a=void 0,r=void 0,t.containerState._closeFlow=void 0}}},xte={tokenize:function(e,t,n){return bte(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function wte(e){return null===e||pte(e)||mte(e)?1:hte(e)?2:void 0}function Ete(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const _te={name:"attention",resolveAll:function(e,t){let n,r,a,o,i,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};Ste(d,-s),Ste(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},i={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},a={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...o.start},end:{...i.end}},e[n][1].end={...o.start},e[u][1].start={...i.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Xee(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Xee(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=Xee(l,Ete(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=Xee(l,[["exit",a,t],["enter",i,t],["exit",i,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=Xee(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,Kee(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=wte(r);let o;return function(t){return o=t,e.enter("attentionSequence"),i(t)};function i(s){if(s===o)return e.consume(s),i;const l=e.exit("attentionSequence"),c=wte(s),u=!c||2===c&&a||n.includes(s),d=!a||2===a&&c||n.includes(r);return l._open=Boolean(42===o?u:u&&(a||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function Ste(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Tte={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a};function a(t){return ate(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||ote(e)?(r=1,i(e)):l(e)}function i(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||ote(t))&&r++<32?(e.consume(t),i):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||ste(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):ite(t)?(e.consume(t),l):n(t)}function c(e){return ote(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||ote(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Cte={partial:!0,tokenize:function(e,t,n){return function(t){return fte(t)?bte(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||dte(e)?t(e):n(e)}}};const Ate={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(fte(t))return bte(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return a(t)};function a(r){return e.attempt(Ate,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),a}return n(t)};function a(n){return fte(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Nte={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return ute(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Ite={name:"characterReference",tokenize:function(e,t,n){const r=this;let a,o,i=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=ote,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=cte,c):(e.enter("characterReferenceValue"),a=7,o=lte,c(t))}function c(s){if(59===s&&i){const a=e.exit("characterReferenceValue");return o!==ote||Zee(r.sliceSerialize(a))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&i++<a?(e.consume(s),c):n(s)}}};const Ote={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},Rte={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return i;function i(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),fte(t)?bte(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===o?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===o?(a++,e.consume(t),u):a>=s?(e.exit("codeFencedFenceSequence"),fte(t)?bte(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||dte(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,i=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return i=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),fte(t)?bte(e,c,"whitespace")(t):c(t))}function c(n){return null===n||dte(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Ote,f,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||dte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):fte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),bte(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||dte(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||dte(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function f(t){return e.attempt(a,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return i>0&&fte(t)?bte(e,g,"linePrefix",i+1)(t):g(t)}function g(t){return null===t||dte(t)?e.check(Ote,f,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||dte(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const Pte={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),bte(e,a,"linePrefix",5)(t)};function a(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):dte(t)?e.attempt(Lte,o,s)(t):(e.enter("codeFlowValue"),i(t))}function i(t){return null===t||dte(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),i)}function s(n){return e.exit("codeIndented"),t(n)}}},Lte={partial:!0,tokenize:function(e,t,n){const r=this;return a;function a(t){return r.parser.lazy[r.now().line]?n(t):dte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a):bte(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):dte(e)?a(e):n(e)}}};const Dte={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,a=3;if(!("lineEnding"!==e[a][1].type&&"space"!==e[a][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=a;++t<r;)if("codeTextData"===e[t][1].type){e[a][1].type="codeTextPadding",e[r][1].type="codeTextPadding",a+=2,r-=2;break}t=a-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,a,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),i(t)};function i(t){return 96===t?(e.consume(t),o++,i):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(a=e.enter("codeTextSequence"),r=0,c(t)):dte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||dte(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(a.type="codeTextData",l(n))}}};class Mte{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Fte(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Fte(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Fte(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Fte(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Fte(this.left,t.reverse())}}}function Fte(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 jte(e){const t={};let n,r,a,o,i,s,l,c=-1;const u=new Mte(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,a=0,a<s.length&&"lineEndingBlank"===s[a][1].type&&(a+=2),a<s.length&&"content"===s[a][1].type))for(;++a<s.length&&"content"!==s[a][1].type;)"chunkText"===s[a][1].type&&(s[a][1]._isInFirstContentOfListItem=!0,a++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,zte(u,c)),c=t[c],l=!0);else if(n[1]._container){for(a=c,r=void 0;a--;)if(o=u.get(a),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=a);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},i=u.slice(r,c),i.unshift(n),u.splice(r,c-r+1,i))}}return Kee(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function zte(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const o=[];let i=n._tokenizer;i||(i=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++a)[1]!==f;);o.push(a),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(u),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const Bte={resolve:function(e){return jte(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?a(t):dte(t)?e.check(Hte,o,a)(t):(e.consume(t),r)}function a(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Hte={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),bte(e,a,"linePrefix")};function a(a){if(null===a||dte(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}};function Ute(e,t,n,r,a,o,i,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(a),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||ste(t))return n(t);return e.enter(r),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(a),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||dte(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(a){return u||null!==a&&41!==a&&!pte(a)?u<c&&40===a?(e.consume(a),u++,h):41===a?(e.consume(a),u--,h):null===a||32===a||40===a||ste(a)?n(a):(e.consume(a),92===a?m:h):(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(r),t(a))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function $te(e,t,n,r,a,o){const i=this;let s,l=0;return function(t){return e.enter(r),e.enter(a),e.consume(t),e.exit(a),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in i.parser.constructs?n(d):93===d?(e.exit(o),e.enter(a),e.consume(d),e.exit(a),e.exit(r),t):dte(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||dte(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!fte(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Vte(e,t,n,r,a,o){let i;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(a),e.consume(t),e.exit(a),i=40===t?41:t,s;return n(t)};function s(n){return n===i?(e.enter(a),e.consume(n),e.exit(a),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===i?(e.exit(o),s(i)):null===t?n(t):dte(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),bte(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===i||null===t||dte(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===i||92===t?(e.consume(t),c):c(t)}}function Gte(e,t){let n;return function r(a){if(dte(a))return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r;if(fte(a))return bte(e,r,n?"linePrefix":"lineSuffix")(a);return t(a)}}const qte={name:"definition",tokenize:function(e,t,n){const r=this;let a;return function(t){return e.enter("definition"),function(t){return $te.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return a=rte(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i):n(t)}function i(t){return pte(t)?Gte(e,s)(t):s(t)}function s(t){return Ute(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Wte,c,c)(t)}function c(t){return fte(t)?bte(e,u,"whitespace")(t):u(t)}function u(o){return null===o||dte(o)?(e.exit("definition"),r.parser.defined.push(a),t(o)):n(o)}}},Wte={partial:!0,tokenize:function(e,t,n){return function(t){return pte(t)?Gte(e,r)(t):n(t)};function r(t){return Vte(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function a(t){return fte(t)?bte(e,o,"whitespace")(t):o(t)}function o(e){return null===e||dte(e)?t(e):n(e)}}};const Yte={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return dte(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Zte={name:"headingAtx",resolve:function(e,t){let n,r,a=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);a-2>o&&"whitespace"===e[a][1].type&&(a-=2);"atxHeadingSequence"===e[a][1].type&&(o===a-1||a-4>o&&"whitespace"===e[a-2][1].type)&&(a-=o+1===a?2:4);a>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[a][1].end},r={type:"chunkText",start:e[o][1].start,end:e[a][1].end,contentType:"text"},Kee(e,o,a-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),a(t)}(t)};function a(t){return 35===t&&r++<6?(e.consume(t),a):null===t||pte(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),i(n)):null===n||dte(n)?(e.exit("atxHeading"),t(n)):fte(n)?bte(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function i(t){return 35===t?(e.consume(t),i):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||pte(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};const Kte=["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"],Xte=["pre","script","style","textarea"],Qte={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let a,o,i,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,f):63===s?(e.consume(s),a=3,r.interrupt?t:L):ate(s)?(e.consume(s),i=String.fromCharCode(s),h):n(s)}function u(o){return 45===o?(e.consume(o),a=2,d):91===o?(e.consume(o),a=5,s=0,p):ate(o)?(e.consume(o),a=4,r.interrupt?t:L):n(o)}function d(a){return 45===a?(e.consume(a),r.interrupt?t:L):n(a)}function p(a){const o="CDATA[";return a===o.charCodeAt(s++)?(e.consume(a),6===s?r.interrupt?t:T:p):n(a)}function f(t){return ate(t)?(e.consume(t),i=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||pte(s)){const l=47===s,c=i.toLowerCase();return l||o||!Xte.includes(c)?Kte.includes(i.toLowerCase())?(a=6,l?(e.consume(s),m):r.interrupt?t(s):T(s)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?g(s):y(s)):(a=1,r.interrupt?t(s):T(s))}return 45===s||ote(s)?(e.consume(s),i+=String.fromCharCode(s),h):n(s)}function m(a){return 62===a?(e.consume(a),r.interrupt?t:T):n(a)}function g(t){return fte(t)?(e.consume(t),g):_(t)}function y(t){return 47===t?(e.consume(t),_):58===t||95===t||ate(t)?(e.consume(t),b):fte(t)?(e.consume(t),y):_(t)}function b(t){return 45===t||46===t||58===t||95===t||ote(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),k):fte(t)?(e.consume(t),v):y(t)}function k(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):fte(t)?(e.consume(t),k):w(t)}function x(t){return t===l?(e.consume(t),l=null,E):null===t||dte(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||pte(t)?v(t):(e.consume(t),w)}function E(e){return 47===e||62===e||fte(e)?y(e):n(e)}function _(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||dte(t)?T(t):fte(t)?(e.consume(t),S):n(t)}function T(t){return 45===t&&2===a?(e.consume(t),I):60===t&&1===a?(e.consume(t),O):62===t&&4===a?(e.consume(t),D):63===t&&3===a?(e.consume(t),L):93===t&&5===a?(e.consume(t),P):!dte(t)||6!==a&&7!==a?null===t||dte(t)?(e.exit("htmlFlowData"),C(t)):(e.consume(t),T):(e.exit("htmlFlowData"),e.check(Jte,M,C)(t))}function C(t){return e.check(ene,A,M)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||dte(t)?C(t):(e.enter("htmlFlowData"),T(t))}function I(t){return 45===t?(e.consume(t),L):T(t)}function O(t){return 47===t?(e.consume(t),i="",R):T(t)}function R(t){if(62===t){const n=i.toLowerCase();return Xte.includes(n)?(e.consume(t),D):T(t)}return ate(t)&&i.length<8?(e.consume(t),i+=String.fromCharCode(t),R):T(t)}function P(t){return 93===t?(e.consume(t),L):T(t)}function L(t){return 62===t?(e.consume(t),D):45===t&&2===a?(e.consume(t),L):T(t)}function D(t){return null===t||dte(t)?(e.exit("htmlFlowData"),M(t)):(e.consume(t),D)}function M(n){return e.exit("htmlFlow"),t(n)}}},Jte={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Cte,t,n)}}},ene={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(dte(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a;return n(t)};function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const tne={name:"htmlText",tokenize:function(e,t,n){const r=this;let a,o,i;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),k):63===t?(e.consume(t),b):ate(t)?(e.consume(t),E):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,f):ate(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):dte(t)?(i=u,R(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?O(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):dte(t)?(i=h,R(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?O(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?O(t):dte(t)?(i=y,R(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):dte(t)?(i=b,R(t)):(e.consume(t),b)}function v(e){return 62===e?O(e):b(e)}function k(t){return ate(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||ote(t)?(e.consume(t),x):w(t)}function w(t){return dte(t)?(i=w,R(t)):fte(t)?(e.consume(t),w):O(t)}function E(t){return 45===t||ote(t)?(e.consume(t),E):47===t||62===t||pte(t)?_(t):n(t)}function _(t){return 47===t?(e.consume(t),O):58===t||95===t||ate(t)?(e.consume(t),S):dte(t)?(i=_,R(t)):fte(t)?(e.consume(t),_):O(t)}function S(t){return 45===t||46===t||58===t||95===t||ote(t)?(e.consume(t),S):T(t)}function T(t){return 61===t?(e.consume(t),C):dte(t)?(i=T,R(t)):fte(t)?(e.consume(t),T):_(t)}function C(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),a=t,A):dte(t)?(i=C,R(t)):fte(t)?(e.consume(t),C):(e.consume(t),N)}function A(t){return t===a?(e.consume(t),a=void 0,I):null===t?n(t):dte(t)?(i=A,R(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||pte(t)?_(t):(e.consume(t),N)}function I(e){return 47===e||62===e||pte(e)?_(e):n(e)}function O(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function R(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return fte(t)?bte(e,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),i(t)}}};const nne={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&Kee(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,a,o,i=e.length,s=0;for(;i--;)if(n=e[i][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[i][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(a){if("enter"===e[i][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=i,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(a=i);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[a][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Xee(o,e.slice(r+1,r+s+3)),o=Xee(o,[["enter",u,t]]),o=Xee(o,Ete(t.parser.constructs.insideSpan.null,e.slice(r+s+4,a-3),t)),o=Xee(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=Xee(o,e.slice(a+1)),o=Xee(o,[["exit",l,t]]),Kee(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let a,o,i=r.events.length;for(;i--;)if(("labelImage"===r.events[i][1].type||"labelLink"===r.events[i][1].type)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return function(t){if(!a)return n(t);if(a._inactive)return u(t);return o=r.parser.defined.includes(rte(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(rne,c,o?c:u)(t):91===t?e.attempt(ane,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(one,c,u)(t)}function c(e){return t(e)}function u(e){return a._balanced=!0,n(e)}}},rne={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return pte(t)?Gte(e,a)(t):a(t)}function a(t){return 41===t?c(t):Ute(e,o,i,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return pte(t)?Gte(e,s)(t):c(t)}function i(e){return n(e)}function s(t){return 34===t||39===t||40===t?Vte(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return pte(t)?Gte(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},ane={tokenize:function(e,t,n){const r=this;return function(t){return $te.call(r,e,a,o,"reference","referenceMarker","referenceString")(t)};function a(e){return r.parser.defined.includes(rte(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},one={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const ine={name:"labelStartImage",resolveAll:nne.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),a};function a(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const sne={name:"labelStartLink",resolveAll:nne.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),a};function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const lne={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),bte(e,t,"linePrefix")}}};const cne={name:"thematicBreak",tokenize:function(e,t,n){let r,a=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),i(o)):a>=3&&(null===o||dte(o))?(e.exit("thematicBreak"),t(o)):n(o)}function i(t){return t===r?(e.consume(t),a++,i):(e.exit("thematicBreakSequence"),fte(t)?bte(e,o,"whitespace")(t):o(t))}}};const une={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Cte,(function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,bte(e,t,"listItemIndent",r.containerState.size+1)(n)}),(function(n){if(r.containerState.furtherBlankLines||!fte(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(pne,t,a)(n)}));function a(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,bte(e,e.attempt(une,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,a=r.events[r.events.length-1];let o=a&&"linePrefix"===a[1].type?a[2].sliceSerialize(a[1],!0).length:0,i=0;return function(t){const a=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===a?!r.containerState.marker||t===r.containerState.marker:lte(t)){if(r.containerState.type||(r.containerState.type=a,e.enter(a,{_container:!0})),"listUnordered"===a)return e.enter("listItemPrefix"),42===t||45===t?e.check(cne,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return lte(t)&&++i<10?(e.consume(t),s):(!r.interrupt||i<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Cte,r.interrupt?n:c,e.attempt(dne,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return fte(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},dne={partial:!0,tokenize:function(e,t,n){const r=this;return bte(e,(function(e){const a=r.events[r.events.length-1];return!fte(e)&&a&&"listItemPrefixWhitespace"===a[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},pne={partial:!0,tokenize:function(e,t,n){const r=this;return bte(e,(function(e){const a=r.events[r.events.length-1];return a&&"listItemIndent"===a[1].type&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const fne={name:"setextUnderline",resolveTo:function(e,t){let n,r,a,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),a||"definition"!==e[o][1].type||(a=o);const i={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",a?(e.splice(r,0,["enter",i,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=i;return e.push(["exit",i,t]),e},tokenize:function(e,t,n){const r=this;let a;return function(t){let i,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){i="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||i))return e.enter("setextHeadingLine"),a=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===a?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),fte(t)?bte(e,i,"lineSuffix")(t):i(t))}function i(r){return null===r||dte(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const hne={tokenize:function(e){const t=this,n=e.attempt(Cte,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,bte(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Bte,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const mne={resolveAll:vne()},gne=bne("string"),yne=bne("text");function bne(e){return{resolveAll:vne("text"===e?kne:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],a=t.attempt(r,o,i);return o;function o(e){return l(e)?a(e):i(e)}function i(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),a(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let a=-1;if(t)for(;++a<t.length;){const e=t[a];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function vne(e){return function(t,n){let r,a=-1;for(;++a<=t.length;)void 0===r?t[a]&&"data"===t[a][1].type&&(r=a,a++):t[a]&&"data"===t[a][1].type||(a!==r+2&&(t[r][1].end=t[a-1][1].end,t.splice(r+2,a-r-2),a=r+2),r=void 0);return e?e(t,n):t}}function kne(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],a=t.sliceStream(r);let o,i=a.length,s=-1,l=0;for(;i--;){const e=a[i];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const a={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...a.start},r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}const xne={42:une,43:une,45:une,48:une,49:une,50:une,51:une,52:une,53:une,54:une,55:une,56:une,57:une,62:Ate},wne={91:qte},Ene={[-2]:Pte,[-1]:Pte,32:Pte},_ne={35:Zte,42:cne,45:[fne,cne],60:Qte,61:fne,95:cne,96:Rte,126:Rte},Sne={38:Ite,92:Nte},Tne={[-5]:lne,[-4]:lne,[-3]:lne,33:ine,38:Ite,42:_te,60:[Tte,tne],91:sne,92:[Yte,Nte],93:nne,95:_te,96:Dte},Cne={null:[_te,mne]},Ane=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:wne,disable:{null:[]},document:xne,flow:_ne,flowInitial:Ene,insideSpan:Cne,string:Sne,text:Tne},Symbol.toStringTag,{value:"Module"}));function Nne(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 a={},o=[];let i=[],s=[];const l={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){dte(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){a[e.line]=e.column,b()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const o=e[n];let i;if("string"==typeof o)i=o;else switch(o){case-5:i="\r";break;case-4:i="\n";break;case-3:i="\r\n";break;case-2:i=t?" ":"\t";break;case-1:if(!t&&a)continue;i=" ";break;default:i=String.fromCharCode(o)}a=-2===o,r.push(i)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(i=Xee(i,e),f(),null!==i[i.length-1])return[];return y(t,0),c.events=Ete(o,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let i;if(n===a)i=[e[n].slice(r,o)];else{if(i=e.slice(n,a),r>-1){const e=i[0];"string"==typeof e?i[0]=e.slice(r):i.shift()}o>0&&i.push(e[a].slice(0,o))}return i}(i,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:a,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:a,offset:o}}function f(){let e;for(;r._index<i.length;){const t=i[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,a,o){let i,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return i=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,a=c.events.length,o=Array.from(s);return{from:a,restore:i};function i(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=a,s=o,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,f),a}function y(e){return f.restore(),++u<i.length?m(i[u]):o}}}function y(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&Kee(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}const Ine=/[\0\t\n\r]/g;const One=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Rne(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return nte(n.slice(t?2:1),t?16:10)}return Zee(n)||e}const Pne={}.hasOwnProperty;function Lne(e,t,n){return t&&"object"==typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:o(X),blockQuote:o(q),characterEscape:S,characterReference:S,codeFenced:o(W),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(W,i),codeText:o(Y,i),codeTextData:S,data:S,codeFlowValue:S,definition:o(Z),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(K),hardBreakEscape:o(Q),hardBreakTrailing:o(Q),htmlFlow:o(J,i),htmlFlowData:S,htmlText:o(J,i),htmlTextData:S,image:o(ee),label:i,link:o(te),listItem:o(re),listItemValue:p,listOrdered:o(ne,d),listUnordered:o(ne),paragraph:o(ae),reference:z,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(X),strong:o(oe),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:G,autolinkProtocol:V,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:H,characterReferenceMarkerNumeric:H,characterReferenceValue:U,characterReference:$,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:T,codeIndented:l(y),codeText:l(O),codeTextData:T,data:T,definition:l(),definitionDestinationString:k,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:T,htmlText:l(I),htmlTextData:T,image:l(P),label:D,labelText:L,lineEnding:C,link:l(R),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:B,resourceDestinationString:M,resourceTitleString:F,resource:j,setextHeading:l(_),setextHeadingLineSequence:E,setextHeadingText:w,strong:l(),thematicBreak:l()}};Mne(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:i,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=a(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];Pne.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||jne).call(o,void 0,e[0])}for(r.position={start:Dne(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Dne(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function a(e,t,n){let r,a,o,i,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,i=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||i||l||o||(o=s),i=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:i=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let i=s;for(a=void 0;i--;){const t=e[i];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;a&&(e[a][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",a=i}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!a||o<a)&&(r._spread=!0),r.end=Object.assign({},a?e[a][1].start:t[1].end),e.splice(a||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const a={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=a,e.splice(s,0,["enter",a,t[2]]),s++,n++,o=void 0,i=!0}}}return e[t][1]._spread=c,n}function o(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Dne(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+wee({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||jne).call(this,e,r[0])}n.position.end=Dne(e.end)}function u(){return Gee(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rte(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function k(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function E(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ie(),n.position={start:Dne(e.start),end:void 0},t.push(n)),this.stack.push(n)}function T(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Dne(e.end)}function C(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=Dne(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),T.call(this,e))}function A(){this.data.atHardBreak=!0}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function I(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function L(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(One,Rne)}(t),n.identifier=rte(t).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function M(){const e=this.resume();this.stack[this.stack.length-1].url=e}function F(){const e=this.resume();this.stack[this.stack.length-1].title=e}function j(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function B(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rte(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function H(e){this.data.characterReferenceType=e.type}function U(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=nte(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=Zee(t)}this.stack[this.stack.length-1].value+=r}function $(e){this.stack.pop().position.end=Dne(e.end)}function V(e){T.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function G(e){T.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function q(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function K(){return{type:"emphasis",children:[]}}function X(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function J(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ae(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!jte(e););return e}(function(e){const t={constructs:Jee([Ane,...(e||{}).extensions||[]]),content:n(vte),defined:[],document:n(kte),flow:n(hne),lazy:{},string:n(gne),text:n(yne)};return t;function n(e){return function(n){return Nne(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(a,o,i){const s=[];let l,c,u,d,p;for(a=n+("string"==typeof a?a.toString():new TextDecoder(o||void 0).decode(a)),u=0,n="",r&&(65279===a.charCodeAt(0)&&u++,r=void 0);u<a.length;){if(Ine.lastIndex=u,l=Ine.exec(a),d=l&&void 0!==l.index?l.index:a.length,p=a.charCodeAt(d),!l){n=a.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(a.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return i&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function Dne(e){return{line:e.line,column:e.column,offset:e.offset}}function Mne(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Mne(e,r):Fne(e,r)}}function Fne(e,t){let n;for(n in t)if(Pne.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 jne(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+wee({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+wee({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+wee({start:t.start,end:t.end})+") is still open")}function zne(e){const t=this;t.parser=function(n){return Lne(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Bne(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),o=a[0];o&&"text"===o.type?o.value="["+o.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&"text"===i.type?i.value+=r:a.push({type:"text",value:r}),a}function Hne(e){const t=e.spread;return null==t?e.children.length>1:t}function Une(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const o=[];for(;r;)o.push($ne(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return o.push($ne(t.slice(a),a>0,!1)),o.join("")}function $ne(e,t,n){let r=0,a=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(a-1);for(;9===t||32===t;)a--,t=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}const Vne={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);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},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=yte(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Bne(e,t);const a={src:yte(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:yte(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Bne(e,t);const a={href:yte(r.url||"")};null!==r.title&&void 0!==r.title&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:yte(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),a=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Hne(n[r])}return t}(n):Hne(t),o={},i=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(a||0!==s||"element"!==e.type||"p"!==e.tagName)&&i.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||a?i.push(e):i.push(...e.children)}const l=r[r.length-1];l&&(a||"element"!==l.type||"p"!==l.tagName)&&i.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let a=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++a<r.length;){const e=r[a];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),a.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=kee(t.children[1]),i=vee(t.children[t.children.length-1]);o&&i&&(r.position={start:o,end:i}),a.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,a=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,i=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<i;){const n=t.children[s],r={},i=o?o[s]:void 0;i&&(r.align=i);let c={type:"element",tagName:a,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:Une(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:Gne,yaml:Gne,definition:Gne,footnoteDefinition:Gne};function Gne(){}const qne="object"==typeof self?self:globalThis,Wne=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=a=>{if(e.has(a))return e.get(a);const[o,i]=t[a];switch(o){case 0:case-1:return n(i,a);case 1:{const e=n([],a);for(const t of i)e.push(r(t));return e}case 2:{const e=n({},a);for(const[t,n]of i)e[r(t)]=r(n);return e}case 3:return n(new Date(i),a);case 4:{const{source:e,flags:t}=i;return n(new RegExp(e,t),a)}case 5:{const e=n(new Map,a);for(const[t,n]of i)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,a);for(const t of i)e.add(r(t));return e}case 7:{const{name:e,message:t}=i;return n(new qne[e](t),a)}case 8:return n(BigInt(i),a);case"BigInt":return n(Object(BigInt(i)),a);case"ArrayBuffer":return n(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:e}=new Uint8Array(i);return n(new DataView(e),i)}}return n(new qne[o](i),a)};return r})(new Map,e)(0),Yne="",{toString:Zne}={},{keys:Kne}=Object,Xne=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=Zne.call(e).slice(8,-1);switch(n){case"Array":return[1,Yne];case"Object":return[2,Yne];case"Date":return[3,Yne];case"RegExp":return[4,Yne];case"Map":return[5,Yne];case"Set":return[6,Yne];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Qne=([e,t])=>0===e&&("function"===t||"symbol"===t),Jne=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const a=(e,t)=>{const a=r.push(e)-1;return n.set(t,a),a},o=r=>{if(n.has(r))return n.get(r);let[i,s]=Xne(r);switch(i){case 0:{let t=r;switch(s){case"bigint":i=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return a([-1],r)}return a([i,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),a([s,[...e]],r)}const e=[],t=a([i,e],r);for(const n of r)e.push(o(n));return t}case 2:{if(s)switch(s){case"BigInt":return a([s,r.toString()],r);case"Boolean":case"Number":case"String":return a([s,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],l=a([i,n],r);for(const t of Kne(r))!e&&Qne(Xne(r[t]))||n.push([o(t),o(r[t])]);return l}case 3:return a([i,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return a([i,{source:e,flags:t}],r)}case 5:{const t=[],n=a([i,t],r);for(const[a,i]of r)(e||!Qne(Xne(a))&&!Qne(Xne(i)))&&t.push([o(a),o(i)]);return n}case 6:{const t=[],n=a([i,t],r);for(const a of r)!e&&Qne(Xne(a))||t.push(o(a));return n}}const{message:l}=r;return a([i,{name:s,message:l}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},ere="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?Wne(Jne(e,t)):structuredClone(e):(e,t)=>Wne(Jne(e,t));function tre(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 nre(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const rre=function(e){if(null==e)return ore;if("function"==typeof e)return are(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rre(e[n]);return are(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return are(n);function n(n){const r=n;let a;for(a in e)if(r[a]!==t[a])return!1;return!0}}(e);if("string"==typeof e)return function(e){return are(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function are(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function ore(){return!0}const ire=[],sre=!0,lre=!1;function cre(e,t,n,r){let a;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):a=t;const o=rre(a),i=r?-1:1;!function e(a,s,l){const c=a&&"object"==typeof a?a:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+a.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=ire;if((!t||o(a,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[sre,e];return null==e?ire:[e]}(n(a,l)),p[0]===lre))return p;if("children"in a&&a.children){const t=a;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+i,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===lre)return c;u="number"==typeof c[1]?c[1]:u+i}}return p}}(e,void 0,[])()}function ure(e,t,n,r){let a,o,i;"function"==typeof t&&"function"!=typeof n?(o=void 0,i=t,a=n):(o=t,i=n,a=r),cre(e,o,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return i(e,r,n)}),a)}const dre={}.hasOwnProperty,pre={};function fre(e,t){e.position&&(t.position=function(e){const t=kee(e),n=vee(e);if(t&&n)return{start:t,end:n}}(e))}function hre(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,a=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&a&&Object.assign(n.properties,ere(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function mre(e,t){const n=t.data||{},r=!("value"in t)||dre.call(n,"hProperties")||dre.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function gre(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function yre(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function bre(e,t){const n=function(e,t){const n=t||pre,r=new Map,a=new Map,o=new Map,i={...Vne,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const a=s.one(n[r],e);if(a){if(r&&"break"===n[r-1].type&&(Array.isArray(a)||"text"!==a.type||(a.value=yre(a.value)),!Array.isArray(a)&&"element"===a.type)){const e=a.children[0];e&&"text"===e.type&&(e.value=yre(e.value))}Array.isArray(a)?t.push(...a):t.push(a)}}}return t},applyData:hre,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:function(e,t){const n=e.type,r=s.handlers[n];if(dre.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=ere(n);return r.children=s.all(e),r}return ere(e)}return(s.options.unknownHandler||mre)(s,e,t)},options:n,patch:fre,wrap:gre};return ure(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),a=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||tre,r=e.options.footnoteBackLabel||nre,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const a=e.footnoteById.get(e.footnoteOrder[l]);if(!a)continue;const o=e.all(a),i=String(a.identifier).toUpperCase(),c=yte(i.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(i);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=o[o.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else o.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(a,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ere(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&o.children.push({type:"text",value:"\n"},a),o}function vre(e,t){return e&&"run"in e?async function(n,r){const a=bre(n,{file:r,...t});await e.run(a,r)}:function(n,r){return bre(n,{file:r,...e||t})}}function kre(e){if(e)throw e}var xre=Object.prototype.hasOwnProperty,wre=Object.prototype.toString,Ere=Object.defineProperty,_re=Object.getOwnPropertyDescriptor,Sre=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===wre.call(e)},Tre=function(e){if(!e||"[object Object]"!==wre.call(e))return!1;var t,n=xre.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&xre.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||xre.call(e,t)},Cre=function(e,t){Ere&&"__proto__"===t.name?Ere(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Are=function(e,t){if("__proto__"===t){if(!xre.call(e,t))return;if(_re)return _re(e,t).value}return e[t]},Nre=function e(){var t,n,r,a,o,i,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=Are(s,n),s!==(a=Are(t,n))&&(u&&a&&(Tre(a)||(o=Sre(a)))?(o?(o=!1,i=r&&Sre(r)?r:[]):i=r&&Tre(r)?r:{},Cre(s,{name:n,newValue:e(u,i,a)})):void 0!==a&&Cre(s,{name:n,newValue:a}));return s};const Ire=l(Nre);function Ore(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Rre(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function a(o,...i){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==i[l]&&void 0!==i[l]||(i[l]=t[l]);t=i,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(a);try{s=e.apply(this,t)}catch(o){if(r&&n)throw o;return a(o)}r||(s&&s.then&&"function"==typeof s.then?s.then(i,a):s instanceof Error?a(s):i(s))}function a(e,...r){n||(n=!0,t(e,...r))}function i(e){a(null,e)}}(s,a)(...i):r(null,...i)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const Pre={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');Lre(e);let n,r=0,a=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1);return a<0?"":e.slice(r,a)}if(t===e)return"";let i=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(a=o):(s=-1,a=i));r===a?a=i:a<0&&(a=e.length);return e.slice(r,a)},dirname:function(e){if(Lre(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){Lre(e);let t,n=e.length,r=-1,a=0,o=-1,i=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==i&&(i=1):o>-1&&(i=-1);else if(t){a=n+1;break}}if(o<0||r<0||0===i||1===i&&o===r-1&&o===a+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)Lre(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){Lre(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,a="",o=0,i=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(i===l-1||1===s);else if(i!==l-1&&2===s){if(a.length<2||2!==o||46!==a.codePointAt(a.length-1)||46!==a.codePointAt(a.length-2))if(a.length>2){if(r=a.lastIndexOf("/"),r!==a.length-1){r<0?(a="",o=0):(a=a.slice(0,r),o=a.length-1-a.lastIndexOf("/")),i=l,s=0;continue}}else if(a.length>0){a="",o=0,i=l,s=0;continue}t&&(a=a.length>0?a+"/..":"..",o=2)}else a.length>0?a+="/"+e.slice(i+1,l):a=e.slice(i+1,l),o=l-i-1;i=l,s=0}else 46===n&&s>-1?s++:s=-1}return a}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function Lre(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Dre={cwd:function(){return"/"}};function Mre(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function Fre(e){if("string"==typeof e)e=new URL(e);else if(!Mre(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const jre=["history","path","basename","stem","extname","dirname"];class zre{constructor(e){let t;t=e?Mre(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":Dre.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<jre.length;){const e=jre[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)jre.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?Pre.basename(this.path):void 0}set basename(e){Hre(e,"basename"),Bre(e,"basename"),this.path=Pre.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?Pre.dirname(this.path):void 0}set dirname(e){Ure(this.basename,"dirname"),this.path=Pre.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?Pre.extname(this.path):void 0}set extname(e){if(Bre(e,"extname"),Ure(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Pre.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Mre(e)&&(e=Fre(e)),Hre(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?Pre.basename(this.path,this.extname):void 0}set stem(e){Hre(e,"stem"),Bre(e,"stem"),this.path=Pre.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new Tee(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function Bre(e,t){if(e&&e.includes(Pre.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Pre.sep+"`")}function Hre(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ure(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const $re=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},Vre={}.hasOwnProperty;class Gre extends $re{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=Rre()}copy(){const e=new Gre;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(Ire(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(Zre("data",this.frozen),this.namespace[e]=t,this):Vre.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Zre("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=Qre(e),n=this.parser||this.Parser;return Wre("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),Wre("process",this.parser||this.Parser),Yre("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,a){const o=Qre(e),i=n.parse(o);function s(e,n){e||!n?a(e):r?r(n):t(void 0,n)}n.run(i,o,(function(e,t,r){if(e||!t||!r)return s(e);const a=t,o=n.stringify(a,r);var i;"string"==typeof(i=o)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(i)?r.value=o:r.result=o,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),Wre("processSync",this.parser||this.Parser),Yre("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,kre(e),t=r})),Xre("processSync","process",n),t}run(e,t,n){Kre(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?a(void 0,n):new Promise(a);function a(a,o){const i=Qre(t);r.run(e,i,(function(t,r,i){const s=r||e;t?o(t):a?a(s):n(void 0,s,i)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){kre(e),n=t,r=!0})),Xre("runSync","run",r),n}stringify(e,t){this.freeze();const n=Qre(t),r=this.compiler||this.Compiler;return Yre("stringify",r),Kre(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(Zre("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?i(e):o(e)}return this;function a(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))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");i(e.plugins),e.settings&&(r.settings=Ire(!0,r.settings,e.settings))}function i(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){a(e[t])}}}function s(e,t){let r=-1,a=-1;for(;++r<n.length;)if(n[r][0]===e){a=r;break}if(-1===a)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const i=n[a][1];Ore(i)&&Ore(r)&&(r=Ire(!0,i,r)),n[a]=[e,r,...o]}}}}const qre=(new Gre).freeze();function Wre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function Yre(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function Zre(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 Kre(e){if(!Ore(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function Xre(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qre(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new zre(e)}const Jre=[],eae={allowDangerousHtml:!0},tae=/^(https?|ircs?|mailto|xmpp)$/i,nae=[{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:"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 rae(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",a=e.className,o=e.components,i=e.disallowedElements,s=e.rehypePlugins||Jre,l=e.remarkPlugins||Jre,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...eae}:eae,u=e.skipHtml,d=e.unwrapDisallowed,p=e.urlTransform||aae,f=qre().use(zne).use(l).use(vre,c).use(s),h=new zre;"string"==typeof r&&(h.value=r);for(const y of nae)Object.hasOwn(e,y.from)&&(y.from,y.to&&y.to,y.id);const m=f.parse(h);let g=f.runSync(m,h);return a&&(g={type:"element",tagName:"div",properties:{className:a},children:"root"===g.type?g.children:[g]}),ure(g,(function(e,r,a){if("raw"===e.type&&a&&"number"==typeof r)return u?a.children.splice(r,1):a.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in $ee)if(Object.hasOwn($ee,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=$ee[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=p(String(n||""),t,e))}}if("element"===e.type){let o=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!o&&n&&"number"==typeof r&&(o=!n(e,r,a)),o&&a&&"number"==typeof r)return d&&e.children?a.children.splice(r,1,...e.children):a.children.splice(r,1),r}})),Pee(g,{Fragment:og.Fragment,components:o,ignoreInvalidStyle:!0,jsx:og.jsx,jsxs:og.jsxs,passKeys:!0,passNode:!0})}function aae(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return-1===t||-1!==a&&t>a||-1!==n&&t>n||-1!==r&&t>r||tae.test(e.slice(0,t))?e:""}const oae=/[#.]/g;function iae(e,t,n){const r=n?function(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,a,...o){let i;if(null==n){i={type:"root",children:[]};const e=a;o.unshift(e)}else{i=function(e,t){const n=e||"",r={};let a,o,i=0;for(;i<n.length;){oae.lastIndex=i;const e=oae.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?"#"===a?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:"element",tagName:o||t||"div",properties:r,children:[]}}(n,t);const s=i.tagName.toLowerCase(),l=r?r.get(s):void 0;if(i.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;const t=e,n=Object.keys(e);for(const r of n){const e=t[r];if(e&&"object"==typeof e){if(!Array.isArray(e))return!0;const t=e;for(const e of t)if("number"!=typeof e&&"string"!=typeof e)return!0}}if("children"in e&&Array.isArray(e.children))return!0;return!1}(a))o.unshift(a);else for(const[t,n]of Object.entries(a))sae(e,i.properties,t,n)}for(const e of o)lae(i.children,e);return"element"===i.type&&"template"===i.tagName&&(i.content={type:"root",children:i.children},i.children=[]),i}}function sae(e,t,n,r){const a=z7(e,n);let o;if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;o=r}else o="boolean"==typeof r?r:"string"==typeof r?a.spaceSeparated?V7(r):a.commaSeparated?t7(r):a.commaOrSpaceSeparated?V7(t7(r).join(" ")):cae(a,a.property,r):Array.isArray(r)?[...r]:"style"===a.property?function(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(o)){const e=[];for(const t of o)e.push(cae(a,a.property,t));o=e}"className"===a.property&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function lae(e,t){if(null==t);else if("number"==typeof t||"string"==typeof t)e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)lae(e,n);else{if("object"!=typeof t||!("type"in t))throw new Error("Expected node, nodes, or string, got `"+t+"`");"root"===t.type?lae(e,t.children):e.push(t)}}function cae(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||d7(n)===d7(t)))return!0}return n}const uae=iae(U7,"div"),dae=iae($7,"g",["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"]);function pae(e,t){const n=e.indexOf("\r",t),r=e.indexOf("\n",t);return-1===r?n:-1===n||n+1===r?r:n<r?n:r}const fae={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/"},hae={}.hasOwnProperty,mae=Object.prototype;function gae(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},bae(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r&&("quirks"===r.mode||"limited-quirks"===r.mode);if(n={type:"root",children:yae(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const t=String(e.file),r=function(e){const t=String(e),n=[];return{toOffset:function(e){if(e&&"number"==typeof e.line&&"number"==typeof e.column&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){const e=n[n.length-1],r=pae(t,e),a=-1===r?t.length+1:r+1;if(e===a)break;n.push(a)}const r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}},toPoint:function(e){if("number"==typeof e&&e>-1&&e<=t.length){let r=0;for(;;){let a=n[r];if(void 0===a){const e=pae(t,n[r-1]);a=-1===e?t.length+1:e+1,n[r]=a}if(a>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}}}(t),a=r.toPoint(0),o=r.toPoint(t.length);n.position={start:a,end:o}}return n}case"#documentType":return n={type:"doctype"},bae(e,t,n),n;case"#text":{const r=t;return n={type:"text",value:r.value},bae(e,r,n),n}default:return n=function(e,t){const n=e.schema;e.schema=t.namespaceURI===fae.svg?$7:U7;let r=-1;const a={};for(;++r<t.attrs.length;){const e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;hae.call(mae,n)||(a[n]=e.value)}const o="svg"===e.schema.space?dae:uae,i=o(t.tagName,a,yae(e,t.childNodes));if(bae(e,t,i),"template"===i.tagName){const n=t,r=n.sourceCodeLocation,a=r&&r.startTag&&vae(r.startTag),o=r&&r.endTag&&vae(r.endTag),s=gae(e,n.content);a&&o&&e.file&&(s.position={start:a.end,end:o.start}),i.content=s}return e.schema=n,i}(e,t),n}}function yae(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=gae(e,t[n]);r.push(a)}return r}function bae(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=function(e,t,n){const r=vae(n);if("element"===t.type){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const r={};let a;if(n.attrs)for(a in n.attrs)hae.call(n.attrs,a)&&(r[z7(e.schema,a).property]=vae(n.attrs[a]));n.startTag;const o=vae(n.startTag),i=n.endTag?vae(n.endTag):void 0,s={opening:o};i&&(s.closing=i),s.properties=r,t.data={position:s}}}return r}(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function vae(e){const t=kae({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=kae({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function kae(e){return e.line&&e.column?e:void 0}const xae={}.hasOwnProperty;function wae(e,t){const n=t||{};function r(t,...n){let a=r.invalid;const o=r.handlers;if(t&&xae.call(t,e)){const n=String(t[e]);a=xae.call(o,n)?o[n]:r.unknown}if(a)return a.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Eae={},_ae={}.hasOwnProperty,Sae=wae("type",{handlers:{root:function(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Cae(e.children,n,t),Aae(e,n),n},element:function(e,t){const n=t;let r=n;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===n.space&&(r=$7);const a=[];let o;if(e.properties)for(o in e.properties)if("children"!==o&&_ae.call(e.properties,o)){const t=Tae(r,o,e.properties[o]);t&&a.push(t)}const i=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:fae[i],childNodes:[],parentNode:null};s.childNodes=Cae(e.children,s,r),Aae(e,s),"template"===e.tagName&&e.content&&(s.content=function(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Cae(e.children,n,t),Aae(e,n),n}(e.content,r));return s},text:function(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Aae(e,t),t},comment:function(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Aae(e,t),t},doctype:function(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Aae(e,t),t}}});function Tae(e,t,n){const r=z7(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?n7(n):G7(n));const a={name:r.attribute,value:!0===n?"":String(n)};if(r.space&&"html"!==r.space&&"svg"!==r.space){const e=a.name.indexOf(":");e<0?a.prefix="":(a.name=a.name.slice(e+1),a.prefix=r.attribute.slice(0,e)),a.namespace=fae[r.space]}return a}function Cae(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=Sae(e[r],n);o.parentNode=t,a.push(o)}return a}function Aae(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 Nae=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],Iae=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]),Oae="�";var Rae,Pae;(Pae=Rae||(Rae={}))[Pae.EOF=-1]="EOF",Pae[Pae.NULL=0]="NULL",Pae[Pae.TABULATION=9]="TABULATION",Pae[Pae.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",Pae[Pae.LINE_FEED=10]="LINE_FEED",Pae[Pae.FORM_FEED=12]="FORM_FEED",Pae[Pae.SPACE=32]="SPACE",Pae[Pae.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",Pae[Pae.QUOTATION_MARK=34]="QUOTATION_MARK",Pae[Pae.AMPERSAND=38]="AMPERSAND",Pae[Pae.APOSTROPHE=39]="APOSTROPHE",Pae[Pae.HYPHEN_MINUS=45]="HYPHEN_MINUS",Pae[Pae.SOLIDUS=47]="SOLIDUS",Pae[Pae.DIGIT_0=48]="DIGIT_0",Pae[Pae.DIGIT_9=57]="DIGIT_9",Pae[Pae.SEMICOLON=59]="SEMICOLON",Pae[Pae.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",Pae[Pae.EQUALS_SIGN=61]="EQUALS_SIGN",Pae[Pae.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",Pae[Pae.QUESTION_MARK=63]="QUESTION_MARK",Pae[Pae.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",Pae[Pae.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",Pae[Pae.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",Pae[Pae.GRAVE_ACCENT=96]="GRAVE_ACCENT",Pae[Pae.LATIN_SMALL_A=97]="LATIN_SMALL_A",Pae[Pae.LATIN_SMALL_Z=122]="LATIN_SMALL_Z";const Lae="--",Dae="[CDATA[",Mae="doctype",Fae="script",jae="public",zae="system";function Bae(e){return e>=55296&&e<=57343}function Hae(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function Uae(e){return e>=64976&&e<=65007||Iae.has(e)}var $ae,Vae;(Vae=$ae||($ae={})).controlCharacterInInputStream="control-character-in-input-stream",Vae.noncharacterInInputStream="noncharacter-in-input-stream",Vae.surrogateInInputStream="surrogate-in-input-stream",Vae.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",Vae.endTagWithAttributes="end-tag-with-attributes",Vae.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",Vae.unexpectedSolidusInTag="unexpected-solidus-in-tag",Vae.unexpectedNullCharacter="unexpected-null-character",Vae.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",Vae.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",Vae.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",Vae.missingEndTagName="missing-end-tag-name",Vae.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",Vae.unknownNamedCharacterReference="unknown-named-character-reference",Vae.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",Vae.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",Vae.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",Vae.eofBeforeTagName="eof-before-tag-name",Vae.eofInTag="eof-in-tag",Vae.missingAttributeValue="missing-attribute-value",Vae.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",Vae.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",Vae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",Vae.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",Vae.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",Vae.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",Vae.missingDoctypePublicIdentifier="missing-doctype-public-identifier",Vae.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",Vae.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",Vae.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",Vae.cdataInHtmlContent="cdata-in-html-content",Vae.incorrectlyOpenedComment="incorrectly-opened-comment",Vae.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",Vae.eofInDoctype="eof-in-doctype",Vae.nestedComment="nested-comment",Vae.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",Vae.eofInComment="eof-in-comment",Vae.incorrectlyClosedComment="incorrectly-closed-comment",Vae.eofInCdata="eof-in-cdata",Vae.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",Vae.nullCharacterReference="null-character-reference",Vae.surrogateCharacterReference="surrogate-character-reference",Vae.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",Vae.controlCharacterReference="control-character-reference",Vae.noncharacterCharacterReference="noncharacter-character-reference",Vae.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",Vae.missingDoctypeName="missing-doctype-name",Vae.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",Vae.duplicateAttribute="duplicate-attribute",Vae.nonConformingDoctype="non-conforming-doctype",Vae.missingDoctype="missing-doctype",Vae.misplacedDoctype="misplaced-doctype",Vae.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",Vae.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",Vae.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",Vae.openElementsLeftAfterEof="open-elements-left-after-eof",Vae.abandonedHeadElementChild="abandoned-head-element-child",Vae.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",Vae.nestedNoscriptInHead="nested-noscript-in-head",Vae.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text";class Gae{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){const{line:n,col:r,offset:a}=this,o=r+t,i=a+t;return{code:e,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:i,endOffset:i}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Rae.EOF;return this._err($ae.surrogateInInputStream),e}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(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++){if((32|this.html.charCodeAt(this.pos+n))!==e.charCodeAt(n))return!1}return!0}peek(e){const t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,Rae.EOF;const n=this.html.charCodeAt(t);return n===Rae.CARRIAGE_RETURN?Rae.LINE_FEED:n}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,Rae.EOF;let e=this.html.charCodeAt(this.pos);if(e===Rae.CARRIAGE_RETURN)return this.isEol=!0,this.skipNextNewLine=!0,Rae.LINE_FEED;if(e===Rae.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine))return this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance();this.skipNextNewLine=!1,Bae(e)&&(e=this._processSurrogate(e));return null===this.handler.onParseError||e>31&&e<127||e===Rae.LINE_FEED||e===Rae.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){Hae(e)?this._err($ae.controlCharacterInInputStream):Uae(e)&&this._err($ae.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var qae,Wae;function Yae(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}(Wae=qae||(qae={}))[Wae.CHARACTER=0]="CHARACTER",Wae[Wae.NULL_CHARACTER=1]="NULL_CHARACTER",Wae[Wae.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",Wae[Wae.START_TAG=3]="START_TAG",Wae[Wae.END_TAG=4]="END_TAG",Wae[Wae.COMMENT=5]="COMMENT",Wae[Wae.DOCTYPE=6]="DOCTYPE",Wae[Wae.EOF=7]="EOF",Wae[Wae.HIBERNATION=8]="HIBERNATION";const Zae=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)))),Kae=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]]);var Xae,Qae;(Qae=Xae||(Xae={}))[Qae.NUM=35]="NUM",Qae[Qae.SEMI=59]="SEMI",Qae[Qae.EQUALS=61]="EQUALS",Qae[Qae.ZERO=48]="ZERO",Qae[Qae.NINE=57]="NINE",Qae[Qae.LOWER_A=97]="LOWER_A",Qae[Qae.LOWER_F=102]="LOWER_F",Qae[Qae.LOWER_X=120]="LOWER_X",Qae[Qae.LOWER_Z=122]="LOWER_Z",Qae[Qae.UPPER_A=65]="UPPER_A",Qae[Qae.UPPER_F=70]="UPPER_F",Qae[Qae.UPPER_Z=90]="UPPER_Z";var Jae,eoe,toe,noe,roe,aoe,ooe,ioe,soe,loe,coe,uoe,doe,poe,foe,hoe;function moe(e){return e>=Xae.ZERO&&e<=Xae.NINE}function goe(e){return e===Xae.EQUALS||function(e){return e>=Xae.UPPER_A&&e<=Xae.UPPER_Z||e>=Xae.LOWER_A&&e<=Xae.LOWER_Z||moe(e)}(e)}(eoe=Jae||(Jae={}))[eoe.VALUE_LENGTH=49152]="VALUE_LENGTH",eoe[eoe.BRANCH_LENGTH=16256]="BRANCH_LENGTH",eoe[eoe.JUMP_TABLE=127]="JUMP_TABLE",(noe=toe||(toe={}))[noe.EntityStart=0]="EntityStart",noe[noe.NumericStart=1]="NumericStart",noe[noe.NumericDecimal=2]="NumericDecimal",noe[noe.NumericHex=3]="NumericHex",noe[noe.NamedEntity=4]="NamedEntity",(aoe=roe||(roe={}))[aoe.Legacy=0]="Legacy",aoe[aoe.Strict=1]="Strict",aoe[aoe.Attribute=2]="Attribute";class yoe{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=toe.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=roe.Strict}startEntity(e){this.decodeMode=e,this.state=toe.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case toe.EntityStart:return e.charCodeAt(t)===Xae.NUM?(this.state=toe.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=toe.NamedEntity,this.stateNamedEntity(e,t));case toe.NumericStart:return this.stateNumericStart(e,t);case toe.NumericDecimal:return this.stateNumericDecimal(e,t);case toe.NumericHex:return this.stateNumericHex(e,t);case toe.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===Xae.LOWER_X?(this.state=toe.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=toe.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const a=n-t;this.result=this.result*Math.pow(r,a)+Number.parseInt(e.substr(t,a),r),this.consumed+=a}}stateNumericHex(e,t){const n=t;for(;t<e.length;){const a=e.charCodeAt(t);if(!(moe(a)||(r=a,r>=Xae.UPPER_A&&r<=Xae.UPPER_F||r>=Xae.LOWER_A&&r<=Xae.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(a,3);t+=1}var r;return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t<e.length;){const r=e.charCodeAt(t);if(!moe(r))return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2);t+=1}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return null===(n=this.errors)||void 0===n||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Xae.SEMI)this.consumed+=1;else if(this.decodeMode===roe.Strict)return 0;return this.emitCodePoint(function(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=Kae.get(e))&&void 0!==t?t:e}(this.result),this.consumed),this.errors&&(e!==Xae.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){const{decodeTree:n}=this;let r=n[this.treeIndex],a=(r&Jae.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){const o=e.charCodeAt(t);if(this.treeIndex=boe(n,r,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return 0===this.result||this.decodeMode===roe.Attribute&&(0===a||goe(o))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],a=(r&Jae.VALUE_LENGTH)>>14,0!==a){if(o===Xae.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==roe.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&Jae.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~Jae.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case toe.NamedEntity:return 0===this.result||this.decodeMode===roe.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case toe.NumericDecimal:return this.emitNumericEntity(0,2);case toe.NumericHex:return this.emitNumericEntity(0,3);case toe.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case toe.EntityStart:return 0}}}function boe(e,t,n,r){const a=(t&Jae.BRANCH_LENGTH)>>7,o=t&Jae.JUMP_TABLE;if(0===a)return 0!==o&&r===o?n:-1;if(o){const t=r-o;return t<0||t>=a?-1:e[n+t]-1}let i=n,s=i+a-1;for(;i<=s;){const t=i+s>>>1,n=e[t];if(n<r)i=t+1;else{if(!(n>r))return e[t+a];s=t-1}}return-1}(ioe=ooe||(ooe={})).HTML="http://www.w3.org/1999/xhtml",ioe.MATHML="http://www.w3.org/1998/Math/MathML",ioe.SVG="http://www.w3.org/2000/svg",ioe.XLINK="http://www.w3.org/1999/xlink",ioe.XML="http://www.w3.org/XML/1998/namespace",ioe.XMLNS="http://www.w3.org/2000/xmlns/",(loe=soe||(soe={})).TYPE="type",loe.ACTION="action",loe.ENCODING="encoding",loe.PROMPT="prompt",loe.NAME="name",loe.COLOR="color",loe.FACE="face",loe.SIZE="size",(uoe=coe||(coe={})).NO_QUIRKS="no-quirks",uoe.QUIRKS="quirks",uoe.LIMITED_QUIRKS="limited-quirks",(poe=doe||(doe={})).A="a",poe.ADDRESS="address",poe.ANNOTATION_XML="annotation-xml",poe.APPLET="applet",poe.AREA="area",poe.ARTICLE="article",poe.ASIDE="aside",poe.B="b",poe.BASE="base",poe.BASEFONT="basefont",poe.BGSOUND="bgsound",poe.BIG="big",poe.BLOCKQUOTE="blockquote",poe.BODY="body",poe.BR="br",poe.BUTTON="button",poe.CAPTION="caption",poe.CENTER="center",poe.CODE="code",poe.COL="col",poe.COLGROUP="colgroup",poe.DD="dd",poe.DESC="desc",poe.DETAILS="details",poe.DIALOG="dialog",poe.DIR="dir",poe.DIV="div",poe.DL="dl",poe.DT="dt",poe.EM="em",poe.EMBED="embed",poe.FIELDSET="fieldset",poe.FIGCAPTION="figcaption",poe.FIGURE="figure",poe.FONT="font",poe.FOOTER="footer",poe.FOREIGN_OBJECT="foreignObject",poe.FORM="form",poe.FRAME="frame",poe.FRAMESET="frameset",poe.H1="h1",poe.H2="h2",poe.H3="h3",poe.H4="h4",poe.H5="h5",poe.H6="h6",poe.HEAD="head",poe.HEADER="header",poe.HGROUP="hgroup",poe.HR="hr",poe.HTML="html",poe.I="i",poe.IMG="img",poe.IMAGE="image",poe.INPUT="input",poe.IFRAME="iframe",poe.KEYGEN="keygen",poe.LABEL="label",poe.LI="li",poe.LINK="link",poe.LISTING="listing",poe.MAIN="main",poe.MALIGNMARK="malignmark",poe.MARQUEE="marquee",poe.MATH="math",poe.MENU="menu",poe.META="meta",poe.MGLYPH="mglyph",poe.MI="mi",poe.MO="mo",poe.MN="mn",poe.MS="ms",poe.MTEXT="mtext",poe.NAV="nav",poe.NOBR="nobr",poe.NOFRAMES="noframes",poe.NOEMBED="noembed",poe.NOSCRIPT="noscript",poe.OBJECT="object",poe.OL="ol",poe.OPTGROUP="optgroup",poe.OPTION="option",poe.P="p",poe.PARAM="param",poe.PLAINTEXT="plaintext",poe.PRE="pre",poe.RB="rb",poe.RP="rp",poe.RT="rt",poe.RTC="rtc",poe.RUBY="ruby",poe.S="s",poe.SCRIPT="script",poe.SEARCH="search",poe.SECTION="section",poe.SELECT="select",poe.SOURCE="source",poe.SMALL="small",poe.SPAN="span",poe.STRIKE="strike",poe.STRONG="strong",poe.STYLE="style",poe.SUB="sub",poe.SUMMARY="summary",poe.SUP="sup",poe.TABLE="table",poe.TBODY="tbody",poe.TEMPLATE="template",poe.TEXTAREA="textarea",poe.TFOOT="tfoot",poe.TD="td",poe.TH="th",poe.THEAD="thead",poe.TITLE="title",poe.TR="tr",poe.TRACK="track",poe.TT="tt",poe.U="u",poe.UL="ul",poe.SVG="svg",poe.VAR="var",poe.WBR="wbr",poe.XMP="xmp",(hoe=foe||(foe={}))[hoe.UNKNOWN=0]="UNKNOWN",hoe[hoe.A=1]="A",hoe[hoe.ADDRESS=2]="ADDRESS",hoe[hoe.ANNOTATION_XML=3]="ANNOTATION_XML",hoe[hoe.APPLET=4]="APPLET",hoe[hoe.AREA=5]="AREA",hoe[hoe.ARTICLE=6]="ARTICLE",hoe[hoe.ASIDE=7]="ASIDE",hoe[hoe.B=8]="B",hoe[hoe.BASE=9]="BASE",hoe[hoe.BASEFONT=10]="BASEFONT",hoe[hoe.BGSOUND=11]="BGSOUND",hoe[hoe.BIG=12]="BIG",hoe[hoe.BLOCKQUOTE=13]="BLOCKQUOTE",hoe[hoe.BODY=14]="BODY",hoe[hoe.BR=15]="BR",hoe[hoe.BUTTON=16]="BUTTON",hoe[hoe.CAPTION=17]="CAPTION",hoe[hoe.CENTER=18]="CENTER",hoe[hoe.CODE=19]="CODE",hoe[hoe.COL=20]="COL",hoe[hoe.COLGROUP=21]="COLGROUP",hoe[hoe.DD=22]="DD",hoe[hoe.DESC=23]="DESC",hoe[hoe.DETAILS=24]="DETAILS",hoe[hoe.DIALOG=25]="DIALOG",hoe[hoe.DIR=26]="DIR",hoe[hoe.DIV=27]="DIV",hoe[hoe.DL=28]="DL",hoe[hoe.DT=29]="DT",hoe[hoe.EM=30]="EM",hoe[hoe.EMBED=31]="EMBED",hoe[hoe.FIELDSET=32]="FIELDSET",hoe[hoe.FIGCAPTION=33]="FIGCAPTION",hoe[hoe.FIGURE=34]="FIGURE",hoe[hoe.FONT=35]="FONT",hoe[hoe.FOOTER=36]="FOOTER",hoe[hoe.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",hoe[hoe.FORM=38]="FORM",hoe[hoe.FRAME=39]="FRAME",hoe[hoe.FRAMESET=40]="FRAMESET",hoe[hoe.H1=41]="H1",hoe[hoe.H2=42]="H2",hoe[hoe.H3=43]="H3",hoe[hoe.H4=44]="H4",hoe[hoe.H5=45]="H5",hoe[hoe.H6=46]="H6",hoe[hoe.HEAD=47]="HEAD",hoe[hoe.HEADER=48]="HEADER",hoe[hoe.HGROUP=49]="HGROUP",hoe[hoe.HR=50]="HR",hoe[hoe.HTML=51]="HTML",hoe[hoe.I=52]="I",hoe[hoe.IMG=53]="IMG",hoe[hoe.IMAGE=54]="IMAGE",hoe[hoe.INPUT=55]="INPUT",hoe[hoe.IFRAME=56]="IFRAME",hoe[hoe.KEYGEN=57]="KEYGEN",hoe[hoe.LABEL=58]="LABEL",hoe[hoe.LI=59]="LI",hoe[hoe.LINK=60]="LINK",hoe[hoe.LISTING=61]="LISTING",hoe[hoe.MAIN=62]="MAIN",hoe[hoe.MALIGNMARK=63]="MALIGNMARK",hoe[hoe.MARQUEE=64]="MARQUEE",hoe[hoe.MATH=65]="MATH",hoe[hoe.MENU=66]="MENU",hoe[hoe.META=67]="META",hoe[hoe.MGLYPH=68]="MGLYPH",hoe[hoe.MI=69]="MI",hoe[hoe.MO=70]="MO",hoe[hoe.MN=71]="MN",hoe[hoe.MS=72]="MS",hoe[hoe.MTEXT=73]="MTEXT",hoe[hoe.NAV=74]="NAV",hoe[hoe.NOBR=75]="NOBR",hoe[hoe.NOFRAMES=76]="NOFRAMES",hoe[hoe.NOEMBED=77]="NOEMBED",hoe[hoe.NOSCRIPT=78]="NOSCRIPT",hoe[hoe.OBJECT=79]="OBJECT",hoe[hoe.OL=80]="OL",hoe[hoe.OPTGROUP=81]="OPTGROUP",hoe[hoe.OPTION=82]="OPTION",hoe[hoe.P=83]="P",hoe[hoe.PARAM=84]="PARAM",hoe[hoe.PLAINTEXT=85]="PLAINTEXT",hoe[hoe.PRE=86]="PRE",hoe[hoe.RB=87]="RB",hoe[hoe.RP=88]="RP",hoe[hoe.RT=89]="RT",hoe[hoe.RTC=90]="RTC",hoe[hoe.RUBY=91]="RUBY",hoe[hoe.S=92]="S",hoe[hoe.SCRIPT=93]="SCRIPT",hoe[hoe.SEARCH=94]="SEARCH",hoe[hoe.SECTION=95]="SECTION",hoe[hoe.SELECT=96]="SELECT",hoe[hoe.SOURCE=97]="SOURCE",hoe[hoe.SMALL=98]="SMALL",hoe[hoe.SPAN=99]="SPAN",hoe[hoe.STRIKE=100]="STRIKE",hoe[hoe.STRONG=101]="STRONG",hoe[hoe.STYLE=102]="STYLE",hoe[hoe.SUB=103]="SUB",hoe[hoe.SUMMARY=104]="SUMMARY",hoe[hoe.SUP=105]="SUP",hoe[hoe.TABLE=106]="TABLE",hoe[hoe.TBODY=107]="TBODY",hoe[hoe.TEMPLATE=108]="TEMPLATE",hoe[hoe.TEXTAREA=109]="TEXTAREA",hoe[hoe.TFOOT=110]="TFOOT",hoe[hoe.TD=111]="TD",hoe[hoe.TH=112]="TH",hoe[hoe.THEAD=113]="THEAD",hoe[hoe.TITLE=114]="TITLE",hoe[hoe.TR=115]="TR",hoe[hoe.TRACK=116]="TRACK",hoe[hoe.TT=117]="TT",hoe[hoe.U=118]="U",hoe[hoe.UL=119]="UL",hoe[hoe.SVG=120]="SVG",hoe[hoe.VAR=121]="VAR",hoe[hoe.WBR=122]="WBR",hoe[hoe.XMP=123]="XMP";const voe=new Map([[doe.A,foe.A],[doe.ADDRESS,foe.ADDRESS],[doe.ANNOTATION_XML,foe.ANNOTATION_XML],[doe.APPLET,foe.APPLET],[doe.AREA,foe.AREA],[doe.ARTICLE,foe.ARTICLE],[doe.ASIDE,foe.ASIDE],[doe.B,foe.B],[doe.BASE,foe.BASE],[doe.BASEFONT,foe.BASEFONT],[doe.BGSOUND,foe.BGSOUND],[doe.BIG,foe.BIG],[doe.BLOCKQUOTE,foe.BLOCKQUOTE],[doe.BODY,foe.BODY],[doe.BR,foe.BR],[doe.BUTTON,foe.BUTTON],[doe.CAPTION,foe.CAPTION],[doe.CENTER,foe.CENTER],[doe.CODE,foe.CODE],[doe.COL,foe.COL],[doe.COLGROUP,foe.COLGROUP],[doe.DD,foe.DD],[doe.DESC,foe.DESC],[doe.DETAILS,foe.DETAILS],[doe.DIALOG,foe.DIALOG],[doe.DIR,foe.DIR],[doe.DIV,foe.DIV],[doe.DL,foe.DL],[doe.DT,foe.DT],[doe.EM,foe.EM],[doe.EMBED,foe.EMBED],[doe.FIELDSET,foe.FIELDSET],[doe.FIGCAPTION,foe.FIGCAPTION],[doe.FIGURE,foe.FIGURE],[doe.FONT,foe.FONT],[doe.FOOTER,foe.FOOTER],[doe.FOREIGN_OBJECT,foe.FOREIGN_OBJECT],[doe.FORM,foe.FORM],[doe.FRAME,foe.FRAME],[doe.FRAMESET,foe.FRAMESET],[doe.H1,foe.H1],[doe.H2,foe.H2],[doe.H3,foe.H3],[doe.H4,foe.H4],[doe.H5,foe.H5],[doe.H6,foe.H6],[doe.HEAD,foe.HEAD],[doe.HEADER,foe.HEADER],[doe.HGROUP,foe.HGROUP],[doe.HR,foe.HR],[doe.HTML,foe.HTML],[doe.I,foe.I],[doe.IMG,foe.IMG],[doe.IMAGE,foe.IMAGE],[doe.INPUT,foe.INPUT],[doe.IFRAME,foe.IFRAME],[doe.KEYGEN,foe.KEYGEN],[doe.LABEL,foe.LABEL],[doe.LI,foe.LI],[doe.LINK,foe.LINK],[doe.LISTING,foe.LISTING],[doe.MAIN,foe.MAIN],[doe.MALIGNMARK,foe.MALIGNMARK],[doe.MARQUEE,foe.MARQUEE],[doe.MATH,foe.MATH],[doe.MENU,foe.MENU],[doe.META,foe.META],[doe.MGLYPH,foe.MGLYPH],[doe.MI,foe.MI],[doe.MO,foe.MO],[doe.MN,foe.MN],[doe.MS,foe.MS],[doe.MTEXT,foe.MTEXT],[doe.NAV,foe.NAV],[doe.NOBR,foe.NOBR],[doe.NOFRAMES,foe.NOFRAMES],[doe.NOEMBED,foe.NOEMBED],[doe.NOSCRIPT,foe.NOSCRIPT],[doe.OBJECT,foe.OBJECT],[doe.OL,foe.OL],[doe.OPTGROUP,foe.OPTGROUP],[doe.OPTION,foe.OPTION],[doe.P,foe.P],[doe.PARAM,foe.PARAM],[doe.PLAINTEXT,foe.PLAINTEXT],[doe.PRE,foe.PRE],[doe.RB,foe.RB],[doe.RP,foe.RP],[doe.RT,foe.RT],[doe.RTC,foe.RTC],[doe.RUBY,foe.RUBY],[doe.S,foe.S],[doe.SCRIPT,foe.SCRIPT],[doe.SEARCH,foe.SEARCH],[doe.SECTION,foe.SECTION],[doe.SELECT,foe.SELECT],[doe.SOURCE,foe.SOURCE],[doe.SMALL,foe.SMALL],[doe.SPAN,foe.SPAN],[doe.STRIKE,foe.STRIKE],[doe.STRONG,foe.STRONG],[doe.STYLE,foe.STYLE],[doe.SUB,foe.SUB],[doe.SUMMARY,foe.SUMMARY],[doe.SUP,foe.SUP],[doe.TABLE,foe.TABLE],[doe.TBODY,foe.TBODY],[doe.TEMPLATE,foe.TEMPLATE],[doe.TEXTAREA,foe.TEXTAREA],[doe.TFOOT,foe.TFOOT],[doe.TD,foe.TD],[doe.TH,foe.TH],[doe.THEAD,foe.THEAD],[doe.TITLE,foe.TITLE],[doe.TR,foe.TR],[doe.TRACK,foe.TRACK],[doe.TT,foe.TT],[doe.U,foe.U],[doe.UL,foe.UL],[doe.SVG,foe.SVG],[doe.VAR,foe.VAR],[doe.WBR,foe.WBR],[doe.XMP,foe.XMP]]);function koe(e){var t;return null!==(t=voe.get(e))&&void 0!==t?t:foe.UNKNOWN}const xoe=foe,woe={[ooe.HTML]:new Set([xoe.ADDRESS,xoe.APPLET,xoe.AREA,xoe.ARTICLE,xoe.ASIDE,xoe.BASE,xoe.BASEFONT,xoe.BGSOUND,xoe.BLOCKQUOTE,xoe.BODY,xoe.BR,xoe.BUTTON,xoe.CAPTION,xoe.CENTER,xoe.COL,xoe.COLGROUP,xoe.DD,xoe.DETAILS,xoe.DIR,xoe.DIV,xoe.DL,xoe.DT,xoe.EMBED,xoe.FIELDSET,xoe.FIGCAPTION,xoe.FIGURE,xoe.FOOTER,xoe.FORM,xoe.FRAME,xoe.FRAMESET,xoe.H1,xoe.H2,xoe.H3,xoe.H4,xoe.H5,xoe.H6,xoe.HEAD,xoe.HEADER,xoe.HGROUP,xoe.HR,xoe.HTML,xoe.IFRAME,xoe.IMG,xoe.INPUT,xoe.LI,xoe.LINK,xoe.LISTING,xoe.MAIN,xoe.MARQUEE,xoe.MENU,xoe.META,xoe.NAV,xoe.NOEMBED,xoe.NOFRAMES,xoe.NOSCRIPT,xoe.OBJECT,xoe.OL,xoe.P,xoe.PARAM,xoe.PLAINTEXT,xoe.PRE,xoe.SCRIPT,xoe.SECTION,xoe.SELECT,xoe.SOURCE,xoe.STYLE,xoe.SUMMARY,xoe.TABLE,xoe.TBODY,xoe.TD,xoe.TEMPLATE,xoe.TEXTAREA,xoe.TFOOT,xoe.TH,xoe.THEAD,xoe.TITLE,xoe.TR,xoe.TRACK,xoe.UL,xoe.WBR,xoe.XMP]),[ooe.MATHML]:new Set([xoe.MI,xoe.MO,xoe.MN,xoe.MS,xoe.MTEXT,xoe.ANNOTATION_XML]),[ooe.SVG]:new Set([xoe.TITLE,xoe.FOREIGN_OBJECT,xoe.DESC]),[ooe.XLINK]:new Set,[ooe.XML]:new Set,[ooe.XMLNS]:new Set},Eoe=new Set([xoe.H1,xoe.H2,xoe.H3,xoe.H4,xoe.H5,xoe.H6]);var _oe,Soe;doe.STYLE,doe.SCRIPT,doe.XMP,doe.IFRAME,doe.NOEMBED,doe.NOFRAMES,doe.PLAINTEXT,(Soe=_oe||(_oe={}))[Soe.DATA=0]="DATA",Soe[Soe.RCDATA=1]="RCDATA",Soe[Soe.RAWTEXT=2]="RAWTEXT",Soe[Soe.SCRIPT_DATA=3]="SCRIPT_DATA",Soe[Soe.PLAINTEXT=4]="PLAINTEXT",Soe[Soe.TAG_OPEN=5]="TAG_OPEN",Soe[Soe.END_TAG_OPEN=6]="END_TAG_OPEN",Soe[Soe.TAG_NAME=7]="TAG_NAME",Soe[Soe.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",Soe[Soe.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",Soe[Soe.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",Soe[Soe.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",Soe[Soe.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",Soe[Soe.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",Soe[Soe.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",Soe[Soe.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",Soe[Soe.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",Soe[Soe.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",Soe[Soe.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",Soe[Soe.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",Soe[Soe.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",Soe[Soe.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",Soe[Soe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",Soe[Soe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",Soe[Soe.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",Soe[Soe.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",Soe[Soe.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",Soe[Soe.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",Soe[Soe.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",Soe[Soe.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",Soe[Soe.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",Soe[Soe.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",Soe[Soe.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",Soe[Soe.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",Soe[Soe.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",Soe[Soe.BOGUS_COMMENT=40]="BOGUS_COMMENT",Soe[Soe.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",Soe[Soe.COMMENT_START=42]="COMMENT_START",Soe[Soe.COMMENT_START_DASH=43]="COMMENT_START_DASH",Soe[Soe.COMMENT=44]="COMMENT",Soe[Soe.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",Soe[Soe.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",Soe[Soe.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",Soe[Soe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",Soe[Soe.COMMENT_END_DASH=49]="COMMENT_END_DASH",Soe[Soe.COMMENT_END=50]="COMMENT_END",Soe[Soe.COMMENT_END_BANG=51]="COMMENT_END_BANG",Soe[Soe.DOCTYPE=52]="DOCTYPE",Soe[Soe.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",Soe[Soe.DOCTYPE_NAME=54]="DOCTYPE_NAME",Soe[Soe.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",Soe[Soe.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",Soe[Soe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",Soe[Soe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",Soe[Soe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",Soe[Soe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",Soe[Soe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",Soe[Soe.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",Soe[Soe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",Soe[Soe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",Soe[Soe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",Soe[Soe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",Soe[Soe.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",Soe[Soe.CDATA_SECTION=68]="CDATA_SECTION",Soe[Soe.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",Soe[Soe.CDATA_SECTION_END=70]="CDATA_SECTION_END",Soe[Soe.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",Soe[Soe.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND";const Toe={DATA:_oe.DATA,RCDATA:_oe.RCDATA,RAWTEXT:_oe.RAWTEXT,SCRIPT_DATA:_oe.SCRIPT_DATA,PLAINTEXT:_oe.PLAINTEXT,CDATA_SECTION:_oe.CDATA_SECTION};function Coe(e){return e>=Rae.LATIN_CAPITAL_A&&e<=Rae.LATIN_CAPITAL_Z}function Aoe(e){return function(e){return e>=Rae.LATIN_SMALL_A&&e<=Rae.LATIN_SMALL_Z}(e)||Coe(e)}function Noe(e){return Aoe(e)||function(e){return e>=Rae.DIGIT_0&&e<=Rae.DIGIT_9}(e)}function Ioe(e){return e+32}function Ooe(e){return e===Rae.SPACE||e===Rae.LINE_FEED||e===Rae.TABULATION||e===Rae.FORM_FEED}function Roe(e){return Ooe(e)||e===Rae.SOLIDUS||e===Rae.GREATER_THAN_SIGN}class Poe{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=_oe.DATA,this.returnState=_oe.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Gae(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new yoe(Zae,((e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)}),t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err($ae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err($ae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{const t=function(e){return e===Rae.NULL?$ae.nullCharacterReference:e>1114111?$ae.characterReferenceOutsideUnicodeRange:Bae(e)?$ae.surrogateCharacterReference:Uae(e)?$ae.noncharacterCharacterReference:Hae(e)||e===Rae.CARRIAGE_RETURN?$ae.controlCharacterReference:null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;null===(r=(n=this.handler).onParseError)||void 0===r||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return!!this.preprocessor.endOfChunkHit&&(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0)}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return!!this.preprocessor.startsWith(e,t)&&(this._advanceBy(e.length-1),!0)}_createStartTagToken(){this.currentToken={type:qae.START_TAG,tagName:"",tagID:foe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:qae.END_TAG,tagName:"",tagID:foe.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:qae.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:qae.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,t;const n=this.currentToken;if(null===Yae(n,this.currentAttr.name)){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){(null!==(e=(t=n.location).attrs)&&void 0!==e?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err($ae.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const e=this.currentToken;this.prepareToken(e),e.tagID=koe(e.tagName),e.type===qae.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err($ae.endTagWithAttributes),e.selfClosing&&this._err($ae.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case qae.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case qae.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case qae.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:qae.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}_emitCodePoint(e){const t=Ooe(e)?qae.WHITESPACE_CHARACTER:e===Rae.NULL?qae.NULL_CHARACTER:qae.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(qae.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=_oe.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?roe.Attribute:roe.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===_oe.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===_oe.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===_oe.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case _oe.DATA:this._stateData(e);break;case _oe.RCDATA:this._stateRcdata(e);break;case _oe.RAWTEXT:this._stateRawtext(e);break;case _oe.SCRIPT_DATA:this._stateScriptData(e);break;case _oe.PLAINTEXT:this._statePlaintext(e);break;case _oe.TAG_OPEN:this._stateTagOpen(e);break;case _oe.END_TAG_OPEN:this._stateEndTagOpen(e);break;case _oe.TAG_NAME:this._stateTagName(e);break;case _oe.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case _oe.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case _oe.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case _oe.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case _oe.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case _oe.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case _oe.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case _oe.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case _oe.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case _oe.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case _oe.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case _oe.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case _oe.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case _oe.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case _oe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case _oe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case _oe.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case _oe.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case _oe.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case _oe.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case _oe.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case _oe.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case _oe.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case _oe.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case _oe.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case _oe.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case _oe.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case _oe.BOGUS_COMMENT:this._stateBogusComment(e);break;case _oe.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case _oe.COMMENT_START:this._stateCommentStart(e);break;case _oe.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case _oe.COMMENT:this._stateComment(e);break;case _oe.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case _oe.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case _oe.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case _oe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case _oe.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case _oe.COMMENT_END:this._stateCommentEnd(e);break;case _oe.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case _oe.DOCTYPE:this._stateDoctype(e);break;case _oe.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case _oe.DOCTYPE_NAME:this._stateDoctypeName(e);break;case _oe.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case _oe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case _oe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case _oe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case _oe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case _oe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case _oe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case _oe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case _oe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case _oe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case _oe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case _oe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case _oe.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case _oe.CDATA_SECTION:this._stateCdataSection(e);break;case _oe.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case _oe.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case _oe.CHARACTER_REFERENCE:this._stateCharacterReference();break;case _oe.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw new Error("Unknown state")}}_stateData(e){switch(e){case Rae.LESS_THAN_SIGN:this.state=_oe.TAG_OPEN;break;case Rae.AMPERSAND:this._startCharacterReference();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitCodePoint(e);break;case Rae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case Rae.AMPERSAND:this._startCharacterReference();break;case Rae.LESS_THAN_SIGN:this.state=_oe.RCDATA_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case Rae.LESS_THAN_SIGN:this.state=_oe.RAWTEXT_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Aoe(e))this._createStartTagToken(),this.state=_oe.TAG_NAME,this._stateTagName(e);else switch(e){case Rae.EXCLAMATION_MARK:this.state=_oe.MARKUP_DECLARATION_OPEN;break;case Rae.SOLIDUS:this.state=_oe.END_TAG_OPEN;break;case Rae.QUESTION_MARK:this._err($ae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=_oe.BOGUS_COMMENT,this._stateBogusComment(e);break;case Rae.EOF:this._err($ae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err($ae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=_oe.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Aoe(e))this._createEndTagToken(),this.state=_oe.TAG_NAME,this._stateTagName(e);else switch(e){case Rae.GREATER_THAN_SIGN:this._err($ae.missingEndTagName),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err($ae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=_oe.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.BEFORE_ATTRIBUTE_NAME;break;case Rae.SOLIDUS:this.state=_oe.SELF_CLOSING_START_TAG;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentTagToken();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.tagName+=Oae;break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(Coe(e)?Ioe(e):e)}}_stateRcdataLessThanSign(e){e===Rae.SOLIDUS?this.state=_oe.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=_oe.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){Aoe(e)?(this.state=_oe.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=_oe.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();this.currentToken.tagName=this.lastStartTagName;switch(this.preprocessor.peek(this.lastStartTagName.length)){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=_oe.BEFORE_ATTRIBUTE_NAME,!1;case Rae.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=_oe.SELF_CLOSING_START_TAG,!1;case Rae.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=_oe.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=_oe.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===Rae.SOLIDUS?this.state=_oe.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=_oe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){Aoe(e)?(this.state=_oe.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=_oe.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=_oe.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case Rae.SOLIDUS:this.state=_oe.SCRIPT_DATA_END_TAG_OPEN;break;case Rae.EXCLAMATION_MARK:this.state=_oe.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=_oe.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){Aoe(e)?(this.state=_oe.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=_oe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=_oe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===Rae.HYPHEN_MINUS?(this.state=_oe.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=_oe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===Rae.HYPHEN_MINUS?(this.state=_oe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=_oe.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.state=_oe.SCRIPT_DATA_ESCAPED,this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_oe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case Rae.HYPHEN_MINUS:this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.SCRIPT_DATA,this._emitChars(">");break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.state=_oe.SCRIPT_DATA_ESCAPED,this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_oe.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===Rae.SOLIDUS?this.state=_oe.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Aoe(e)?(this._emitChars("<"),this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=_oe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Aoe(e)?(this.state=_oe.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=_oe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=_oe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Fae,!1)&&Roe(this.preprocessor.peek(Fae.length))){this._emitCodePoint(e);for(let e=0;e<Fae.length;e++)this._emitCodePoint(this._consume());this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=_oe.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case Rae.HYPHEN_MINUS:this._emitChars("-");break;case Rae.LESS_THAN_SIGN:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case Rae.GREATER_THAN_SIGN:this.state=_oe.SCRIPT_DATA,this._emitChars(">");break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Oae);break;case Rae.EOF:this._err($ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===Rae.SOLIDUS?(this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Fae,!1)&&Roe(this.preprocessor.peek(Fae.length))){this._emitCodePoint(e);for(let e=0;e<Fae.length;e++)this._emitCodePoint(this._consume());this.state=_oe.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=_oe.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.SOLIDUS:case Rae.GREATER_THAN_SIGN:case Rae.EOF:this.state=_oe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Rae.EQUALS_SIGN:this._err($ae.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=_oe.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=_oe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:case Rae.SOLIDUS:case Rae.GREATER_THAN_SIGN:case Rae.EOF:this._leaveAttrName(),this.state=_oe.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case Rae.EQUALS_SIGN:this._leaveAttrName(),this.state=_oe.BEFORE_ATTRIBUTE_VALUE;break;case Rae.QUOTATION_MARK:case Rae.APOSTROPHE:case Rae.LESS_THAN_SIGN:this._err($ae.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.currentAttr.name+=Oae;break;default:this.currentAttr.name+=String.fromCodePoint(Coe(e)?Ioe(e):e)}}_stateAfterAttributeName(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.SOLIDUS:this.state=_oe.SELF_CLOSING_START_TAG;break;case Rae.EQUALS_SIGN:this.state=_oe.BEFORE_ATTRIBUTE_VALUE;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentTagToken();break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=_oe.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.QUOTATION_MARK:this.state=_oe.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:this.state=_oe.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case Rae.GREATER_THAN_SIGN:this._err($ae.missingAttributeValue),this.state=_oe.DATA,this.emitCurrentTagToken();break;default:this.state=_oe.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case Rae.QUOTATION_MARK:this.state=_oe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Rae.AMPERSAND:this._startCharacterReference();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.currentAttr.value+=Oae;break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case Rae.APOSTROPHE:this.state=_oe.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case Rae.AMPERSAND:this._startCharacterReference();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.currentAttr.value+=Oae;break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this._leaveAttrValue(),this.state=_oe.BEFORE_ATTRIBUTE_NAME;break;case Rae.AMPERSAND:this._startCharacterReference();break;case Rae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=_oe.DATA,this.emitCurrentTagToken();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this.currentAttr.value+=Oae;break;case Rae.QUOTATION_MARK:case Rae.APOSTROPHE:case Rae.LESS_THAN_SIGN:case Rae.EQUALS_SIGN:case Rae.GRAVE_ACCENT:this._err($ae.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this._leaveAttrValue(),this.state=_oe.BEFORE_ATTRIBUTE_NAME;break;case Rae.SOLIDUS:this._leaveAttrValue(),this.state=_oe.SELF_CLOSING_START_TAG;break;case Rae.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=_oe.DATA,this.emitCurrentTagToken();break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this._err($ae.missingWhitespaceBetweenAttributes),this.state=_oe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case Rae.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=_oe.DATA,this.emitCurrentTagToken();break;case Rae.EOF:this._err($ae.eofInTag),this._emitEOFToken();break;default:this._err($ae.unexpectedSolidusInTag),this.state=_oe.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const t=this.currentToken;switch(e){case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentComment(t);break;case Rae.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.data+=Oae;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Lae,!0)?(this._createCommentToken(Lae.length+1),this.state=_oe.COMMENT_START):this._consumeSequenceIfMatch(Mae,!1)?(this.currentLocation=this.getCurrentLocation(Mae.length+1),this.state=_oe.DOCTYPE):this._consumeSequenceIfMatch(Dae,!0)?this.inForeignNode?this.state=_oe.CDATA_SECTION:(this._err($ae.cdataInHtmlContent),this._createCommentToken(Dae.length+1),this.currentToken.data="[CDATA[",this.state=_oe.BOGUS_COMMENT):this._ensureHibernation()||(this._err($ae.incorrectlyOpenedComment),this._createCommentToken(2),this.state=_oe.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.COMMENT_START_DASH;break;case Rae.GREATER_THAN_SIGN:{this._err($ae.abruptClosingOfEmptyComment),this.state=_oe.DATA;const e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=_oe.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const t=this.currentToken;switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.COMMENT_END;break;case Rae.GREATER_THAN_SIGN:this._err($ae.abruptClosingOfEmptyComment),this.state=_oe.DATA,this.emitCurrentComment(t);break;case Rae.EOF:this._err($ae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=_oe.COMMENT,this._stateComment(e)}}_stateComment(e){const t=this.currentToken;switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.COMMENT_END_DASH;break;case Rae.LESS_THAN_SIGN:t.data+="<",this.state=_oe.COMMENT_LESS_THAN_SIGN;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.data+=Oae;break;case Rae.EOF:this._err($ae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const t=this.currentToken;switch(e){case Rae.EXCLAMATION_MARK:t.data+="!",this.state=_oe.COMMENT_LESS_THAN_SIGN_BANG;break;case Rae.LESS_THAN_SIGN:t.data+="<";break;default:this.state=_oe.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===Rae.HYPHEN_MINUS?this.state=_oe.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=_oe.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===Rae.HYPHEN_MINUS?this.state=_oe.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=_oe.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==Rae.GREATER_THAN_SIGN&&e!==Rae.EOF&&this._err($ae.nestedComment),this.state=_oe.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const t=this.currentToken;switch(e){case Rae.HYPHEN_MINUS:this.state=_oe.COMMENT_END;break;case Rae.EOF:this._err($ae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=_oe.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const t=this.currentToken;switch(e){case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentComment(t);break;case Rae.EXCLAMATION_MARK:this.state=_oe.COMMENT_END_BANG;break;case Rae.HYPHEN_MINUS:t.data+="-";break;case Rae.EOF:this._err($ae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=_oe.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const t=this.currentToken;switch(e){case Rae.HYPHEN_MINUS:t.data+="--!",this.state=_oe.COMMENT_END_DASH;break;case Rae.GREATER_THAN_SIGN:this._err($ae.incorrectlyClosedComment),this.state=_oe.DATA,this.emitCurrentComment(t);break;case Rae.EOF:this._err($ae.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=_oe.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.BEFORE_DOCTYPE_NAME;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case Rae.EOF:{this._err($ae.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err($ae.missingWhitespaceBeforeDoctypeName),this.state=_oe.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Coe(e))this._createDoctypeToken(String.fromCharCode(Ioe(e))),this.state=_oe.DOCTYPE_NAME;else switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),this._createDoctypeToken(Oae),this.state=_oe.DOCTYPE_NAME;break;case Rae.GREATER_THAN_SIGN:{this._err($ae.missingDoctypeName),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=_oe.DATA;break}case Rae.EOF:{this._err($ae.eofInDoctype),this._createDoctypeToken(null);const e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=_oe.DOCTYPE_NAME}}_stateDoctypeName(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.AFTER_DOCTYPE_NAME;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.name+=Oae;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Coe(e)?Ioe(e):e)}}_stateAfterDoctypeName(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(jae,!1)?this.state=_oe.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(zae,!1)?this.state=_oe.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err($ae.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case Rae.QUOTATION_MARK:this._err($ae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=_oe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:this._err($ae.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=_oe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Rae.GREATER_THAN_SIGN:this._err($ae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.QUOTATION_MARK:t.publicId="",this.state=_oe.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:t.publicId="",this.state=_oe.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case Rae.GREATER_THAN_SIGN:this._err($ae.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Rae.QUOTATION_MARK:this.state=_oe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.publicId+=Oae;break;case Rae.GREATER_THAN_SIGN:this._err($ae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Rae.APOSTROPHE:this.state=_oe.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.publicId+=Oae;break;case Rae.GREATER_THAN_SIGN:this._err($ae.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.QUOTATION_MARK:this._err($ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:this._err($ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.QUOTATION_MARK:t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:this.state=_oe.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case Rae.QUOTATION_MARK:this._err($ae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:this._err($ae.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Rae.GREATER_THAN_SIGN:this._err($ae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.QUOTATION_MARK:t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case Rae.APOSTROPHE:t.systemId="",this.state=_oe.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case Rae.GREATER_THAN_SIGN:this._err($ae.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.DATA,this.emitCurrentDoctype(t);break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const t=this.currentToken;switch(e){case Rae.QUOTATION_MARK:this.state=_oe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.systemId+=Oae;break;case Rae.GREATER_THAN_SIGN:this._err($ae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const t=this.currentToken;switch(e){case Rae.APOSTROPHE:this.state=_oe.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter),t.systemId+=Oae;break;case Rae.GREATER_THAN_SIGN:this._err($ae.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const t=this.currentToken;switch(e){case Rae.SPACE:case Rae.LINE_FEED:case Rae.TABULATION:case Rae.FORM_FEED:break;case Rae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.EOF:this._err($ae.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err($ae.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=_oe.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const t=this.currentToken;switch(e){case Rae.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=_oe.DATA;break;case Rae.NULL:this._err($ae.unexpectedNullCharacter);break;case Rae.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case Rae.RIGHT_SQUARE_BRACKET:this.state=_oe.CDATA_SECTION_BRACKET;break;case Rae.EOF:this._err($ae.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===Rae.RIGHT_SQUARE_BRACKET?this.state=_oe.CDATA_SECTION_END:(this._emitChars("]"),this.state=_oe.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case Rae.GREATER_THAN_SIGN:this.state=_oe.DATA;break;case Rae.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=_oe.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(!this.preprocessor.lastChunkWritten)return this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,void(this.preprocessor.endOfChunkHit=!0);e=this.entityDecoder.end()}0===e?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(Rae.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Noe(this.preprocessor.peek(1))?_oe.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Noe(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===Rae.SEMICOLON&&this._err($ae.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const Loe=new Set([foe.DD,foe.DT,foe.LI,foe.OPTGROUP,foe.OPTION,foe.P,foe.RB,foe.RP,foe.RT,foe.RTC]),Doe=new Set([...Loe,foe.CAPTION,foe.COLGROUP,foe.TBODY,foe.TD,foe.TFOOT,foe.TH,foe.THEAD,foe.TR]),Moe=new Set([foe.APPLET,foe.CAPTION,foe.HTML,foe.MARQUEE,foe.OBJECT,foe.TABLE,foe.TD,foe.TEMPLATE,foe.TH]),Foe=new Set([...Moe,foe.OL,foe.UL]),joe=new Set([...Moe,foe.BUTTON]),zoe=new Set([foe.ANNOTATION_XML,foe.MI,foe.MN,foe.MO,foe.MS,foe.MTEXT]),Boe=new Set([foe.DESC,foe.FOREIGN_OBJECT,foe.TITLE]),Hoe=new Set([foe.TR,foe.TEMPLATE,foe.HTML]),Uoe=new Set([foe.TBODY,foe.TFOOT,foe.THEAD,foe.TEMPLATE,foe.HTML]),$oe=new Set([foe.TABLE,foe.TEMPLATE,foe.HTML]),Voe=new Set([foe.TD,foe.TH]);class Goe{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=foe.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===foe.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ooe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&void 0!==this.currentTagId&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==ooe.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){const t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Eoe,ooe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Voe,ooe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo($oe,ooe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Uoe,ooe.HTML)}clearBackToTableRowContext(){this.clearBackTo(Hoe,ooe.HTML)}remove(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===foe.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===foe.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){const r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case ooe.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case ooe.SVG:if(Boe.has(r))return!1;break;case ooe.MATHML:if(zoe.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Moe)}hasInListItemScope(e){return this.hasInDynamicScope(e,Foe)}hasInButtonScope(e){return this.hasInDynamicScope(e,joe)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case ooe.HTML:if(Eoe.has(t))return!0;if(Moe.has(t))return!1;break;case ooe.SVG:if(Boe.has(t))return!1;break;case ooe.MATHML:if(zoe.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ooe.HTML)switch(this.tagIDs[t]){case e:return!0;case foe.TABLE:case foe.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===ooe.HTML)switch(this.tagIDs[e]){case foe.TBODY:case foe.THEAD:case foe.TFOOT:return!0;case foe.TABLE:case foe.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ooe.HTML)switch(this.tagIDs[t]){case e:return!0;case foe.OPTION:case foe.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&Loe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&Doe.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&Doe.has(this.currentTagId);)this.pop()}}var qoe,Woe;(Woe=qoe||(qoe={}))[Woe.Marker=0]="Marker",Woe[Woe.Element=1]="Element";const Yoe={type:qoe.Marker};class Zoe{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){const n=[],r=t.length,a=this.treeAdapter.getTagName(e),o=this.treeAdapter.getNamespaceURI(e);for(let i=0;i<this.entries.length;i++){const e=this.entries[i];if(e.type===qoe.Marker)break;const{element:t}=e;if(this.treeAdapter.getTagName(t)===a&&this.treeAdapter.getNamespaceURI(t)===o){const e=this.treeAdapter.getAttrList(t);e.length===r&&n.push({idx:i,attrs:e})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;const t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;const r=new Map(t.map((e=>[e.name,e.value])));let a=0;for(let o=0;o<n.length;o++){const e=n[o];e.attrs.every((e=>r.get(e.name)===e.value))&&(a+=1,a>=3&&this.entries.splice(e.idx,1))}}insertMarker(){this.entries.unshift(Yoe)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:qoe.Element,element:e,token:t})}insertElementAfterBookmark(e,t){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:qoe.Element,element:e,token:t})}removeEntry(e){const t=this.entries.indexOf(e);-1!==t&&this.entries.splice(t,1)}clearToLastMarker(){const e=this.entries.indexOf(Yoe);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const t=this.entries.find((t=>t.type===qoe.Marker||this.treeAdapter.getTagName(t.element)===e));return t&&t.type===qoe.Element?t:null}getElementEntry(e){return this.entries.find((t=>t.type===qoe.Element&&t.element===e))}}const Koe={createDocument:()=>({nodeName:"#document",mode:coe.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),createTextNode:e=>({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=>e.content,setDocumentType(e,t,n,r){const a=e.childNodes.find((e=>"#documentType"===e.nodeName));if(a)a.name=t,a.publicId=n,a.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Koe.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>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(Koe.isTextNode(n))return void(n.value+=t)}Koe.appendChild(e,Koe.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Koe.isTextNode(r)?r.value+=t:Koe.insertBefore(e,Koe.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild:e=>e.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},Xoe="html",Qoe=["+//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//"],Joe=[...Qoe,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],eie=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),tie=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],nie=[...tie,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function rie(e,t){return t.some((t=>e.startsWith(t)))}const aie="text/html",oie="application/xhtml+xml",iie=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]))),sie=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ooe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ooe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ooe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ooe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ooe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ooe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ooe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ooe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ooe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ooe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ooe.XMLNS}]]),lie=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]))),cie=new Set([foe.B,foe.BIG,foe.BLOCKQUOTE,foe.BODY,foe.BR,foe.CENTER,foe.CODE,foe.DD,foe.DIV,foe.DL,foe.DT,foe.EM,foe.EMBED,foe.H1,foe.H2,foe.H3,foe.H4,foe.H5,foe.H6,foe.HEAD,foe.HR,foe.I,foe.IMG,foe.LI,foe.LISTING,foe.MENU,foe.META,foe.NOBR,foe.OL,foe.P,foe.PRE,foe.RUBY,foe.S,foe.SMALL,foe.SPAN,foe.STRONG,foe.STRIKE,foe.SUB,foe.SUP,foe.TABLE,foe.TT,foe.U,foe.UL,foe.VAR]);function uie(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function die(e){for(let t=0;t<e.attrs.length;t++){const n=iie.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function pie(e){for(let t=0;t<e.attrs.length;t++){const n=sie.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 fie(e,t,n,r){return(!r||r===ooe.HTML)&&function(e,t,n){if(t===ooe.MATHML&&e===foe.ANNOTATION_XML)for(let r=0;r<n.length;r++)if(n[r].name===soe.ENCODING){const e=n[r].value.toLowerCase();return e===aie||e===oie}return t===ooe.SVG&&(e===foe.FOREIGN_OBJECT||e===foe.DESC||e===foe.TITLE)}(e,t,n)||(!r||r===ooe.MATHML)&&function(e,t){return t===ooe.MATHML&&(e===foe.MI||e===foe.MO||e===foe.MN||e===foe.MS||e===foe.MTEXT)}(e,t)}var hie,mie;(mie=hie||(hie={}))[mie.INITIAL=0]="INITIAL",mie[mie.BEFORE_HTML=1]="BEFORE_HTML",mie[mie.BEFORE_HEAD=2]="BEFORE_HEAD",mie[mie.IN_HEAD=3]="IN_HEAD",mie[mie.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",mie[mie.AFTER_HEAD=5]="AFTER_HEAD",mie[mie.IN_BODY=6]="IN_BODY",mie[mie.TEXT=7]="TEXT",mie[mie.IN_TABLE=8]="IN_TABLE",mie[mie.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",mie[mie.IN_CAPTION=10]="IN_CAPTION",mie[mie.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",mie[mie.IN_TABLE_BODY=12]="IN_TABLE_BODY",mie[mie.IN_ROW=13]="IN_ROW",mie[mie.IN_CELL=14]="IN_CELL",mie[mie.IN_SELECT=15]="IN_SELECT",mie[mie.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",mie[mie.IN_TEMPLATE=17]="IN_TEMPLATE",mie[mie.AFTER_BODY=18]="AFTER_BODY",mie[mie.IN_FRAMESET=19]="IN_FRAMESET",mie[mie.AFTER_FRAMESET=20]="AFTER_FRAMESET",mie[mie.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",mie[mie.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET";const gie={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},yie=new Set([foe.TABLE,foe.TBODY,foe.TFOOT,foe.THEAD,foe.TR]),bie={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Koe,onParseError:null};class vie{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=hie.INITIAL,this.originalInsertionMode=hie.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={...bie,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=null!=t?t:this.treeAdapter.createDocument(),this.tokenizer=new Poe(this.options,this),this.activeFormattingElements=new Zoe(this.treeAdapter),this.fragmentContextID=n?koe(this.treeAdapter.getTagName(n)):foe.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new Goe(this.document,this.treeAdapter,this)}static parse(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){const n={...bie,...t};null!=e||(e=n.treeAdapter.createElement(doe.TEMPLATE,ooe.HTML,[]));const r=n.treeAdapter.createElement("documentmock",ooe.HTML,[]),a=new this(n,r,e);return a.fragmentContextID===foe.TEMPLATE&&a.tmplInsertionModeStack.unshift(hie.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){var r;if(!this.onParseError)return;const a=null!==(r=e.location)&&void 0!==r?r:gie,o={code:t,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(e,t,n){var r,a;null===(a=(r=this.treeAdapter).onItemPush)||void 0===a||a.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}_setContextModes(e,t){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===ooe.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,ooe.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=hie.TEXT}switchToPlaintextParsing(){this.insertionMode=hie.TEXT,this.originalInsertionMode=hie.IN_BODY,this.tokenizer.state=Toe.PLAINTEXT}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===doe.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===ooe.HTML)switch(this.fragmentContextID){case foe.TITLE:case foe.TEXTAREA:this.tokenizer.state=Toe.RCDATA;break;case foe.STYLE:case foe.XMP:case foe.IFRAME:case foe.NOEMBED:case foe.NOFRAMES:case foe.NOSCRIPT:this.tokenizer.state=Toe.RAWTEXT;break;case foe.SCRIPT:this.tokenizer.state=Toe.SCRIPT_DATA;break;case foe.PLAINTEXT:this.tokenizer.state=Toe.PLAINTEXT}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(null!=t?t:this.document,e)}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){const n=this.treeAdapter.createElement(e,ooe.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,ooe.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(doe.HTML,ooe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,foe.HTML)}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),a=n?r.lastIndexOf(n):r.length,o=r[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),a=t.type===qae.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,a)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==foe.SVG||this.treeAdapter.getTagName(t)!==doe.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==ooe.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===foe.MGLYPH||e.tagID===foe.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,ooe.HTML))}_processToken(e){switch(e.type){case qae.CHARACTER:this.onCharacter(e);break;case qae.NULL_CHARACTER:this.onNullCharacter(e);break;case qae.COMMENT:this.onComment(e);break;case qae.DOCTYPE:this.onDoctype(e);break;case qae.START_TAG:this._processStartTag(e);break;case qae.END_TAG:this.onEndTag(e);break;case qae.EOF:this.onEof(e);break;case qae.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return fie(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===qoe.Marker||this.openElements.contains(e.element)));for(let n=-1===t?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=hie.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(foe.P),this.openElements.popUntilTagNamePopped(foe.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case foe.TR:return void(this.insertionMode=hie.IN_ROW);case foe.TBODY:case foe.THEAD:case foe.TFOOT:return void(this.insertionMode=hie.IN_TABLE_BODY);case foe.CAPTION:return void(this.insertionMode=hie.IN_CAPTION);case foe.COLGROUP:return void(this.insertionMode=hie.IN_COLUMN_GROUP);case foe.TABLE:return void(this.insertionMode=hie.IN_TABLE);case foe.BODY:return void(this.insertionMode=hie.IN_BODY);case foe.FRAMESET:return void(this.insertionMode=hie.IN_FRAMESET);case foe.SELECT:return void this._resetInsertionModeForSelect(e);case foe.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case foe.HTML:return void(this.insertionMode=this.headElement?hie.AFTER_HEAD:hie.BEFORE_HEAD);case foe.TD:case foe.TH:if(e>0)return void(this.insertionMode=hie.IN_CELL);break;case foe.HEAD:if(e>0)return void(this.insertionMode=hie.IN_HEAD)}this.insertionMode=hie.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===foe.TEMPLATE)break;if(e===foe.TABLE)return void(this.insertionMode=hie.IN_SELECT_IN_TABLE)}this.insertionMode=hie.IN_SELECT}_isElementCausesFosterParenting(e){return yie.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&void 0!==this.openElements.currentTagId&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case foe.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===ooe.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case foe.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){const n=this.treeAdapter.getNamespaceURI(e);return woe[n].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case hie.INITIAL:Nie(this,e);break;case hie.BEFORE_HTML:Iie(this,e);break;case hie.BEFORE_HEAD:Oie(this,e);break;case hie.IN_HEAD:Lie(this,e);break;case hie.IN_HEAD_NO_SCRIPT:Die(this,e);break;case hie.AFTER_HEAD:Mie(this,e);break;case hie.IN_BODY:case hie.IN_CAPTION:case hie.IN_CELL:case hie.IN_TEMPLATE:zie(this,e);break;case hie.TEXT:case hie.IN_SELECT:case hie.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case hie.IN_TABLE:case hie.IN_TABLE_BODY:case hie.IN_ROW:Yie(this,e);break;case hie.IN_TABLE_TEXT:Jie(this,e);break;case hie.IN_COLUMN_GROUP:rse(this,e);break;case hie.AFTER_BODY:pse(this,e);break;case hie.AFTER_AFTER_BODY:fse(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=Oae,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case hie.INITIAL:Nie(this,e);break;case hie.BEFORE_HTML:Iie(this,e);break;case hie.BEFORE_HEAD:Oie(this,e);break;case hie.IN_HEAD:Lie(this,e);break;case hie.IN_HEAD_NO_SCRIPT:Die(this,e);break;case hie.AFTER_HEAD:Mie(this,e);break;case hie.TEXT:this._insertCharacters(e);break;case hie.IN_TABLE:case hie.IN_TABLE_BODY:case hie.IN_ROW:Yie(this,e);break;case hie.IN_COLUMN_GROUP:rse(this,e);break;case hie.AFTER_BODY:pse(this,e);break;case hie.AFTER_AFTER_BODY:fse(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Cie(this,e);else switch(this.insertionMode){case hie.INITIAL:case hie.BEFORE_HTML:case hie.BEFORE_HEAD:case hie.IN_HEAD:case hie.IN_HEAD_NO_SCRIPT:case hie.AFTER_HEAD:case hie.IN_BODY:case hie.IN_TABLE:case hie.IN_CAPTION:case hie.IN_COLUMN_GROUP:case hie.IN_TABLE_BODY:case hie.IN_ROW:case hie.IN_CELL:case hie.IN_SELECT:case hie.IN_SELECT_IN_TABLE:case hie.IN_TEMPLATE:case hie.IN_FRAMESET:case hie.AFTER_FRAMESET:Cie(this,e);break;case hie.IN_TABLE_TEXT:ese(this,e);break;case hie.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case hie.AFTER_AFTER_BODY:case hie.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case hie.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?coe.QUIRKS:function(e){if(e.name!==Xoe)return coe.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return coe.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),eie.has(n))return coe.QUIRKS;let e=null===t?Joe:Qoe;if(rie(n,e))return coe.QUIRKS;if(e=null===t?tie:nie,rie(n,e))return coe.LIMITED_QUIRKS}return coe.NO_QUIRKS}(t);(function(e){return e.name===Xoe&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err(t,$ae.nonConformingDoctype);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=hie.BEFORE_HTML}(this,e);break;case hie.BEFORE_HEAD:case hie.IN_HEAD:case hie.IN_HEAD_NO_SCRIPT:case hie.AFTER_HEAD:this._err(e,$ae.misplacedDoctype);break;case hie.IN_TABLE_TEXT:ese(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,$ae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){const t=e.tagID;return t===foe.FONT&&e.attrs.some((({name:e})=>e===soe.COLOR||e===soe.SIZE||e===soe.FACE))||cie.has(t)}(t))hse(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ooe.MATHML?uie(t):r===ooe.SVG&&(!function(e){const t=lie.get(e.tagName);null!=t&&(e.tagName=t,e.tagID=koe(e.tagName))}(t),die(t)),pie(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case hie.INITIAL:Nie(this,e);break;case hie.BEFORE_HTML:!function(e,t){t.tagID===foe.HTML?(e._insertElement(t,ooe.HTML),e.insertionMode=hie.BEFORE_HEAD):Iie(e,t)}(this,e);break;case hie.BEFORE_HEAD:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.HEAD:e._insertElement(t,ooe.HTML),e.headElement=e.openElements.current,e.insertionMode=hie.IN_HEAD;break;default:Oie(e,t)}}(this,e);break;case hie.IN_HEAD:Rie(this,e);break;case hie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.BASEFONT:case foe.BGSOUND:case foe.HEAD:case foe.LINK:case foe.META:case foe.NOFRAMES:case foe.STYLE:Rie(e,t);break;case foe.NOSCRIPT:e._err(t,$ae.nestedNoscriptInHead);break;default:Die(e,t)}}(this,e);break;case hie.AFTER_HEAD:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.BODY:e._insertElement(t,ooe.HTML),e.framesetOk=!1,e.insertionMode=hie.IN_BODY;break;case foe.FRAMESET:e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_FRAMESET;break;case foe.BASE:case foe.BASEFONT:case foe.BGSOUND:case foe.LINK:case foe.META:case foe.NOFRAMES:case foe.SCRIPT:case foe.STYLE:case foe.TEMPLATE:case foe.TITLE:e._err(t,$ae.abandonedHeadElementChild),e.openElements.push(e.headElement,foe.HEAD),Rie(e,t),e.openElements.remove(e.headElement);break;case foe.HEAD:e._err(t,$ae.misplacedStartTagForHeadElement);break;default:Mie(e,t)}}(this,e);break;case hie.IN_BODY:Vie(this,e);break;case hie.IN_TABLE:Zie(this,e);break;case hie.IN_TABLE_TEXT:ese(this,e);break;case hie.IN_CAPTION:!function(e,t){const n=t.tagID;tse.has(n)?e.openElements.hasInTableScope(foe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(foe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=hie.IN_TABLE,Zie(e,t)):Vie(e,t)}(this,e);break;case hie.IN_COLUMN_GROUP:nse(this,e);break;case hie.IN_TABLE_BODY:ase(this,e);break;case hie.IN_ROW:ise(this,e);break;case hie.IN_CELL:!function(e,t){const n=t.tagID;tse.has(n)?(e.openElements.hasInTableScope(foe.TD)||e.openElements.hasInTableScope(foe.TH))&&(e._closeTableCell(),ise(e,t)):Vie(e,t)}(this,e);break;case hie.IN_SELECT:lse(this,e);break;case hie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===foe.CAPTION||n===foe.TABLE||n===foe.TBODY||n===foe.TFOOT||n===foe.THEAD||n===foe.TR||n===foe.TD||n===foe.TH?(e.openElements.popUntilTagNamePopped(foe.SELECT),e._resetInsertionMode(),e._processStartTag(t)):lse(e,t)}(this,e);break;case hie.IN_TEMPLATE:!function(e,t){switch(t.tagID){case foe.BASE:case foe.BASEFONT:case foe.BGSOUND:case foe.LINK:case foe.META:case foe.NOFRAMES:case foe.SCRIPT:case foe.STYLE:case foe.TEMPLATE:case foe.TITLE:Rie(e,t);break;case foe.CAPTION:case foe.COLGROUP:case foe.TBODY:case foe.TFOOT:case foe.THEAD:e.tmplInsertionModeStack[0]=hie.IN_TABLE,e.insertionMode=hie.IN_TABLE,Zie(e,t);break;case foe.COL:e.tmplInsertionModeStack[0]=hie.IN_COLUMN_GROUP,e.insertionMode=hie.IN_COLUMN_GROUP,nse(e,t);break;case foe.TR:e.tmplInsertionModeStack[0]=hie.IN_TABLE_BODY,e.insertionMode=hie.IN_TABLE_BODY,ase(e,t);break;case foe.TD:case foe.TH:e.tmplInsertionModeStack[0]=hie.IN_ROW,e.insertionMode=hie.IN_ROW,ise(e,t);break;default:e.tmplInsertionModeStack[0]=hie.IN_BODY,e.insertionMode=hie.IN_BODY,Vie(e,t)}}(this,e);break;case hie.AFTER_BODY:!function(e,t){t.tagID===foe.HTML?Vie(e,t):pse(e,t)}(this,e);break;case hie.IN_FRAMESET:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.FRAMESET:e._insertElement(t,ooe.HTML);break;case foe.FRAME:e._appendElement(t,ooe.HTML),t.ackSelfClosing=!0;break;case foe.NOFRAMES:Rie(e,t)}}(this,e);break;case hie.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.NOFRAMES:Rie(e,t)}}(this,e);break;case hie.AFTER_AFTER_BODY:!function(e,t){t.tagID===foe.HTML?Vie(e,t):fse(e,t)}(this,e);break;case hie.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.NOFRAMES:Rie(e,t)}}(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===foe.P||t.tagID===foe.BR)return hse(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ooe.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case hie.INITIAL:Nie(this,e);break;case hie.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==foe.HTML&&n!==foe.HEAD&&n!==foe.BODY&&n!==foe.BR||Iie(e,t)}(this,e);break;case hie.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===foe.HEAD||n===foe.BODY||n===foe.HTML||n===foe.BR?Oie(e,t):e._err(t,$ae.endTagWithoutMatchingOpenElement)}(this,e);break;case hie.IN_HEAD:!function(e,t){switch(t.tagID){case foe.HEAD:e.openElements.pop(),e.insertionMode=hie.AFTER_HEAD;break;case foe.BODY:case foe.BR:case foe.HTML:Lie(e,t);break;case foe.TEMPLATE:Pie(e,t);break;default:e._err(t,$ae.endTagWithoutMatchingOpenElement)}}(this,e);break;case hie.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case foe.NOSCRIPT:e.openElements.pop(),e.insertionMode=hie.IN_HEAD;break;case foe.BR:Die(e,t);break;default:e._err(t,$ae.endTagWithoutMatchingOpenElement)}}(this,e);break;case hie.AFTER_HEAD:!function(e,t){switch(t.tagID){case foe.BODY:case foe.HTML:case foe.BR:Mie(e,t);break;case foe.TEMPLATE:Pie(e,t);break;default:e._err(t,$ae.endTagWithoutMatchingOpenElement)}}(this,e);break;case hie.IN_BODY:qie(this,e);break;case hie.TEXT:!function(e,t){var n;t.tagID===foe.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current));e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case hie.IN_TABLE:Kie(this,e);break;case hie.IN_TABLE_TEXT:ese(this,e);break;case hie.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case foe.CAPTION:case foe.TABLE:e.openElements.hasInTableScope(foe.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(foe.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=hie.IN_TABLE,n===foe.TABLE&&Kie(e,t));break;case foe.BODY:case foe.COL:case foe.COLGROUP:case foe.HTML:case foe.TBODY:case foe.TD:case foe.TFOOT:case foe.TH:case foe.THEAD:case foe.TR:break;default:qie(e,t)}}(this,e);break;case hie.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case foe.COLGROUP:e.openElements.currentTagId===foe.COLGROUP&&(e.openElements.pop(),e.insertionMode=hie.IN_TABLE);break;case foe.TEMPLATE:Pie(e,t);break;case foe.COL:break;default:rse(e,t)}}(this,e);break;case hie.IN_TABLE_BODY:ose(this,e);break;case hie.IN_ROW:sse(this,e);break;case hie.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case foe.TD:case foe.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=hie.IN_ROW);break;case foe.TABLE:case foe.TBODY:case foe.TFOOT:case foe.THEAD:case foe.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),sse(e,t));break;case foe.BODY:case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.HTML:break;default:qie(e,t)}}(this,e);break;case hie.IN_SELECT:cse(this,e);break;case hie.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===foe.CAPTION||n===foe.TABLE||n===foe.TBODY||n===foe.TFOOT||n===foe.THEAD||n===foe.TR||n===foe.TD||n===foe.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(foe.SELECT),e._resetInsertionMode(),e.onEndTag(t)):cse(e,t)}(this,e);break;case hie.IN_TEMPLATE:!function(e,t){t.tagID===foe.TEMPLATE&&Pie(e,t)}(this,e);break;case hie.AFTER_BODY:dse(this,e);break;case hie.IN_FRAMESET:!function(e,t){t.tagID!==foe.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===foe.FRAMESET||(e.insertionMode=hie.AFTER_FRAMESET))}(this,e);break;case hie.AFTER_FRAMESET:!function(e,t){t.tagID===foe.HTML&&(e.insertionMode=hie.AFTER_AFTER_FRAMESET)}(this,e);break;case hie.AFTER_AFTER_BODY:fse(this,e)}}onEof(e){switch(this.insertionMode){case hie.INITIAL:Nie(this,e);break;case hie.BEFORE_HTML:Iie(this,e);break;case hie.BEFORE_HEAD:Oie(this,e);break;case hie.IN_HEAD:Lie(this,e);break;case hie.IN_HEAD_NO_SCRIPT:Die(this,e);break;case hie.AFTER_HEAD:Mie(this,e);break;case hie.IN_BODY:case hie.IN_TABLE:case hie.IN_CAPTION:case hie.IN_COLUMN_GROUP:case hie.IN_TABLE_BODY:case hie.IN_ROW:case hie.IN_CELL:case hie.IN_SELECT:case hie.IN_SELECT_IN_TABLE:Wie(this,e);break;case hie.TEXT:!function(e,t){e._err(t,$ae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case hie.IN_TABLE_TEXT:ese(this,e);break;case hie.IN_TEMPLATE:use(this,e);break;case hie.AFTER_BODY:case hie.IN_FRAMESET:case hie.AFTER_FRAMESET:case hie.AFTER_AFTER_BODY:case hie.AFTER_AFTER_FRAMESET:Aie(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===Rae.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case hie.IN_HEAD:case hie.IN_HEAD_NO_SCRIPT:case hie.AFTER_HEAD:case hie.TEXT:case hie.IN_COLUMN_GROUP:case hie.IN_SELECT:case hie.IN_SELECT_IN_TABLE:case hie.IN_FRAMESET:case hie.AFTER_FRAMESET:this._insertCharacters(e);break;case hie.IN_BODY:case hie.IN_CAPTION:case hie.IN_CELL:case hie.IN_TEMPLATE:case hie.AFTER_BODY:case hie.AFTER_AFTER_BODY:case hie.AFTER_AFTER_FRAMESET:jie(this,e);break;case hie.IN_TABLE:case hie.IN_TABLE_BODY:case hie.IN_ROW:Yie(this,e);break;case hie.IN_TABLE_TEXT:Qie(this,e)}}}function kie(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):Gie(e,t),n}function xie(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function wie(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let o=0,i=a;i!==n;o++,i=a){a=e.openElements.getCommonAncestor(i);const n=e.activeFormattingElements.getElementEntry(i),s=n&&o>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(i)):(i=Eie(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(i,r),r=i)}return r}function Eie(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 _ie(e,t,n){const r=koe(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);r===foe.TEMPLATE&&a===ooe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Sie(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function Tie(e,t){for(let n=0;n<8;n++){const n=kie(e,t);if(!n)break;const r=xie(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;const a=wie(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&_ie(e,o,a),Sie(e,r,n)}}function Cie(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Aie(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 n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Nie(e,t){e._err(t,$ae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,coe.QUIRKS),e.insertionMode=hie.BEFORE_HTML,e._processToken(t)}function Iie(e,t){e._insertFakeRootElement(),e.insertionMode=hie.BEFORE_HEAD,e._processToken(t)}function Oie(e,t){e._insertFakeElement(doe.HEAD,foe.HEAD),e.headElement=e.openElements.current,e.insertionMode=hie.IN_HEAD,e._processToken(t)}function Rie(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.BASE:case foe.BASEFONT:case foe.BGSOUND:case foe.LINK:case foe.META:e._appendElement(t,ooe.HTML),t.ackSelfClosing=!0;break;case foe.TITLE:e._switchToTextParsing(t,Toe.RCDATA);break;case foe.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Toe.RAWTEXT):(e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_HEAD_NO_SCRIPT);break;case foe.NOFRAMES:case foe.STYLE:e._switchToTextParsing(t,Toe.RAWTEXT);break;case foe.SCRIPT:e._switchToTextParsing(t,Toe.SCRIPT_DATA);break;case foe.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=hie.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(hie.IN_TEMPLATE);break;case foe.HEAD:e._err(t,$ae.misplacedStartTagForHeadElement);break;default:Lie(e,t)}}function Pie(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==foe.TEMPLATE&&e._err(t,$ae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(foe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,$ae.endTagWithoutMatchingOpenElement)}function Lie(e,t){e.openElements.pop(),e.insertionMode=hie.AFTER_HEAD,e._processToken(t)}function Die(e,t){const n=t.type===qae.EOF?$ae.openElementsLeftAfterEof:$ae.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=hie.IN_HEAD,e._processToken(t)}function Mie(e,t){e._insertFakeElement(doe.BODY,foe.BODY),e.insertionMode=hie.IN_BODY,Fie(e,t)}function Fie(e,t){switch(t.type){case qae.CHARACTER:zie(e,t);break;case qae.WHITESPACE_CHARACTER:jie(e,t);break;case qae.COMMENT:Cie(e,t);break;case qae.START_TAG:Vie(e,t);break;case qae.END_TAG:qie(e,t);break;case qae.EOF:Wie(e,t)}}function jie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function zie(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Bie(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ooe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Hie(e){const t=Yae(e,soe.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function Uie(e,t){e._switchToTextParsing(t,Toe.RAWTEXT)}function $ie(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML)}function Vie(e,t){switch(t.tagID){case foe.I:case foe.S:case foe.B:case foe.U:case foe.EM:case foe.TT:case foe.BIG:case foe.CODE:case foe.FONT:case foe.SMALL:case foe.STRIKE:case foe.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case foe.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(doe.A);n&&(Tie(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case foe.H1:case foe.H2:case foe.H3:case foe.H4:case foe.H5:case foe.H6:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&Eoe.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.P:case foe.DL:case foe.OL:case foe.UL:case foe.DIV:case foe.DIR:case foe.NAV:case foe.MAIN:case foe.MENU:case foe.ASIDE:case foe.CENTER:case foe.FIGURE:case foe.FOOTER:case foe.HEADER:case foe.HGROUP:case foe.DIALOG:case foe.DETAILS:case foe.ADDRESS:case foe.ARTICLE:case foe.SEARCH:case foe.SECTION:case foe.SUMMARY:case foe.FIELDSET:case foe.BLOCKQUOTE:case foe.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.LI:case foe.DD:case foe.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const t=e.openElements.tagIDs[r];if(n===foe.LI&&t===foe.LI||(n===foe.DD||n===foe.DT)&&(t===foe.DD||t===foe.DT)){e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t);break}if(t!==foe.ADDRESS&&t!==foe.DIV&&t!==foe.P&&e._isSpecialElement(e.openElements.items[r],t))break}e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.BR:case foe.IMG:case foe.WBR:case foe.AREA:case foe.EMBED:case foe.KEYGEN:Bie(e,t);break;case foe.HR:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._appendElement(t,ooe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case foe.RB:case foe.RTC:!function(e,t){e.openElements.hasInScope(foe.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.RT:case foe.RP:!function(e,t){e.openElements.hasInScope(foe.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(foe.RTC),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.PRE:case foe.LISTING:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case foe.XMP:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Toe.RAWTEXT)}(e,t);break;case foe.SVG:!function(e,t){e._reconstructActiveFormattingElements(),die(t),pie(t),t.selfClosing?e._appendElement(t,ooe.SVG):e._insertElement(t,ooe.SVG),t.ackSelfClosing=!0}(e,t);break;case foe.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case foe.BASE:case foe.LINK:case foe.META:case foe.STYLE:case foe.TITLE:case foe.SCRIPT:case foe.BGSOUND:case foe.BASEFONT:case foe.TEMPLATE:Rie(e,t);break;case foe.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case foe.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case foe.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(foe.NOBR)&&(Tie(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ooe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case foe.MATH:!function(e,t){e._reconstructActiveFormattingElements(),uie(t),pie(t),t.selfClosing?e._appendElement(t,ooe.MATHML):e._insertElement(t,ooe.MATHML),t.ackSelfClosing=!0}(e,t);break;case foe.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==coe.QUIRKS&&e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML),e.framesetOk=!1,e.insertionMode=hie.IN_TABLE}(e,t);break;case foe.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ooe.HTML),Hie(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case foe.PARAM:case foe.TRACK:case foe.SOURCE:!function(e,t){e._appendElement(t,ooe.HTML),t.ackSelfClosing=!0}(e,t);break;case foe.IMAGE:!function(e,t){t.tagName=doe.IMG,t.tagID=foe.IMG,Bie(e,t)}(e,t);break;case foe.BUTTON:!function(e,t){e.openElements.hasInScope(foe.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(foe.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML),e.framesetOk=!1}(e,t);break;case foe.APPLET:case foe.OBJECT:case foe.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case foe.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Toe.RAWTEXT)}(e,t);break;case foe.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===hie.IN_TABLE||e.insertionMode===hie.IN_CAPTION||e.insertionMode===hie.IN_TABLE_BODY||e.insertionMode===hie.IN_ROW||e.insertionMode===hie.IN_CELL?hie.IN_SELECT_IN_TABLE:hie.IN_SELECT}(e,t);break;case foe.OPTION:case foe.OPTGROUP:!function(e,t){e.openElements.currentTagId===foe.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ooe.HTML)}(e,t);break;case foe.NOEMBED:case foe.NOFRAMES:Uie(e,t);break;case foe.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_FRAMESET)}(e,t);break;case foe.TEXTAREA:!function(e,t){e._insertElement(t,ooe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Toe.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=hie.TEXT}(e,t);break;case foe.NOSCRIPT:e.options.scriptingEnabled?Uie(e,t):$ie(e,t);break;case foe.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(foe.P)&&e._closePElement(),e._insertElement(t,ooe.HTML),e.tokenizer.state=Toe.PLAINTEXT}(e,t);break;case foe.COL:case foe.TH:case foe.TD:case foe.TR:case foe.HEAD:case foe.FRAME:case foe.TBODY:case foe.TFOOT:case foe.THEAD:case foe.CAPTION:case foe.COLGROUP:break;default:$ie(e,t)}}function Gie(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const t=e.openElements.items[a],o=e.openElements.tagIDs[a];if(r===o&&(r!==foe.UNKNOWN||e.treeAdapter.getTagName(t)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(t,o))break}}function qie(e,t){switch(t.tagID){case foe.A:case foe.B:case foe.I:case foe.S:case foe.U:case foe.EM:case foe.TT:case foe.BIG:case foe.CODE:case foe.FONT:case foe.NOBR:case foe.SMALL:case foe.STRIKE:case foe.STRONG:Tie(e,t);break;case foe.P:!function(e){e.openElements.hasInButtonScope(foe.P)||e._insertFakeElement(doe.P,foe.P),e._closePElement()}(e);break;case foe.DL:case foe.UL:case foe.OL:case foe.DIR:case foe.DIV:case foe.NAV:case foe.PRE:case foe.MAIN:case foe.MENU:case foe.ASIDE:case foe.BUTTON:case foe.CENTER:case foe.FIGURE:case foe.FOOTER:case foe.HEADER:case foe.HGROUP:case foe.DIALOG:case foe.ADDRESS:case foe.ARTICLE:case foe.DETAILS:case foe.SEARCH:case foe.SECTION:case foe.SUMMARY:case foe.LISTING:case foe.FIELDSET:case foe.BLOCKQUOTE:case foe.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case foe.LI:!function(e){e.openElements.hasInListItemScope(foe.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(foe.LI),e.openElements.popUntilTagNamePopped(foe.LI))}(e);break;case foe.DD:case foe.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case foe.H1:case foe.H2:case foe.H3:case foe.H4:case foe.H5:case foe.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case foe.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(doe.BR,foe.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case foe.BODY:!function(e,t){if(e.openElements.hasInScope(foe.BODY)&&(e.insertionMode=hie.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case foe.HTML:!function(e,t){e.openElements.hasInScope(foe.BODY)&&(e.insertionMode=hie.AFTER_BODY,dse(e,t))}(e,t);break;case foe.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(foe.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(foe.FORM):n&&e.openElements.remove(n))}(e);break;case foe.APPLET:case foe.OBJECT:case foe.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case foe.TEMPLATE:Pie(e,t);break;default:Gie(e,t)}}function Wie(e,t){e.tmplInsertionModeStack.length>0?use(e,t):Aie(e,t)}function Yie(e,t){if(void 0!==e.openElements.currentTagId&&yie.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=hie.IN_TABLE_TEXT,t.type){case qae.CHARACTER:Jie(e,t);break;case qae.WHITESPACE_CHARACTER:Qie(e,t)}else Xie(e,t)}function Zie(e,t){switch(t.tagID){case foe.TD:case foe.TH:case foe.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(doe.TBODY,foe.TBODY),e.insertionMode=hie.IN_TABLE_BODY,ase(e,t)}(e,t);break;case foe.STYLE:case foe.SCRIPT:case foe.TEMPLATE:Rie(e,t);break;case foe.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(doe.COLGROUP,foe.COLGROUP),e.insertionMode=hie.IN_COLUMN_GROUP,nse(e,t)}(e,t);break;case foe.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,ooe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case foe.TABLE:!function(e,t){e.openElements.hasInTableScope(foe.TABLE)&&(e.openElements.popUntilTagNamePopped(foe.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case foe.TBODY:case foe.TFOOT:case foe.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_TABLE_BODY}(e,t);break;case foe.INPUT:!function(e,t){Hie(t)?e._appendElement(t,ooe.HTML):Xie(e,t),t.ackSelfClosing=!0}(e,t);break;case foe.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_CAPTION}(e,t);break;case foe.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_COLUMN_GROUP}(e,t);break;default:Xie(e,t)}}function Kie(e,t){switch(t.tagID){case foe.TABLE:e.openElements.hasInTableScope(foe.TABLE)&&(e.openElements.popUntilTagNamePopped(foe.TABLE),e._resetInsertionMode());break;case foe.TEMPLATE:Pie(e,t);break;case foe.BODY:case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.HTML:case foe.TBODY:case foe.TD:case foe.TFOOT:case foe.TH:case foe.THEAD:case foe.TR:break;default:Xie(e,t)}}function Xie(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Fie(e,t),e.fosterParentingEnabled=n}function Qie(e,t){e.pendingCharacterTokens.push(t)}function Jie(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ese(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Xie(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const tse=new Set([foe.CAPTION,foe.COL,foe.COLGROUP,foe.TBODY,foe.TD,foe.TFOOT,foe.TH,foe.THEAD,foe.TR]);function nse(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.COL:e._appendElement(t,ooe.HTML),t.ackSelfClosing=!0;break;case foe.TEMPLATE:Rie(e,t);break;default:rse(e,t)}}function rse(e,t){e.openElements.currentTagId===foe.COLGROUP&&(e.openElements.pop(),e.insertionMode=hie.IN_TABLE,e._processToken(t))}function ase(e,t){switch(t.tagID){case foe.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_ROW;break;case foe.TH:case foe.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(doe.TR,foe.TR),e.insertionMode=hie.IN_ROW,ise(e,t);break;case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.TBODY:case foe.TFOOT:case foe.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE,Zie(e,t));break;default:Zie(e,t)}}function ose(e,t){const n=t.tagID;switch(t.tagID){case foe.TBODY:case foe.TFOOT:case foe.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE);break;case foe.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE,Kie(e,t));break;case foe.BODY:case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.HTML:case foe.TD:case foe.TH:case foe.TR:break;default:Kie(e,t)}}function ise(e,t){switch(t.tagID){case foe.TH:case foe.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,ooe.HTML),e.insertionMode=hie.IN_CELL,e.activeFormattingElements.insertMarker();break;case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.TBODY:case foe.TFOOT:case foe.THEAD:case foe.TR:e.openElements.hasInTableScope(foe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE_BODY,ase(e,t));break;default:Zie(e,t)}}function sse(e,t){switch(t.tagID){case foe.TR:e.openElements.hasInTableScope(foe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE_BODY);break;case foe.TABLE:e.openElements.hasInTableScope(foe.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE_BODY,ose(e,t));break;case foe.TBODY:case foe.TFOOT:case foe.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(foe.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=hie.IN_TABLE_BODY,ose(e,t));break;case foe.BODY:case foe.CAPTION:case foe.COL:case foe.COLGROUP:case foe.HTML:case foe.TD:case foe.TH:break;default:Kie(e,t)}}function lse(e,t){switch(t.tagID){case foe.HTML:Vie(e,t);break;case foe.OPTION:e.openElements.currentTagId===foe.OPTION&&e.openElements.pop(),e._insertElement(t,ooe.HTML);break;case foe.OPTGROUP:e.openElements.currentTagId===foe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===foe.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ooe.HTML);break;case foe.HR:e.openElements.currentTagId===foe.OPTION&&e.openElements.pop(),e.openElements.currentTagId===foe.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ooe.HTML),t.ackSelfClosing=!0;break;case foe.INPUT:case foe.KEYGEN:case foe.TEXTAREA:case foe.SELECT:e.openElements.hasInSelectScope(foe.SELECT)&&(e.openElements.popUntilTagNamePopped(foe.SELECT),e._resetInsertionMode(),t.tagID!==foe.SELECT&&e._processStartTag(t));break;case foe.SCRIPT:case foe.TEMPLATE:Rie(e,t)}}function cse(e,t){switch(t.tagID){case foe.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===foe.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===foe.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===foe.OPTGROUP&&e.openElements.pop();break;case foe.OPTION:e.openElements.currentTagId===foe.OPTION&&e.openElements.pop();break;case foe.SELECT:e.openElements.hasInSelectScope(foe.SELECT)&&(e.openElements.popUntilTagNamePopped(foe.SELECT),e._resetInsertionMode());break;case foe.TEMPLATE:Pie(e,t)}}function use(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(foe.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Aie(e,t)}function dse(e,t){var n;if(t.tagID===foe.HTML){if(e.fragmentContext||(e.insertionMode=hie.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===foe.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else pse(e,t)}function pse(e,t){e.insertionMode=hie.IN_BODY,Fie(e,t)}function fse(e,t){e.insertionMode=hie.IN_BODY,Fie(e,t)}function hse(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ooe.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}doe.AREA,doe.BASE,doe.BASEFONT,doe.BGSOUND,doe.BR,doe.COL,doe.EMBED,doe.FRAME,doe.HR,doe.IMG,doe.INPUT,doe.KEYGEN,doe.LINK,doe.META,doe.PARAM,doe.SOURCE,doe.TRACK,doe.WBR;const mse=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,gse=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),yse={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function bse(e,t){const n=function(e){const t="root"===e.type?e.children[0]:e;return Boolean(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName.toLowerCase()))}(e),r=wae("type",{handlers:{root:kse,element:xse,text:wse,comment:Sse,doctype:Ese,raw:Tse},unknown:Cse}),a={parser:n?new vie(yse):vie.getFragmentParser(void 0,yse),handle(e){r(e,a)},stitches:!1,options:t||{}};r(e,a),Ase(a,kee());const o=function(e,t){const n=t||{};return gae({file:n.file||void 0,location:!1,schema:"svg"===n.space?$7:U7,verbose:n.verbose||!1},e)}(n?a.parser.document:a.parser.getFragment(),{file:a.options.file});return a.stitches&&ure(o,"comment",(function(e,t,n){const r=e;if(r.value.stitch&&n&&void 0!==t){return n.children[t]=r.value.stitch,t}})),"root"===o.type&&1===o.children.length&&o.children[0].type===e.type?o.children[0]:o}function vse(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function kse(e,t){vse(e.children,t)}function xse(e,t){!function(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Toe.PLAINTEXT)return;Ase(t,kee(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:fae.html;a===fae.html&&"svg"===n&&(a=fae.svg);const o=function(e,t){const n=(t||Eae).space;return Sae(e,"svg"===n?$7:U7)}({...e,children:[]},{space:a===fae.svg?"svg":"html"}),i={type:qae.START_TAG,tagName:n,tagID:koe(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:Ise(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}(e,t),vse(e.children,t),function(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Nae.includes(n))return;if(t.parser.tokenizer.state===Toe.PLAINTEXT)return;Ase(t,vee(e));const r={type:qae.END_TAG,tagName:n,tagID:koe(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ise(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n!==t.parser.tokenizer.lastStartTagName||t.parser.tokenizer.state!==Toe.RCDATA&&t.parser.tokenizer.state!==Toe.RAWTEXT&&t.parser.tokenizer.state!==Toe.SCRIPT_DATA||(t.parser.tokenizer.state=Toe.DATA)}(e,t)}function wse(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:qae.CHARACTER,chars:e.value,location:Ise(e)};Ase(t,kee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Ese(e,t){const n={type:qae.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ise(e)};Ase(t,kee(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function _se(e,t){t.stitches=!0;const n=function(e){return ere("children"in e?{...e,children:[]}:e)}(e);if("children"in e&&"children"in n){const r=bse({type:"root",children:e.children},t.options);n.children=r.children}Sse({type:"comment",value:{stitch:n}},t)}function Sse(e,t){const n=e.value,r={type:qae.COMMENT,data:n,location:Ise(e)};Ase(t,kee(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Tse(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,Nse(t,kee(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(mse,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),72===t.parser.tokenizer.state||78===t.parser.tokenizer.state){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function Cse(e,t){const n=e;if(!t.options.passThrough||!t.options.passThrough.includes(n.type)){let e="";throw gse.has(n.type)&&(e=". 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"+e)}_se(n,t)}function Ase(e,t){Nse(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=Toe.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 Nse(e,t){if(t&&void 0!==t.offset){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=1-t.column,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Ise(e){const t=kee(e)||{line:void 0,column:void 0,offset:void 0},n=vee(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 Ose(e){return function(t,n){return bse(t,{...e,file:n})}}function Rse(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;-1!==a;)r++,a=n.indexOf(t,a+t.length);return r}function Pse(e,t,n){const r=rre((n||{}).ignore||[]),a=function(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 e=n[r];t.push([Lse(e[0]),Dse(e[1])])}return t}(t);let o=-1;for(;++o<a.length;)cre(e,"text",i);function i(e,t){let n,i=-1;for(;++i<t.length;){const e=t[i],a=n?n.children:void 0;if(r(e,a?a.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=a[o][0],i=a[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,a={index:d.index,input:d.input,stack:[...t,e]};let o=i(...d,a);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function Lse(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function Dse(e){return"function"==typeof e?e:function(){return e}}const Mse="phrasing",Fse=["autolink","link","image","label"];function jse(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function zse(e){this.config.enter.autolinkProtocol.call(this,e)}function Bse(e){this.config.exit.autolinkProtocol.call(this,e)}function Hse(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 Use(e){this.config.exit.autolinkEmail.call(this,e)}function $se(e){this.exit(e)}function Vse(e){Pse(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Gse],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),qse]],{ignore:["link","linkReference"]})}function Gse(e,t,n,r,a){let o="";if(!Wse(a))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");if(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])))return!1;return!0}(n))return!1;const i=function(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 a=Rse(e,"(");let o=Rse(e,")");for(;-1!==r&&a>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!i[0])return!1;const s={type:"link",title:null,url:o+t+i[0],children:[{type:"text",value:t+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function qse(e,t,n,r){return!(!Wse(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Wse(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||mte(n)||hte(n))&&(!t||47!==n)}function Yse(){this.buffer()}function Zse(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Kse(){this.buffer()}function Xse(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Qse(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=rte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Jse(e){this.exit(e)}function ele(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=rte(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tle(e){this.exit(e)}function nle(e,t,n,r){const a=n.createTracker(r);let o=a.move("[^");const i=n.enter("footnoteReference"),s=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),i(),o+=a.move("]"),o}function rle(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,a){const o=r.createTracker(a);let i=o.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");i+=o.move(r.safe(r.associationId(e),{before:i,after:"]"})),l(),i+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),i+=o.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,o.current()),t?ole:ale)));return s(),i},footnoteReference:nle},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function ale(e,t,n){return 0===t?e:ole(e,t,n)}function ole(e,t,n){return(n?"":" ")+e}nle.peek=function(){return"["};const ile=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function sle(e){this.enter({type:"delete",children:[]},e)}function lle(e){this.exit(e)}function cle(e,t,n,r){const a=n.createTracker(r),o=n.enter("strikethrough");let i=a.move("~~");return i+=n.containerPhrasing(e,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),o(),i}function ule(e){return e.length}function dle(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function ple(e,t,n){return">"+(n?"":" ")+e}function fle(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function hle(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if("\n"===n.unsafe[a].character&&(o=n.stack,i=n.unsafe[a],fle(o,i.inConstruct,!0)&&!fle(o,i.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var o,i;return"\\\n"}function mle(e,t,n){return(n?"":" ")+e}function gle(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 yle(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ble(e,t,n){const r=wte(e),a=wte(t);return void 0===r?void 0===a?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===a?{inside:!1,outside:!1}:1===a?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function vle(e,t,n,r){const a=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),i=n.createTracker(r),s=i.move(a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=ble(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=yle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=ble(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+yle(d));const f=i.move(a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function kle(e){return e.value||""}function xle(e,t,n,r){const a=gle(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),c+=l.move(")"),i(),c}function wle(e,t,n,r){const a=e.referenceType,o=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Ele(e,t,n){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let a;if(e.atBreak)for(;a=t.exec(r);){let e=a.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(a.index+1)}}return a+r+a}function _le(e,t){const n=Gee(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function Sle(e,t,n,r){const a=gle(n),o='"'===a?"Quote":"Apostrophe",i=n.createTracker(r);let s,l;if(_le(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=i.move("<");return r+=i.move(n.containerPhrasing(e,{before:r,after:">",...i.current()})),r+=i.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=i.move("[");return c+=i.move(n.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(n.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(l=n.enter("destinationRaw"),c+=i.move(n.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=i.move(" "+a),c+=i.move(n.safe(e.title,{before:c,after:a,...i.current()})),c+=i.move(a),l()),c+=i.move(")"),s(),c}function Tle(e,t,n,r){const a=e.referenceType,o=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const u=n.stack;n.stack=[],i=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return i(),n.stack=u,o(),"full"!==a&&c&&c===d?"shortcut"===a?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function Cle(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 Ale(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}cle.peek=function(){return"~"},vle.peek=function(e,t,n){return n.options.emphasis||"*"},kle.peek=function(){return"<"},xle.peek=function(){return"!"},wle.peek=function(){return"!"},Ele.peek=function(){return"`"},Sle.peek=function(e,t,n){return _le(e,n)?"<":"["},Tle.peek=function(){return"["};const Nle=rre(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Ile(e,t,n,r){const a=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),i=n.createTracker(r),s=i.move(a+a);let l=i.move(n.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),u=ble(r.before.charCodeAt(r.before.length-1),c,a);u.inside&&(l=yle(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=ble(r.after.charCodeAt(0),d,a);p.inside&&(l=l.slice(0,-1)+yle(d));const f=i.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}Ile.peek=function(e,t,n){return n.options.strong||"*"};const Ole={blockquote:function(e,t,n,r){const a=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const i=n.indentLines(n.containerFlow(e,o.current()),ple);return a(),i},break:hle,code:function(e,t,n,r){const a=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",i="`"===a?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,mle);return e(),t}const s=n.createTracker(r),l=a.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),a=r,o=0,i=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===a?++o>i&&(i=o):o=1,a=r+t.length,r=n.indexOf(t,a);return i}(o,a)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${i}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${i}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),o&&(u+=s.move(o+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const a=gle(n),o='"'===a?"Quote":"Apostrophe",i=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(n.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),i(),c},emphasis:vle,hardBreak:hle,heading:function(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return ure(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,lre})),Boolean((!e.depth||e.depth<3)&&Gee(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),i=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),i+"\n"+(1===a?"=":"-").repeat(i.length-(Math.max(i.lastIndexOf("\r"),i.lastIndexOf("\n"))+1))}const i="#".repeat(a),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(i+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=yle(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,n.options.closeAtx&&(c+=" "+i),l(),s(),c},html:kle,image:xle,imageReference:wle,inlineCode:Ele,link:Sle,linkReference:Tle,list:function(e,t,n,r){const a=n.enter("list"),o=n.bulletCurrent;let i=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):Cle(n);const s=e.ordered?"."===i?")":".":function(e){const t=Cle(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}(n);let l=!(!t||!n.bulletLastUsed)&&i===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==i&&"-"!==i||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),Ale(n)===i&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(i=s),n.bulletCurrent=i;const c=n.containerFlow(e,r);return n.bulletLastUsed=i,n.bulletCurrent=o,a(),c},listItem:function(e,t,n,r){const a=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||Cle(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let i=o.length+1;("tab"===a||"mixed"===a&&(t&&"list"===t.type&&t.spread||e.spread))&&(i=4*Math.ceil(i/4));const s=n.createTracker(r);s.move(o+" ".repeat(i-o.length)),s.shift(i);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(i))+e;return(n?o:o+" ".repeat(i-o.length))+e}));return l(),c},paragraph:function(e,t,n,r){const a=n.enter("paragraph"),o=n.enter("phrasing"),i=n.containerPhrasing(e,r);return o(),a(),i},root:function(e,t,n,r){return(e.children.some((function(e){return Nle(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:Ile,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(Ale(n)+(n.options.ruleSpaces?" ":"")).repeat(function(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}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function Rle(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function Ple(e){this.exit(e),this.data.inTable=void 0}function Lle(e){this.enter({type:"tableRow",children:[]},e)}function Dle(e){this.exit(e)}function Mle(e){this.enter({type:"tableCell",children:[]},e)}function Fle(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,jle));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function jle(e,t){return"|"===t?t:e}function zle(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=Ole.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let a=-1;const o=[],i=t.enter("table");for(;++a<r.length;)o[a]=l(r[a],t,n);return i(),o}(e,n,r),e.align)},tableCell:i,tableRow:function(e,t,n,r){const a=s([l(e,n,r)]);return a.slice(0,a.indexOf("\n"))}}};function i(e,t,n,r){const a=n.enter("tableCell"),i=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:o,after:o});return i(),a(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||ule,o=[],i=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const i=null==(d=e[u][o])?"":String(d);if(!1!==n.alignDelimiters){const e=a(i);r[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(i)}i[u]=t,s[u]=r}var d;let p=-1;if("object"==typeof r&&"length"in r)for(;++p<c;)o[p]=dle(r[p]);else{const e=dle(r);for(;++p<c;)o[p]=e}p=-1;const f=[],h=[];for(;++p<c;){const e=o[p];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let a=!1===n.alignDelimiters?1:Math.max(1,l[p]-t.length-r.length);const i=t+"-".repeat(a)+r;!1!==n.alignDelimiters&&(a=t.length+a+r.length,a>l[p]&&(l[p]=a),h[p]=a),f[p]=i}i.splice(1,0,f),s.splice(1,0,h),u=-1;const m=[];for(;++u<i.length;){const e=i[u],t=s[u];p=-1;const r=[];for(;++p<c;){const a=e[p]||"";let i="",s="";if(!1!==n.alignDelimiters){const e=l[p]-(t[p]||0),n=o[p];114===n?i=" ".repeat(e):99===n?e%2?(i=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(i=" ".repeat(e/2),s=i):s=" ".repeat(e)}!1===n.delimiterStart||p||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===a||!1===n.delimiterStart&&!p||r.push(" "),!1!==n.alignDelimiters&&r.push(i),r.push(a),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&p===c-1||r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:a})}function l(e,t,n){const r=e.children;let a=-1;const o=[],s=t.enter("tableRow");for(;++a<r.length;)o[a]=i(r[a],0,t,n);return s(),o}}function Ble(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function Hle(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let a,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){a=e;break}}a===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Ule(e,t,n,r){const a=e.children[0],o="boolean"==typeof e.checked&&a&&"paragraph"===a.type,i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(i);let l=Ole.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+i}))),l}const $le={tokenize:function(e,t,n){let r=0;return function t(o){if((87===o||119===o)&&r<3)return r++,e.consume(o),t;if(46===o&&3===r)return e.consume(o),a;return n(o)};function a(e){return null===e?n(e):t(e)}},partial:!0},Vle={tokenize:function(e,t,n){let r,a,o;return i;function i(t){return 46===t||95===t?e.check(qle,l,s)(t):null===t||pte(t)||mte(t)||45!==t&&hte(t)?l(t):(o=!0,e.consume(t),i)}function s(t){return 95===t?r=!0:(a=r,r=void 0),e.consume(t),i}function l(e){return a||r||!o?n(e):t(e)}},partial:!0},Gle={tokenize:function(e,t){let n=0,r=0;return a;function a(i){return 40===i?(n++,e.consume(i),a):41===i&&r<n?o(i):33===i||34===i||38===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||60===i||63===i||93===i||95===i||126===i?e.check(qle,t,o)(i):null===i||pte(i)||mte(i)?t(i):(e.consume(i),a)}function o(t){return 41===t&&r++,e.consume(t),a}},partial:!0},qle={tokenize:function(e,t,n){return r;function r(i){return 33===i||34===i||39===i||41===i||42===i||44===i||46===i||58===i||59===i||63===i||95===i||126===i?(e.consume(i),r):38===i?(e.consume(i),o):93===i?(e.consume(i),a):60===i||null===i||pte(i)||mte(i)?t(i):n(i)}function a(e){return null===e||40===e||91===e||pte(e)||mte(e)?t(e):r(e)}function o(e){return ate(e)?i(e):n(e)}function i(t){return 59===t?(e.consume(t),r):ate(t)?(e.consume(t),i):n(t)}},partial:!0},Wle={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return ote(e)?n(e):t(e)}},partial:!0},Yle={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!Jle.call(r,r.previous)||rce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($le,e.attempt(Vle,e.attempt(Gle,a),n),n)(t)};function a(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:Jle},Zle={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let a="",o=!1;return function(t){if((72===t||104===t)&&ece.call(r,r.previous)&&!rce(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(t),e.consume(t),i;return n(t)};function i(t){if(ate(t)&&a.length<5)return a+=String.fromCodePoint(t),e.consume(t),i;if(58===t){const n=a.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||ste(t)||pte(t)||mte(t)||hte(t)?n(t):e.attempt(Vle,e.attempt(Gle,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:ece},Kle={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let a,o;return function(t){if(!nce(t)||!tce.call(r,r.previous)||rce(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),i(t)};function i(t){return nce(t)?(e.consume(t),i):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(Wle,c,l)(t):45===t||95===t||ote(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),a=!0,s}function c(i){return o&&a&&ate(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(i)):n(i)}},previous:tce},Xle={};let Qle=48;for(;Qle<123;)Xle[Qle]=Kle,Qle++,58===Qle?Qle=65:91===Qle&&(Qle=97);function Jle(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||pte(e)}function ece(e){return!ate(e)}function tce(e){return!(47===e||nce(e))}function nce(e){return 43===e||45===e||46===e||95===e||ote(e)}function rce(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}Xle[43]=Kle,Xle[45]=Kle,Xle[46]=Kle,Xle[95]=Kle,Xle[72]=[Kle,Zle],Xle[104]=[Kle,Zle],Xle[87]=[Kle,Yle],Xle[119]=[Kle,Yle];const ace={tokenize:function(e,t,n){const r=this;return bte(e,(function(e){const a=r.events[r.events.length-1];return a&&"gfmFootnoteDefinitionIndent"===a[1].type&&4===a[2].sliceSerialize(a[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function oce(e,t,n){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;a--;){const e=r.events[a][1];if("labelImage"===e.type){i=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(a){if(!i||!i._balanced)return n(a);const s=rte(r.sliceSerialize({start:i.end,end:r.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return n(a);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)}}function ice(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){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)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function sce(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(i>999||93===s&&!o||null===s||91===s||pte(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return a.includes(rte(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return pte(s)||(o=!0),i++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),i++,l):l(t)}}function lce(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!i||null===t||91===t||pte(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=rte(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return pte(t)||(i=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a.includes(o)||a.push(o),bte(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function cce(e,t,n){return e.check(Cte,t,e.attempt(ace,t,n))}function uce(e){e.exit("gfmFootnoteDefinition")}function dce(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const a=this.previous,o=this.events;let i=0;return function(t){if(126===a&&"characterEscape"!==o[o.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const l=wte(a);if(126===o)return i>1?r(o):(e.consume(o),i++,s);if(i<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=wte(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const a={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i=[["enter",a,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&Kee(i,i.length,0,Ete(s,e.slice(r+1,n),t)),Kee(i,i.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",a,t]]),Kee(e,r-1,n-r+3,i),n=r+i.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class pce{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let a=0;if(0===n&&0===r.length)return;for(;a<e.map.length;){if(e.map[a][0]===t)return e.map[a][1]+=n,void e.map[a][2].push(...r);a+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function fce(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if("enter"===a[0])"tableContent"===a[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===a[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===a[1].type)break}else"enter"===a[0]&&"tableDelimiterRow"===a[1].type&&(n=!0);t+=1}return r}function hce(e,t,n){const r=this;let a,o=0,i=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const a=t>-1?r.events[t][1].type:null,o="tableHead"===a||"tableRow"===a?k:s;if(o===k&&r.parser.lazy[r.now().line])return n(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return a=!0,i+=1,l(e)}(t)}function l(t){return null===t?n(t):dte(t)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):fte(t)?bte(e,l,"whitespace")(t):(i+=1,a&&(a=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),a=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||pte(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),a=!1,fte(t)?bte(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(a=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return fte(t)?bte(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(i+=1,m(t)):null===t||dte(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return fte(t)?bte(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?p(n):(null===n||dte(n))&&a&&o===i?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function k(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||dte(n)?(e.exit("tableRow"),t(n)):fte(n)?bte(e,x,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||pte(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?E:w)}function E(t){return 92===t||124===t?(e.consume(t),w):w(t)}}function mce(e,t){let n,r,a,o=-1,i=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new pce;for(;++o<e.length;){const f=e[o],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(yce(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(i=!0,a=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(i?i=!1:(0!==l[1]&&(c[0]=c[1],a=gce(p,t,l,s,void 0,a)),l=c,c=[l[1],o,0,0])):(i=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],a=gce(p,t,l,s,void 0,a),l=[0,0,0,0]),c[2]=o)):"tableHead"===h.type?(u=!0,d=o):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=o,0!==l[1]?(c[0]=c[1],a=gce(p,t,l,s,o,a)):0!==c[1]&&(a=gce(p,t,c,s,o,a)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=o)}for(0!==d&&yce(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=fce(t.events,o))}return e}function gce(e,t,n,r,a,o){const i=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},bce(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=bce(t.events,n[1]);if(o={type:i,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const a=bce(t.events,n[2]),o=bce(t.events,n[3]),i={type:"tableContent",start:Object.assign({},a),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",i,t]]),2!==r){const r=t.events[n[2]],a=t.events[n[3]];if(r[1].end=Object.assign({},a[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",i,t]])}return void 0!==a&&(o.end=Object.assign({},bce(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function yce(e,t,n,r,a){const o=[],i=bce(t.events,n);a&&(a.end=Object.assign({},i),o.push(["exit",a,t])),r.end=Object.assign({},i),o.push(["exit",r,t]),e.add(n+1,0,o)}function bce(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const vce={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),a};function a(t){return pte(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),i):n(t)}function i(r){return dte(r)?t(r):fte(r)?e.check({tokenize:kce},t,n)(r):n(r)}}};function kce(e,t,n){return bte(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const xce={};function wce(e){const t=e||xce,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return Jee([{text:Xle},{document:{91:{name:"gfmFootnoteDefinition",tokenize:lce,continuation:{tokenize:cce},exit:uce}},text:{91:{name:"gfmFootnoteCall",tokenize:sce},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oce,resolveTo:ice}}},dce(e),{flow:{null:{name:"table",tokenize:hce,resolveAll:mce}}},{text:{91:vce}}])}(t)),a.push([{transforms:[Vse],enter:{literalAutolink:jse,literalAutolinkEmail:zse,literalAutolinkHttp:zse,literalAutolinkWww:zse},exit:{literalAutolink:$se,literalAutolinkEmail:Use,literalAutolinkHttp:Bse,literalAutolinkWww:Hse}},{enter:{gfmFootnoteCallString:Yse,gfmFootnoteCall:Zse,gfmFootnoteDefinitionLabelString:Kse,gfmFootnoteDefinition:Xse},exit:{gfmFootnoteCallString:Qse,gfmFootnoteCall:Jse,gfmFootnoteDefinitionLabelString:ele,gfmFootnoteDefinition:tle}},{canContainEols:["delete"],enter:{strikethrough:sle},exit:{strikethrough:lle}},{enter:{table:Rle,tableData:Mle,tableHeader:Mle,tableRow:Lle},exit:{codeText:Fle,table:Ple,tableData:Dle,tableHeader:Dle,tableRow:Dle}},{exit:{taskListCheckValueChecked:Ble,taskListCheckValueUnchecked:Ble,paragraph:Hle}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Mse,notInConstruct:Fse},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Mse,notInConstruct:Fse},{character:":",before:"[ps]",after:"\\/",inConstruct:Mse,notInConstruct:Fse}]},rle(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ile}],handlers:{delete:cle}},zle(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ule}}]}}(t))}const Ece=function(e){if(null==e)return Sce;if("string"==typeof e)return function(e){return _ce(t);function t(t){return t&&t.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ece(e[n]);return _ce(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].call(this,...e))return!0;return!1}}(e):function(e){return _ce(t);function t(t){let n;for(n in e)if(t[n]!==e[n])return!1;return!0}}(e);if("function"==typeof e)return _ce(e);throw new Error("Expected function, string, or object as test")};function _ce(e){return function(t,...n){return Boolean(t&&"object"==typeof t&&"type"in t&&Boolean(e.call(this,t,...n)))}}function Sce(){return!0}const Tce=!0,Cce=!1,Ace=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null);const a=Ece(t),o=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=[];if((!t||a(i,s,l[l.length-1]||null))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Tce,e];return[e]}(n(i,l)),p[0]===Cce))return p;if(i.children&&"skip"!==p[0])for(u=(r?i.children.length:-1)+o,d=l.concat(i);u>-1&&u<i.children.length;){if(c=e(i.children[u],u,d)(),c[0]===Cce)return c;u="number"==typeof c[1]?c[1]:u+o}return p}}(e,void 0,[])()};const Nce=function(e,t,n,r){"function"==typeof t&&"function"!=typeof n&&(r=n,n=t,t=null),Ace(e,t,(function(e,t){const r=t[t.length-1];return n(e,r?r.children.indexOf(e):null,r)}),r)};function Ice(){return e=>{Nce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\^/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"superscript",data:{hName:"sup"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)})),Nce(e,["text"],((e,t,n)=>{if("text"!==e.type)return;const{value:r}=e,a=r.split(/\~/);if(1===a.length||a.length%2==0)return;const o=a.map(((e,t)=>t%2==0?{type:"text",value:e}:{type:"subscript",data:{hName:"sub"},children:[{type:"text",value:e}]}));n.children.splice(t,1,...o)}))}}function Oce(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Oce(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Rce(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Oce(e))&&(r&&(r+=" "),r+=t);return r}var Pce,Lce,Dce,Mce,Fce,jce,zce,Bce=Object.create,Hce=Object.defineProperty,Uce=Object.defineProperties,$ce=Object.getOwnPropertyDescriptor,Vce=Object.getOwnPropertyDescriptors,Gce=Object.getOwnPropertyNames,qce=Object.getOwnPropertySymbols,Wce=Object.getPrototypeOf,Yce=Object.prototype.hasOwnProperty,Zce=Object.prototype.propertyIsEnumerable,Kce=(e,t,n)=>t in e?Hce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xce=(e,t)=>{for(var n in t||(t={}))Yce.call(t,n)&&Kce(e,n,t[n]);if(qce)for(var n of qce(t))Zce.call(t,n)&&Kce(e,n,t[n]);return e},Qce=(e,t)=>Uce(e,Vce(t)),Jce=(e,t)=>{var n={};for(var r in e)Yce.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&qce)for(var r of qce(e))t.indexOf(r)<0&&Zce.call(e,r)&&(n[r]=e[r]);return n},eue=(Pce={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(t,n){var a,o;switch(n=n||{},r.util.type(t)){case"Object":if(o=r.util.objId(t),n[o])return n[o];for(var i in a={},n[o]=a,t)t.hasOwnProperty(i)&&(a[i]=e(t[i],n));return a;case"Array":return o=r.util.objId(t),n[o]?n[o]:(a=[],n[o]=a,t.forEach((function(t,r){a[r]=e(t,n)})),a);default:return t}},getLanguage:function(t){for(;t;){var n=e.exec(t.className);if(n)return n[1].toLowerCase();t=t.parentElement}return"none"},setLanguage:function(t,n){t.className=t.className.replace(RegExp(e,"gi"),""),t.classList.add("language-"+n)},isActive:function(e,t,n){for(var r="no-"+t;e;){var a=e.classList;if(a.contains(t))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:n,plaintext:n,text:n,txt:n,extend:function(e,t){var n=r.util.clone(r.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(e,t,n,a){var o=(a=a||r.languages)[e],i={};for(var s in o)if(o.hasOwnProperty(s)){if(s==t)for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);n.hasOwnProperty(s)||(i[s]=o[s])}var c=a[e];return a[e]=i,r.languages.DFS(r.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,a,o){o=o||{};var i=r.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],a||s);var l=t[s],c=r.util.type(l);"Object"!==c||o[i(l)]?"Array"!==c||o[i(l)]||(o[i(l)]=!0,e(l,n,s,o)):(o[i(l)]=!0,e(l,n,null,o))}}},plugins:{},highlight:function(e,t,n){var o={code:e,grammar:t,language:n};if(r.hooks.run("before-tokenize",o),!o.grammar)throw new Error('The language "'+o.language+'" has no grammar.');return o.tokens=r.tokenize(o.code,o.grammar),r.hooks.run("after-tokenize",o),a.stringify(r.util.encode(o.tokens),o.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var a=new s;return l(a,a.head,e),i(e,a,t,a.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(a)},hooks:{all:{},add:function(e,t){var n=r.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=r.hooks.all[e];if(n&&n.length)for(var a,o=0;a=n[o++];)a(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function o(e,t,n,r){e.lastIndex=t;var a=e.exec(n);if(a&&r&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function i(e,t,n,s,u,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var h=0;h<f.length;++h){if(d&&d.cause==p+","+h)return;var m=f[h],g=m.inside,y=!!m.lookbehind,b=!!m.greedy,v=m.alias;if(b&&!m.pattern.global){var k=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,k+"g")}for(var x=m.pattern||m,w=s.next,E=u;w!==t.tail&&!(d&&E>=d.reach);E+=w.value.length,w=w.next){var _=w.value;if(t.length>e.length)return;if(!(_ instanceof a)){var S,T=1;if(b){if(!(S=o(x,E,e,y))||S.index>=e.length)break;var C=S.index,A=S.index+S[0].length,N=E;for(N+=w.value.length;C>=N;)N+=(w=w.next).value.length;if(E=N-=w.value.length,w.value instanceof a)continue;for(var I=w;I!==t.tail&&(N<A||"string"==typeof I.value);I=I.next)T++,N+=I.value.length;T--,_=e.slice(E,N),S.index-=E}else if(!(S=o(x,0,_,y)))continue;C=S.index;var O=S[0],R=_.slice(0,C),P=_.slice(C+O.length),L=E+_.length;d&&L>d.reach&&(d.reach=L);var D=w.prev;if(R&&(D=l(t,D,R),E+=R.length),c(t,D,T),w=l(t,D,new a(p,g?r.tokenize(O,g):O,v,O)),P&&l(t,w,P),T>1){var M={cause:p+","+h,reach:L};i(e,t,n,w.prev,E,M),d&&M.reach>d.reach&&(d.reach=M.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function c(e,t,n){for(var r=t.next,a=0;a<n&&r!==e.tail;a++)r=r.next;t.next=r,r.prev=t,e.length-=a}return a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var a="";return t.forEach((function(t){a+=e(t,n)})),a}var o={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(o.classes,i):o.classes.push(i)),r.hooks.run("wrap",o);var s="";for(var l in o.attributes)s+=" "+l+'="'+(o.attributes[l]||"").replace(/"/g,""")+'"';return"<"+o.tag+' class="'+o.classes.join(" ")+'"'+s+">"+o.content+"</"+o.tag+">"},r}();t.exports=n,n.default=n}},function(){return Lce||(0,Pce[Gce(Pce)[0]])((Lce={exports:{}}).exports,Lce),Lce.exports}),tue=((e,t,n)=>(n=null!=e?Bce(Wce(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of Gce(t))Yce.call(e,a)||a===n||Hce(e,a,{get:()=>t[a],enumerable:!(r=$ce(t,a))||r.enumerable});return e})(e&&e.__esModule?n:Hce(n,"default",{value:e,enumerable:!0}),e)))(eue());tue.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},tue.languages.markup.tag.inside["attr-value"].inside.entity=tue.languages.markup.entity,tue.languages.markup.doctype.inside["internal-subset"].inside=tue.languages.markup,tue.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(tue.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:tue.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i,{"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:tue.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:n},tue.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(tue.languages.markup.tag,"addAttribute",{value:function(e,t){tue.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:tue.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),tue.languages.html=tue.languages.markup,tue.languages.mathml=tue.languages.markup,tue.languages.svg=tue.languages.markup,tue.languages.xml=tue.languages.extend("markup",{}),tue.languages.ssml=tue.languages.xml,tue.languages.atom=tue.languages.xml,tue.languages.rss=tue.languages.xml,Dce=tue,Mce={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},jce="(?:[^\\\\-]|"+(Fce=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",jce=RegExp(jce+"-"+jce),zce={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},Dce.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:jce,inside:{escape:Fce,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":Mce,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:Fce}},"special-escape":Mce,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":zce}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:Fce,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":zce}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}},tue.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},tue.languages.javascript=tue.languages.extend("clike",{"class-name":[tue.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),tue.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,tue.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:tue.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:tue.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:tue.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:tue.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:tue.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),tue.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:tue.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),tue.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),tue.languages.markup&&(tue.languages.markup.tag.addInlined("script","javascript"),tue.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),tue.languages.js=tue.languages.javascript,tue.languages.actionscript=tue.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),tue.languages.actionscript["class-name"].alias="function",delete tue.languages.actionscript.parameter,delete tue.languages.actionscript["literal-property"],tue.languages.markup&&tue.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:tue.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(tue),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach((function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var s=0,l=i.length;s<l;s++)i[s]instanceof RegExp&&(i[s]={pattern:i[s]}),r(i[s]);else r(i)}}))}}),t.addSupport(["java","javascript","php"],t)}(tue),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;(t=(e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css,e.languages.markup))&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(tue),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,n=(t=(e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+t.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[t,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(tue),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+a+"|"+o+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(tue),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var a,o=t[n];"code"!==o.type?e(o.content):(a=o.content[1],o=o.content[3],a&&o&&"code-language"===a.type&&"code-block"===o.type&&"string"==typeof a.content&&(a=a.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),a="language-"+(a=(/[a-z][\w-]*/i.exec(a)||[""])[0].toLowerCase()),o.alias?"string"==typeof o.alias?o.alias=[o.alias,a]:o.alias.push(a):o.alias=[a]))}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,a=t.classes.length;r<a;r++){var o=t.classes[r];if(o=/language-(.+)/.exec(o)){n=o[1];break}}var c,u=e.languages[n];u?t.content=e.highlight(t.content.replace(i,"").replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;return"#"===(t=t.toLowerCase())[0]?(n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),l(n)):s[t]||e})),u,n):n&&"none"!==n&&e.plugins.autoloader&&(c="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random()),t.attributes.id=c,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(c);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})))}})),RegExp(e.languages.markup.tag.pattern.source,"gi")),s={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(tue),tue.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:tue.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},tue.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var a=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var o=p(/^\($/,/^\)$/);if(-1===o)continue;for(;n<o;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),a.push(i.content))}n=o+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),0<a.length)){var s=p(/^\{$/,/^\}$/);if(-1!==s)for(var l=n;l<s;l++){var c=t[l];"variable"===c.type&&0<=a.indexOf(c.content)&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return}return 1}function p(e,r){for(var a=1,o=n;o<t.length;o++){var i=t[o],s=i.content;if("punctuation"===i.type&&"string"==typeof s)if(e.test(s))a++;else if(r.test(s)&&0==--a)return o}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),tue.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function l(t,n,i){var l=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),c=0,u={},d=(l=s(l.map((function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=c++,n="___"+i.toUpperCase()+"_"+r+"___")););return u[n]=e,n})).join(""),n,i),Object.keys(u));return c=0,function t(n){for(var o=0;o<n.length;o++){if(c>=d.length)return;var i,l,p,f,h,m,g,y=n[o];"string"==typeof y||"string"==typeof y.content?(i=d[c],-1!==(g=(m="string"==typeof y?y:y.content).indexOf(i))&&(++c,l=m.substring(0,g),h=u[i],p=void 0,(f={})["interpolation-punctuation"]=a,3===(f=e.tokenize(h,f)).length&&((p=[1,1]).push.apply(p,s(f[1],e.languages.javascript,"javascript")),f.splice.apply(f,p)),p=new e.Token("interpolation",f,r.alias,h),f=m.substring(g+i.length),h=[],l&&h.push(l),h.push(p),f&&(t(m=[f]),h.push.apply(h,m)),"string"==typeof y?(n.splice.apply(n,[o,1].concat(h)),o+=h.length-1):y.content=h)):(g=y.content,Array.isArray(g)?t(g):t([g]))}}(l),new e.Token(i,l,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var c={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function u(e){return"string"==typeof e?e:Array.isArray(e)?e.map(u).join(""):u(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in c&&function t(n){for(var r=0,a=n.length;r<a;r++){var o,i,s,c=n[r];"string"!=typeof c&&(o=c.content,Array.isArray(o)?"template-string"===c.type?(c=o[1],3===o.length&&"string"!=typeof c&&"embedded-code"===c.type&&(i=u(c),c=c.alias,c=Array.isArray(c)?c[0]:c,s=e.languages[c])&&(o[1]=l(i,s,c))):t(o):"string"!=typeof o&&t([o]))}}(t.tokens)}))}(tue),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(tue),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,(function(){return n}))),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(tue),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(tue),tue.languages.n4js=tue.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),tue.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),tue.languages.n4jsd=tue.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(/<ID>/g,(function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source})),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r<n.length;r++){var a=n[r],o=e.languages.javascript[a];a=(o="RegExp"===e.util.type(o)?e.languages.javascript[a]={pattern:o}:o).inside||{};(o.inside=a)["maybe-class-name"]=/^[A-Z][\s\S]*/}}(tue),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,a=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function o(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return a})),RegExp(e,t)}function i(t){for(var n=[],r=0;r<t.length;r++){var a=t[r],o=!1;"string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?0<n.length&&n[n.length-1].tagName===s(a.content[0].content[1])&&n.pop():"/>"!==a.content[a.content.length-1].content&&n.push({tagName:s(a.content[0].content[1]),openedBraces:0}):0<n.length&&"punctuation"===a.type&&"{"===a.content?n[n.length-1].openedBraces++:0<n.length&&0<n[n.length-1].openedBraces&&"punctuation"===a.type&&"}"===a.content?n[n.length-1].openedBraces--:o=!0),(o||"string"==typeof a)&&0<n.length&&0===n[n.length-1].openedBraces&&(o=s(a),r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(o+=s(t[r+1]),t.splice(r+1,1)),0<r&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(o=s(t[r-1])+o,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",o,null,o)),a.content&&"string"!=typeof a.content&&i(a.content)}}a=o(a).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=o(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var s=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join(""):""};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)}))}(tue),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(tue),tue.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},tue.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=tue.languages.swift})),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(tue),tue.languages.c=tue.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),tue.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),tue.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},tue.languages.c.string],char:tue.languages.c.char,comment:tue.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:tue.languages.c}}}}),tue.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete tue.languages.c.boolean,tue.languages.objectivec=tue.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete tue.languages.objectivec["class-name"],tue.languages.objc=tue.languages.objectivec,tue.languages.reason=tue.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),tue.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete tue.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(tue),tue.languages.go=tue.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),tue.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete tue.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(tue),tue.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},tue.languages.python["string-interpolation"].inside.interpolation.inside.rest=tue.languages.python,tue.languages.py=tue.languages.python,tue.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},tue.languages.webmanifest=tue.languages.json;var nue={};((e,t)=>{for(var n in t)Hce(e,n,{get:t[n],enumerable:!0})})(nue,{dracula:()=>rue,duotoneDark:()=>aue,duotoneLight:()=>oue,github:()=>iue,gruvboxMaterialDark:()=>Eue,gruvboxMaterialLight:()=>_ue,jettwaveDark:()=>vue,jettwaveLight:()=>kue,nightOwl:()=>sue,nightOwlLight:()=>lue,oceanicNext:()=>due,okaidia:()=>pue,oneDark:()=>xue,oneLight:()=>wue,palenight:()=>fue,shadesOfPurple:()=>hue,synthwave84:()=>mue,ultramin:()=>gue,vsDark:()=>yue,vsLight:()=>bue});var rue={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},aue={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},oue={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},iue={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},sue={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},lue={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},cue="#c5a5c5",uue="#8dc891",due={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:cue}},{types:["attr-value"],style:{color:uue}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:uue}},{types:["punctuation"],style:{color:uue}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:cue}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},pue={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},fue={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},hue={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},mue={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},gue={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},yue={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},bue={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},vue={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},kue={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},xue={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},wue={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},Eue={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},_ue={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},Sue=/\r\n|\r|\n/,Tue=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},Cue=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},Aue=e=>{const t=[[]],n=[e],r=[0],a=[e.length];let o=0,i=0,s=[];const l=[s];for(;i>-1;){for(;(o=r[i]++)<a[i];){let e,c=t[i];const u=n[i][o];if("string"==typeof u?(c=i>0?c:["plain"],e=u):(c=Cue(c,u.type),u.alias&&(c=Cue(c,u.alias)),e=u.content),"string"!=typeof e){i++,t.push(c),n.push(e),r.push(0),a.push(e.length);continue}const d=e.split(Sue),p=d.length;s.push({types:c,content:d[0]});for(let t=1;t<p;t++)Tue(s),l.push(s=[]),s.push({types:c,content:d[t]})}i--,t.pop(),n.pop(),r.pop(),a.pop()}return Tue(s),l},Nue=(e,t)=>{const{plain:n}=e,r=e.styles.reduce(((e,n)=>{const{languages:r,style:a}=n;return r&&!r.includes(t)||n.types.forEach((t=>{const n=Xce(Xce({},e[t]),a);e[t]=n})),e}),{});return r.root=n,r.plain=Qce(Xce({},n),{backgroundColor:void 0}),r},Iue=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=Nue(r,o),s=(e=>X.useCallback((t=>{var n=t,{className:r,style:a,line:o}=n,i=Jce(n,["className","style","line"]);const s=Qce(Xce({},i),{className:Rce("token-line",r)});return"object"==typeof e&&"plain"in e&&(s.style=e.plain),"object"==typeof a&&(s.style=Xce(Xce({},s.style||{}),a)),s}),[e]))(i),l=(e=>{const t=X.useCallback((({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map((t=>e[t])))}),[e]);return X.useCallback((e=>{var n=e,{token:r,className:a,style:o}=n,i=Jce(n,["token","className","style"]);const s=Qce(Xce({},i),{className:Rce("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(s.style=Xce(Xce({},s.style||{}),o)),s}),[t])})(i),c=(({prism:e,code:t,grammar:n,language:r})=>X.useMemo((()=>{if(null==n)return Aue([t]);const a={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",a),Aue(a.tokens)}),[t,n,r,e]))({prism:a,language:o,code:n,grammar:a.languages[o]});return e({tokens:c,className:`prism-code language-${o}`,style:null!=i?i.root:{},getLineProps:s,getTokenProps:l})},Oue=e=>X.createElement(Iue,Qce(Xce({},e),{prism:e.prism||tue,theme:e.theme||yue,code:e.code,language:e.language}))
|
|
71
71
|
/*! Bundled license information:
|
|
72
72
|
|
|
73
73
|
prismjs/prism.js:
|