PageSourceSearch

https://showcase-claude-sdk-python-production.up.railway.app/_next/static/chunks/6422-d0cbe54114cb0430.js

js showcase-claude-sdk-python-production.up.railway.app collected 2026-10-03 12:14:08 UTC 1,070,687 bytes, 1,265 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6422],{861:(e,t,n)=>{n.d(t,{Qg:()=>o,bL:()=>l});var r=n(12115),i=n(97602),a=n(95155),o=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),s=r.forwardRef((e,t)=>(0,a.jsx)(i.sG.span,{...e,ref:t,style:{...o,...e.style}}));s.displayName="VisuallyHidden";var l=s},2068:(e,t,n)=>{n.d(t,{_:()=>i});let r={enabled:!1,events:!1,lifecycle:!1,verbose:!1};function i(e){if(!e)return r;if(!0===e)return{enabled:!0,events:!0,lifecycle:!0,verbose:!1};let t=e.events??!0,n=e.lifecycle??!0,i=t||n;return{enabled:i,events:t,lifecycle:n,verbose:i&&(e.verbose??!1)}}},2821:(e,t,n)=>{function r(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=function e(t){var n,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(n=0;n<a;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=" "),i+=r)}else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}(e))&&(r&&(r+=" "),r+=t);return r}n.d(t,{$:()=>r,A:()=>i});let i=r},3401:(e,t,n)=>{n.d(t,{l:()=>r});async function r(e){if(!navigator.clipboard?.writeText)return console.error("Clipboard API is not available"),!1;try{return await navigator.clipboard.writeText(e),!0}catch(e){return console.error("Failed to copy to clipboard:",e),!1}}},3407:(e,t,n)=>{n.d(t,{BM:()=>s,CW:()=>r,Ee:()=>d,HP:()=>c,JQ:()=>o,Ny:()=>f,On:()=>h,cx:()=>a,es:()=>p,lV:()=>i,ok:()=>l,ol:()=>u});let r=m(/[A-Za-z]/),i=m(/[\dA-Za-z]/),a=m(/[#-'*+\--9=?A-Z^-~]/);function o(e){return null!==e&&(e<32||127===e)}let s=m(/\d/),l=m(/[\dA-Fa-f]/),u=m(/[!-/:-@[-`{-~]/);function c(e){return null!==e&&e<-2}function d(e){return null!==e&&(e<0||32===e)}function h(e){return -2===e||-1===e||32===e}let p=m(/\p{P}|\p{S}/u),f=m(/\s/);function m(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}},3468:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(12115),i=n(95155);function a(e,t=[]){let n=[],o=()=>{let t=n.map(e=>r.createContext(e));return function(n){let i=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return o.scopeName=e,[function(t,a){let o=r.createContext(a);o.displayName=t+"Context";let s=n.length;n=[...n,a];let l=t=>{let{scope:n,children:a,...l}=t,u=n?.[e]?.[s]||o,c=r.useMemo(()=>l,Object.values(l));return(0,i.jsx)(u.Provider,{value:c,children:a})};return l.displayName=t+"Provider",[l,function(n,i){let l=i?.[e]?.[s]||o,u=r.useContext(l);if(u)return u;if(void 0!==a)return a;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}(o,...t)]}},4129:(e,t,n)=>{n.d(t,{N:()=>i});var r=n(12115),i=globalThis?.document?r.useLayoutEffect:()=>{}},5009:(e,t,n)=>{n.d(t,{D:()=>r});function r(e,t){let n=String(e);if("string"!=typeof t)throw TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}},5597:(e,t,n)=>{function r(e){return e.startsWith("image/")?"image":e.startsWith("audio/")?"audio":e.startsWith("video/")?"video":"document"}function i(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function a(e,t=0x1400000){return e.size>t}function o(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{let r=e.target?.result?.split(",")[1];r?t(r):n(Error("Failed to read file as base64"))}
1,r.onerror=n,r.readAsDataURL(e)})}function s(e){return"undefined"==typeof document?Promise.resolve(void 0):new Promise(t=>{let n=!1,r=document.createElement("video"),i=document.createElement("canvas"),a=URL.createObjectURL(e),o=e=>{n||(n=!0,URL.revokeObjectURL(a),t(e))},s=setTimeout(()=>{console.warn(`[CopilotKit] generateVideoThumbnail: timed out for file "${e.name}"`),o(void 0)},1e4);r.preload="metadata",r.muted=!0,r.playsInline=!0,r.onloadeddata=()=>{r.currentTime=.1},r.onseeked=()=>{clearTimeout(s),i.width=r.videoWidth,i.height=r.videoHeight;let e=i.getContext("2d");e?(e.drawImage(r,0,0),o(i.toDataURL("image/jpeg",.7))):(console.warn("[CopilotKit] generateVideoThumbnail: could not get 2d canvas context"),o(void 0))},r.onerror=()=>{clearTimeout(s),console.warn(`[CopilotKit] generateVideoThumbnail: video element error for file "${e.name}"`),o(void 0)},r.src=a})}function l(e,t){return!t||"*/*"===t||t.split(",").map(e=>e.trim()).some(t=>{if(t.startsWith("."))return(e.name??"").toLowerCase().endsWith(t.toLowerCase());if(t.endsWith("/*")){let n=t.slice(0,-2);return e.type.startsWith(n+"/")}return e.type===t})}function u(e){return"url"===e.type?e.value:`data:${e.mimeType};base64,${e.value}`}function c(e){return e.includes("pdf")?"PDF":e.includes("sheet")||e.includes("excel")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("word")||e.includes("document")?"DOC":e.includes("text/")?"TXT":"FILE"}n.d(t,{$s:()=>u,D:()=>c,We:()=>o,gX:()=>r,hp:()=>s,oF:()=>l,v7:()=>i,zH:()=>a})},7188:(e,t,n)=>{n.d(t,{a:()=>o});let r=new Set(["children","localName","ref","style","className"]),i=new WeakMap,a=(e,t,n,r,a)=>{let o=a?.[t];void 0===o?(e[t]=n,null==n&&t in HTMLElement.prototype&&e.removeAttribute(t)):n!==r&&((e,t,n)=>{let r=i.get(e);void 0===r&&i.set(e,r=new Map);let a=r.get(t);void 0!==n?void 0===a?(r.set(t,a={handleEvent:n}),e.addEventListener(t,a)):a.handleEvent=n:void 0!==a&&(r.delete(t),e.removeEventListener(t,a))})(e,o,n)},o=({react:e,tagName:t,elementClass:n,events:i,displayName:o})=>{let s=new Set(Object.keys(i??{})),l=e.forwardRef((o,l)=>{let u=e.useRef(new Map),c=e.useRef(null),d={},h={};for(let[e,t]of Object.entries(o))r.has(e)?d["className"===e?"class":e]=t:s.has(e)||e in n.prototype?h[e]=t:d[e]=t;return e.useLayoutEffect(()=>{if(null===c.current)return;let e=new Map;for(let t in h)a(c.current,t,o[t],u.current.get(t),i),u.current.delete(t),e.set(t,o[t]);for(let[e,t]of u.current)a(c.current,e,void 0,t,i);u.current=e}),e.useLayoutEffect(()=>{c.current?.removeAttribute("defer-hydration")},[]),d.suppressHydrationWarning=!0,e.createElement(t,{...d,ref:e.useCallback(e=>{c.current=e,"function"==typeof l?l(e):null!==l&&(l.current=e)},[l])})});return l.displayName=o??n.name,l}},7604:(e,t,n)=>{n.d(t,{A:()=>_});var r=n(63758),i=n(44599),a=n(3407);function o(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let o=e.charCodeAt(n),s="";if(37===o&&(0,a.lV)(e.charCodeAt(n+1))&&(0,a.lV)(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){let t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function s(e,t){let n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function l(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}var u=n(95139),c=n(73545);function d(e,t){let n=t.referenceType,r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];let i=e.all(t),a=i[0];a&&"text"===a.type?a.value="["+a.value:i.unshift({type:"text",value:"["});let o=i[i.length-1];return o&&"text"===o.type?o.value+=r:i.push({type:"text",value:r}),i}function h(e){let t=e.spread;return null==t?e.children.length>1:t}function p(e,t,n){let r=0,i=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(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}let f={blockquote:function(e,t){let 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){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){let n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a={type:"element",tagName:"pre",properties:{},children:[a=e.applyData(t,a)]},e.patch(t,a),a},delete:function(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}
1,footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),a=o(i.toLowerCase()),s=e.footnoteOrder.indexOf(i),l=e.footnoteCounts.get(i);void 0===l?(l=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=s+1,l+=1,e.footnoteCounts.set(i,l);let u={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+a,id:r+"fnref-"+a+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,u);let c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){let 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){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return d(e,t);let i={src:o(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)},image:function(e,t){let n={src:o(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);let r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return d(e,t);let i={href:o(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)},link:function(e,t){let n={href:o(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);let 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){let r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=h(n[r])}return t}(n):h(t),a={},o=[];if("boolean"==typeof t.checked){let e,n=r[0];n&&"element"===n.type&&"p"===n.tagName?e=n:(e={type:"element",tagName:"p",properties:{},children:[]},r.unshift(e)),e.children.length>0&&e.children.unshift({type:"text",value:" "}),e.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){let e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&o.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?o.push(e):o.push(...e.children)}let l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&o.push({type:"text",value:"\n"});let u={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,u),e.applyData(t,u)},list:function(e,t){let n={},r=e.all(t),i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){let e=r[i];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}}let a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)},paragraph:function(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=(0,c.PW)(t.children[1]),o=(0,c.Y)(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:"element",tagName:"table",properties:{}
1,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)},tableCell:function(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){let r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",a=n&&"table"===n.type?n.align:void 0,o=a?a.length:t.children.length,s=-1,l=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let u={type:"element",tagName:i,properties:r,children:[]};n&&(u.children=e.all(n),e.patch(n,u),u=e.applyData(n,u)),l.push(u)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,u),e.applyData(t,u)},text:function(e,t){let n={type:"text",value:function(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(p(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(p(t.slice(i),i>0,!1)),a.join("")}(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:m,yaml:m,definition:m,footnoteDefinition:m};function m(){}let g={}.hasOwnProperty,v={};function b(e,t){e.position&&(t.position=(0,c.G1)(e))}function y(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,a=e.data.hProperties;"string"==typeof t&&("element"===n.type?n.tagName=t:n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}),"element"===n.type&&a&&Object.assign(n.properties,(0,i.Ay)(a)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function E(e,t){let n=[],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 T(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function k(e,t){let n=function(e,t){let n=t||v,r=new Map,a=new Map,o={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=o.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=T(i.value)),!Array.isArray(i)&&"element"===i.type)){let e=i.children[0];e&&"text"===e.type&&(e.value=T(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:y,definitionById:r,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],handlers:{...f,...n.handlers},one:function(e,t){let n=e.type,r=o.handlers[n];if(g.call(o.handlers,n)&&r)return r(o,e,t);if(o.options.passThrough&&o.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=(0,i.Ay)(n);return r.children=o.all(e),r}return(0,i.Ay)(e)}return(o.options.unknownHandler||function(e,t){let n=t.data||{},r="value"in t&&!(g.call(n,"hProperties")||g.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)})(o,e,t)},options:n,patch:b,wrap:E};return(0,u.YR)(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o}(e,t),a=n.one(e,void 0),c=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||s,r=e.options.footnoteBackLabel||l,a=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[],h=-1;for(;++h<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[h]);if(!i)continue;let a=e.all(i),s=String(i.identifier).toUpperCase(),l=o(s.toLowerCase()),u=0,c=[],p=e.footnoteCounts.get(s);for(;void 0!==p&&++u<=p;){c.length>0&&c.push({type:"text",value:" "});let e="string"==typeof n?n:n(h,u);"string"==typeof e&&(e={type:"text",value:e}),c.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+l+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(h,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}
1let f=a[a.length-1];if(f&&"element"===f.type&&"p"===f.tagName){let e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...c)}else a.push(...c);let m={type:"element",tagName:"li",properties:{id:t+"fn-"+l},children:e.wrap(a,!0)};e.patch(i,m),d.push(m)}if(0!==d.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...(0,i.Ay)(c),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:"\n"}]}}(n),d=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return c&&((0,r.ok)("children"in d),d.children.push({type:"text",value:"\n"},c)),d}function _(e,t){return e&&"run"in e?async function(n,r){let i=k(n,{file:r,...t});await e.run(i,r)}:function(n,r){return k(n,{file:r,...e||t})}}},8286:(e,t,n)=>{n.d(t,{Tg:()=>m});var r=n(71450),i=n(82241),a=n(73694),o=n(45037),s=n(99455),l=n(74073),u=n(50933),c=n(45907),d=n(31590),h=n(39097),p=n(55180),f=n(60488);function m(e){if(e instanceof o.c)return e;if(null!=e){var t,n,m,v,b;if((0,s.l)(e)){return t=e,new o.c(function(e){var n=t[f.s]();if((0,h.T)(n.subscribe))return n.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if((0,i.X)(e)){return n=e,new o.c(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}if((0,a.y)(e)){return m=e,new o.c(function(e){m.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,p.m)})}if((0,l.T)(e))return g(e);if((0,c.x)(e)){return v=e,new o.c(function(e){var t,n;try{for(var i=(0,r.Ju)(v),a=i.next();!a.done;a=i.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.complete()})}if((0,d.U)(e)){return b=e,g((0,d.C)(b))}}throw(0,u.L)(e)}function g(e){return new o.c(function(t){(function(e,t){var n,i,a,o;return(0,r.sH)(this,void 0,void 0,function(){var s;return(0,r.YH)(this,function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=(0,r.xN)(e),l.label=1;case 1:return[4,n.next()];case 2:if((i=l.sent()).done)return[3,4];if(s=i.value,t.next(s),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a={error:l.sent()},[3,11];
1case 6:if(l.trys.push([6,,9,10]),!(i&&!i.done&&(o=n.return)))return[3,8];return[4,o.call(n)];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}},8650:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]])},9846:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Allow=t.ALL=t.COLLECTION=t.ATOM=t.SPECIAL=t.INF=t._INFINITY=t.INFINITY=t.NAN=t.BOOL=t.NULL=t.OBJ=t.ARR=t.NUM=t.STR=void 0,t.STR=1,t.NUM=2,t.ARR=4,t.OBJ=8,t.NULL=16,t.BOOL=32,t.NAN=64,t.INFINITY=128,t._INFINITY=256,t.INF=t.INFINITY|t._INFINITY,t.SPECIAL=t.NULL|t.BOOL|t.INF|t.NAN,t.ATOM=t.STR|t.NUM|t.SPECIAL,t.COLLECTION=t.ARR|t.OBJ,t.ALL=t.ATOM|t.COLLECTION,t.Allow={STR:t.STR,NUM:t.NUM,ARR:t.ARR,OBJ:t.OBJ,NULL:t.NULL,BOOL:t.BOOL,NAN:t.NAN,INFINITY:t.INFINITY,_INFINITY:t._INFINITY,INF:t.INF,SPECIAL:t.SPECIAL,ATOM:t.ATOM,COLLECTION:t.COLLECTION,ALL:t.ALL},t.default=t.Allow},10899:(e,t,n)=>{n.d(t,{L:()=>r});function r(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},10988:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},12176:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]])},12668:(e,t,n)=>{n.d(t,{o:()=>r});function r(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}},12718:(e,t,n)=>{n.d(t,{E:()=>i,b:()=>a});var r=n(33421),i=new(n(44289)).q(r.R),a=i},13862:(e,t,n)=>{n.d(t,{$:()=>f});var r,i=n(71450),a=n(33421),o=1,s={};function l(e){return e in s&&(delete s[e],!0)}var u={setImmediate:function(e){var t=o++;return s[t]=!0,r||(r=Promise.resolve()),r.then(function(){return l(t)&&e()}),t},clearImmediate:function(e){l(e)}},c=u.setImmediate,d=u.clearImmediate,h={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=h.delegate;return((null==n?void 0:n.setImmediate)||c).apply(void 0,(0,i.fX)([],(0,i.zs)(e)))},clearImmediate:function(e){var t=h.delegate;return((null==t?void 0:t.clearImmediate)||d)(e)},delegate:void 0},p=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return(0,i.C6)(t,e),t.prototype.requestAsyncId=function(t,n,r){return(void 0===r&&(r=0),null!==r&&r>0)?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=h.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!=r?r>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);var i,a=t.actions;null!=n&&(null==(i=a[a.length-1])?void 0:i.id)!==n&&(h.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(a.R),f=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.C6)(t,e),t.prototype.flush=function(e){this._active=!0;var t,n=this._scheduled;this._scheduled=void 0;var r=this.actions;e=e||r.shift();do if(t=e.execute(e.state,e.delay))break;while((e=r[0])&&e.id===n&&r.shift());if(this._active=!1,t){for(;(e=r[0])&&e.id===n&&r.shift();)e.unsubscribe();throw t}},t}(n(44289).q))(p)},14192:(e,t,n)=>{n.d(t,{f:()=>i});var r=n(71450),i={setTimeout:function(e,t){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];var o=i.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,(0,r.fX)([e,t],(0,r.zs)(n))):setTimeout.apply(void 0,(0,r.fX)([e,t],(0,r.zs)(n)))},clearTimeout:function(e){var t=i.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0}},14432:(e,t,n)=>{n.d(t,{A:()=>Y});var r,i,a=n(71450),o=n(12115),s="right-scroll-bar-position",l="width-before-scroll-bar";function u(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var c="undefined"!=typeof window?o.useLayoutEffect:o.useEffect,d=new WeakMap;function h(e){return e}var p=function(e){void 0===e&&(e={});var t,n,r,i=(void 0===t&&(t=h),n=[],r=!1,{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:null},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},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 i=n;
1n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}});return i.options=(0,a.Cl)({async:!0,ssr:!1},e),i}(),f=function(){},m=o.forwardRef(function(e,t){var n,r,i,s,l=o.useRef(null),h=o.useState({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:f}),m=h[0],g=h[1],v=e.forwardProps,b=e.children,y=e.className,E=e.removeScrollBar,T=e.enabled,k=e.shards,_=e.sideCar,A=e.noRelative,x=e.noIsolation,w=e.inert,S=e.allowPinchZoom,C=e.as,I=e.gapMode,N=(0,a.Tt)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),O=(n=[l,t],r=function(e){return n.forEach(function(t){return u(t,e)})},(i=(0,o.useState)(function(){return{value:null,callback:r,facade:{get current(){return i.value},set current(value){var e=i.value;e!==value&&(i.value=value,i.callback(value,e))}}}})[0]).callback=r,s=i.facade,c(function(){var e=d.get(s);if(e){var t=new Set(e),r=new Set(n),i=s.current;t.forEach(function(e){r.has(e)||u(e,null)}),r.forEach(function(e){t.has(e)||u(e,i)})}d.set(s,n)},[n]),s),R=(0,a.Cl)((0,a.Cl)({},N),m);return o.createElement(o.Fragment,null,T&&o.createElement(_,{sideCar:p,removeScrollBar:E,shards:k,noRelative:A,noIsolation:x,inert:w,setCallbacks:g,allowPinchZoom:!!S,lockRef:l,gapMode:I}),v?o.cloneElement(o.Children.only(b),(0,a.Cl)((0,a.Cl)({},R),{ref:O})):o.createElement(void 0===C?"div":C,(0,a.Cl)({},R,{className:y,ref:O}),b))});m.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},m.classNames={fullWidth:l,zeroRight:s};var g=function(e){var t=e.sideCar,n=(0,a.Tt)(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return o.createElement(r,(0,a.Cl)({},n))};g.isSideCarExport=!0;var v=function(){var e=0,t=null;return{add:function(r){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=i||n.nc;return t&&e.setAttribute("nonce",t),e}())){var a,o;(a=t).styleSheet?a.styleSheet.cssText=r:a.appendChild(document.createTextNode(r)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},b=function(){var e=v();return function(t,n){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},y=function(){var e=b();return function(t){return e(t.styles,t.dynamic),null}},E={left:0,top:0,right:0,gap:0},T=function(e){return parseInt(e||"",10)||0},k=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],i=t["padding"===e?"paddingRight":"marginRight"];return[T(n),T(r),T(i)]},_=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return E;var t=k(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])}},A=y(),x="data-scroll-locked",w=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,u=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(r,";\n   padding-right: ").concat(u,"px ").concat(r,";\n  }\n  body[").concat(x,"] {\n    overflow: hidden ").concat(r,";\n    overscroll-behavior: contain;\n    ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n    padding-left: ".concat(i,"px;\n    padding-top: ").concat(a,"px;\n    padding-right: ").concat(o,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(u,"px ").concat(r,";\n    "),"padding"===n&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(s," {\n    right: ").concat(u,"px ").concat(r,";\n  }\n  \n  .").concat(l," {\n    margin-right: ").concat(u,"px ").concat(r,";\n  }\n  \n  .").concat(s," .").concat(s," {\n    right: 0 ").concat(r,";\n  }\n  \n  .").concat(l," .").concat(l," {\n    margin-right: 0 ").concat(r,";\n  }\n  \n  body[").concat(x,"] {\n    ").concat("--removed-body-scroll-bar-size",": ").concat(u,"px;\n  }\n")},S=function(){var e=parseInt(document.body.getAttribute(x)||"0",10);return isFinite(e)?e:0},C=function(){o.useEffect(function(){return document.body.setAttribute(x,(S()+1).toString()),function(){var e=S()-1;e<=0?document.body.removeAttribute(x):document.body.setAttribute(x,e.toString())}},[])},I=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;C();var a=o.useMemo(function(){return _(i)},[i]);return o.createElement(A,{styles:w(a,!t,i,n?"":"!important")})},N=!1;if("undefined"!=typeof window)try{var O=Object.defineProperty({},"passive",{get:function(){return N=!0,!0}});window.addEventListener("test",O,O),window.removeEventListener("test",O,O)}catch(e){N=!1}var R=!!N&&{passive:!1},D=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},L=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),P(e,r)){var i=M(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},P=function(e,t){return"v"===e?D(t,"overflowY"):D(t,"overflowX")},M=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},F=function(e,t,n,r,i){var a,o=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),s=o*r,l=n.target,u=t.contains(l),c=!1,d=s>0,h=0,p=0;
1do{if(!l)break;var f=M(e,l),m=f[0],g=f[1]-f[2]-o*m;(m||g)&&P(e,l)&&(h+=g,p+=m);var v=l.parentNode;l=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return d&&(i&&1>Math.abs(h)||!i&&s>h)?c=!0:!d&&(i&&1>Math.abs(p)||!i&&-s>p)&&(c=!0),c},B=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},j=function(e){return[e.deltaX,e.deltaY]},U=function(e){return e&&"current"in e?e.current:e},H=0,$=[];let z=(r=function(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),i=o.useState(H++)[0],s=o.useState(y)[0],l=o.useRef(e);o.useEffect(function(){l.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(0,a.fX)([e.lockRef.current],(e.shards||[]).map(U),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var u=o.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var i,a=B(e),o=n.current,s="deltaX"in e?e.deltaX:o[0]-a[0],u="deltaY"in e?e.deltaY:o[1]-a[1],c=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var h=window.getSelection(),p=h&&h.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var f=L(d,c);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=L(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=i),!i)return!0;var m=r.current||i;return F(m,t,e,"h"===m?s:u,!0)},[]),c=o.useCallback(function(e){if($.length&&$[$.length-1]===s){var n="deltaY"in e?j(e):B(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var i=(l.current.shards||[]).map(U).filter(Boolean).filter(function(t){return t.contains(e.target)});(i.length>0?u(e,i[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),d=o.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),h=o.useCallback(function(e){n.current=B(e),r.current=void 0},[]),p=o.useCallback(function(t){d(t.type,j(t),t.target,u(t,e.lockRef.current))},[]),f=o.useCallback(function(t){d(t.type,B(t),t.target,u(t,e.lockRef.current))},[]);o.useEffect(function(){return $.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",c,R),document.addEventListener("touchmove",c,R),document.addEventListener("touchstart",h,R),function(){$=$.filter(function(e){return e!==s}),document.removeEventListener("wheel",c,R),document.removeEventListener("touchmove",c,R),document.removeEventListener("touchstart",h,R)}},[]);var m=e.removeScrollBar,g=e.inert;return o.createElement(o.Fragment,null,g?o.createElement(s,{styles:"\n  .block-interactivity-".concat(i," {pointer-events: none;}\n  .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,m?o.createElement(I,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},p.useMedium(r),g);var G=o.forwardRef(function(e,t){return o.createElement(m,(0,a.Cl)({},e,{ref:t,sideCar:z}))});G.classNames=m.classNames;let Y=G},14733:(e,t,n)=>{n.d(t,{A:()=>e_});var r={};n.r(r),n.d(r,{attentionMarkers:()=>ep,contentInitial:()=>es,disable:()=>ef,document:()=>eo,flow:()=>eu,flowInitial:()=>el,insideSpan:()=>eh,string:()=>ec,text:()=>ed});var i=n(84151),a=n(17032);class o{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw 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){let n=null==t?1/0: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){this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-(t||0),1/0);return n&&s(this.left,n),r.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),s(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),s(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){let t=this.left.splice(e,1/0);s(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);s(this.left,t.reverse())}}}function s(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 l(e){let t,n,r,i,s,l,u,c={},d=-1,h=new o(e);for(;++d<h.length;){for(;d in c;)d=c[d];if(t=h.get(d),d&&"chunkFlow"===t[1].type&&"listItemPrefix"===h.get(d-1)[1].type&&((r=0)<(l=t[1]._tokenizer.events).length&&"lineEndingBlank"===l[r][1].type&&(r+=2),r<l.length&&"content"===l[r][1].type))for(;++r<l.length&&"content"!==l[r][1].type;)"chunkText"===l[r][1].type&&(l[r][1]._isInFirstContentOfListItem=!0,r++);if("enter"===t[0])t[1].contentType&&(Object.assign(c,function(e,t){let n,r,i=e.get(t)[1],a=e.get(t)[2],o=t-1,s=[],l=i._tokenizer;!l&&(l=a.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));let u=l.events,c=[],d={},h=-1,p=i,f=0,m=0,g=[0];for(;p;){for(;e.get(++o)[1]!==p;);s.push(o),!p._tokenizer&&(n=a.sliceStream(p),p.next||n.push(null),r&&l.defineSki
1p(p.start),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(n),p._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),r=p,p=p.next}for(p=i;++h<u.length;)"exit"===u[h][0]&&"enter"===u[h-1][0]&&u[h][1].type===u[h-1][1].type&&u[h][1].start.line!==u[h][1].end.line&&(m=h+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(l.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),h=g.length;h--;){let t=u.slice(g[h],g[h+1]),n=s.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),h=-1;++h<c.length;)d[f+c[h][0]]=f+c[h][1],f+=c[h][1]-c[h][0]-1;return d}(h,d)),d=c[d],u=!0);else if(t[1]._container){for(r=d,n=void 0;r--;)if("lineEnding"===(i=h.get(r))[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(n&&(h.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if("linePrefix"===i[1].type||"listItemIndent"===i[1].type);else break;n&&(t[1].end={...h.get(n)[1].start},(s=h.slice(n,d)).unshift(t),h.splice(n,d-n+1,s))}}return(0,a.m)(e,0,1/0,h.slice(0)),!u}var u=n(38220),c=n(79168),d=n(3407);let h={tokenize:function(e){let t,n=e.attempt(this.parser.constructs.contentInitial,function(t){return null===t?void e.consume(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,c.N)(e,n,"linePrefix"))},function(n){return e.enter("paragraph"),function n(r){let i=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=i),t=i,function t(r){if(null===r){e.exit("chunkText"),e.exit("paragraph"),e.consume(r);return}return(0,d.HP)(r)?(e.consume(r),e.exit("chunkText"),n):(e.consume(r),t)}(r)}(n)});return n}},p={tokenize:function(e){let t,n,r,i=this,o=[],s=0;return l;function l(t){if(s<o.length){let n=o[s];return i.containerState=n[1],e.attempt(n[0].continuation,u,c)(t)}return c(t)}function u(e){if(s++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&E();let r=i.events.length,o=r;for(;o--;)if("exit"===i.events[o][0]&&"chunkFlow"===i.events[o][1].type){n=i.events[o][1].end;break}y(s);let l=r;
1for(;l<i.events.length;)i.events[l][1].end={...n},l++;return(0,a.m)(i.events,o+1,0,i.events.slice(r)),i.events.length=l,c(e)}return l(e)}function c(n){if(s===o.length){if(!t)return m(n);if(t.currentConstruct&&t.currentConstruct.concrete)return v(n);i.interrupt=!!(t.currentConstruct&&!t._gfmTableDynamicInterruptHack)}return i.containerState={},e.check(f,h,p)(n)}function h(e){return t&&E(),y(s),m(e)}function p(e){return i.parser.lazy[i.now().line]=s!==o.length,r=i.now().offset,v(e)}function m(t){return i.containerState={},e.attempt(f,g,v)(t)}function g(e){return s++,o.push([i.currentConstruct,i.containerState]),m(e)}function v(r){if(null===r){t&&E(),y(0),e.consume(r);return}return t=t||i.parser.flow(i.now()),e.enter("chunkFlow",{_tokenizer:t,contentType:"flow",previous:n}),function t(n){if(null===n){b(e.exit("chunkFlow"),!0),y(0),e.consume(n);return}return(0,d.HP)(n)?(e.consume(n),b(e.exit("chunkFlow")),s=0,i.interrupt=void 0,l):(e.consume(n),t)}(r)}function b(e,o){let l=i.sliceStream(e);if(o&&l.push(null),e.previous=n,n&&(n.next=e),n=e,t.defineSkip(e.start),t.write(l),i.parser.lazy[e.start.line]){let e,n,o=t.events.length;for(;o--;)if(t.events[o][1].start.offset<r&&(!t.events[o][1].end||t.events[o][1].end.offset>r))return;let l=i.events.length,u=l;for(;u--;)if("exit"===i.events[u][0]&&"chunkFlow"===i.events[u][1].type){if(e){n=i.events[u][1].end;break}e=!0}for(y(s),o=l;o<i.events.length;)i.events[o][1].end={...n},o++;(0,a.m)(i.events,u+1,0,i.events.slice(l)),i.events.length=o}}function y(t){let n=o.length;for(;n-- >t;){let t=o[n];i.containerState=t[1],t[0].exit.call(i,e)}o.length=t}function E(){t.write([null]),n=void 0,t=void 0,i.containerState._closeFlow=void 0}}},f={tokenize:function(e,t,n){return(0,c.N)(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};var m=n(33634);let g={resolve:function(e){return l(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?i(t):(0,d.HP)(t)?e.check(v,a,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function a(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},v={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,c.N)(e,i,"linePrefix")};function i(i){if(null===i||(0,d.HP)(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}},b={tokenize:function(e){let t=this,n=e.attempt(m.B,function(r){return null===r?void e.consume(r):(e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n)},e.attempt(this.parser.constructs.flowInitial,r,(0,c.N)(e,e.attempt(this.parser.constructs.flow,r,e.attempt(g,r)),"linePrefix")));return n;function r(r){return null===r?void e.consume(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n)}}},y={resolveAll:_()},E=k("string"),T=k("text");function k(e){return{resolveAll:_("text"===e?A:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return l(e)?i(e):o(e)}function o(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),s)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function _(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function A(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){let r,i=e[n-1][1],a=t.sliceStream(i),o=a.length,s=-1,l=0;for(;o--;){let e=a[o];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)r=!0,l++;else if(-1===e);else{o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){let a={type:n===e.length||r||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-l,offset:i.end.offset-l},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):(e.splice(n,0,["enter",a,t],["exit",a,t]),n+=2)}n++}return e}let x={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(a){var o;return e.enter("thematicBreak"),r=o=a,function a(o){return o===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),(0,d.On)(n)?(0,c.N)(e,a,"whitespace")(n):a(n))}(o)):i>=3&&(null===o||(0,d.HP)(o))?(e.exit("thematicBreak"),t(o)):n(o)}(o)}}},w={continuation:{tokenize:function(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(m.B,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,(0,c.N)(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){return r.containerState.furtherBlankLines||!(0,d.On)(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine
1=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(C,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,(0,c.N)(e,e.attempt(w,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){let i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:(0,d.BM)(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(x,n,s)(t):s(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return(0,d.BM)(i)&&++o<10?(e.consume(i),t):(!r.interrupt||o<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),s(i)):n(i)}(t)}return n(t)};function s(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(m.B,r.interrupt?n:l,e.attempt(S,c,u))}
1function l(e){return r.containerState.initialBlankLine=!0,a++,c(e)}function u(t){return(0,d.On)(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),c):n(t)}function c(n){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},S={partial:!0,tokenize:function(e,t,n){let r=this;return(0,c.N)(e,function(e){let i=r.events[r.events.length-1];return!(0,d.On)(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},C={partial:!0,tokenize:function(e,t,n){let r=this;return(0,c.N)(e,function(e){let i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}},I={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return(0,d.On)(t)?(0,c.N)(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(I,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){let r=this;return function(t){if(62===t){let 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"),i}return n(t)};function i(n){return(0,d.On)(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};function N(e,t,n,r,i,a,o,s,l){let u=l||1/0,c=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),h):null===t||32===t||41===t||(0,d.JQ)(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(t))};function h(n){return 62===n?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),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),h(t)):null===t||60===t||(0,d.HP)(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 m(i){return!c&&(null===i||41===i||(0,d.Ee)(i))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(i)):c<u&&40===i?(e.consume(i),c++,m):41===i?(e.consume(i),c--,m):null===i||32===i||40===i||(0,d.JQ)(i)?n(i):(e.consume(i),92===i?g:m)}function g(t){return 40===t||41===t||92===t?(e.consume(t),m):m(t)}}function O(e,t,n,r,i,a){let o,s=this,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u};function u(h){return l>999||null===h||91===h||93===h&&!o||94===h&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):93===h?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(0,d.HP)(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(t){return null===t||91===t||93===t||(0,d.HP)(t)||l++>999?(e.exit("chunkString"),u(t)):(e.consume(t),o||(o=!(0,d.On)(t)),92===t?h:c)}function h(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}}function R(e,t,n,r,i,a){let o;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=40===t?41:t,s):n(t)};function s(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),s(o)):null===t?n(t):(0,d.HP)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,c.N)(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(t))}function u(t){return t===o||null===t||(0,d.HP)(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?h:u)}function h(t){return t===o||92===t?(e.consume(t),u):u(t)}}function D(e,t){let n;return function r(i){return(0,d.HP)(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):(0,d.On)(i)?(0,c.N)(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var L=n(35983);let P={partial:!0,tokenize:function(e,t,n){return function(t){return(0,d.Ee)(t)?D(e,r)(t):n(t)};function r(t){return R(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return(0,d.On)(t)?(0,c.N)(e,a,"whitespace")(t):a(t)}function a(e){return null===e||(0,d.HP)(e)?t(e):n(e)}}},M={name:"codeIndented",tokenize:function(e,t,n){let r=this;
1return function(t){return e.enter("codeIndented"),(0,c.N)(e,i,"linePrefix",5)(t)};function i(t){let i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?function t(n){return null===n?a(n):(0,d.HP)(n)?e.attempt(F,t,a)(n):(e.enter("codeFlowValue"),function n(r){return null===r||(0,d.HP)(r)?(e.exit("codeFlowValue"),t(r)):(e.consume(r),n)}(n))}(t):n(t)}function a(n){return e.exit("codeIndented"),t(n)}}},F={partial:!0,tokenize:function(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):(0,d.HP)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):(0,c.N)(e,a,"linePrefix",5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&"linePrefix"===a[1].type&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):(0,d.HP)(e)?i(e):n(e)}}},B={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,a=e.length;for(;a--;)if("enter"===e[a][0]){if("content"===e[a][1].type){n=a;break}"paragraph"===e[a][1].type&&(r=a)}else"content"===e[a][1].type&&e.splice(a,1),i||"definition"!==e[a][1].type||(i=a);let o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",o,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=o,e.push(["exit",o,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var o;let s,l=i.events.length;for(;l--;)if("lineEnding"!==i.events[l][1].type&&"linePrefix"!==i.events[l][1].type&&"content"!==i.events[l][1].type){s="paragraph"===i.events[l][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||s)?(e.enter("setextHeadingLine"),r=t,o=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),(0,d.On)(n)?(0,c.N)(e,a,"lineSuffix")(n):a(n))}(o)):n(t)};function a(r){return null===r||(0,d.HP)(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},j=["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"],U=["pre","script","style","textarea"],H={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(m.B,t,n)}}},$={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return(0,d.HP)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},z={partial:!0,tokenize:function(e,t,n){let r=this;return function(t){return null===t?n(t):(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},G={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,a={partial:!0,tokenize:function(e,t,n){let a=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(t){return e.enter("codeFencedFence"),(0,d.On)(t)?(0,c.N)(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===r?(e.enter("codeFencedFenceSequence"),function t(i){return i===r?(a++,e.consume(i),t):a>=s?(e.exit("codeFencedFenceSequence"),(0,d.On)(i)?(0,c.N)(e,u,"whitespace")(i):u(i)):n(i)}(t)):n(t)}function u(r){return null===r||(0,d.HP)(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},o=0,s=0;return function(t){var a=t;let u=i.events[i.events.length-1];return o=u&&"linePrefix"===u[1].type?u[2].sliceSerialize(u[1],!0).length:0,r=a,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(s++,e.consume(i),t):s<3?n(i):(e.exit("codeFencedFenceSequence"),(0,d.On)(i)?(0,c.N)(e,l,"whitespace")(i):l(i))}(a)};function l(a){return null===a||(0,d.HP)(a)?(e.exit("codeFencedFence"),i.interrupt?t(a):e.check(z,h,g)(a)):(e.enter("co
1deFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||(0,d.HP)(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),l(i)):(0,d.On)(i)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),(0,c.N)(e,u,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(a))}function u(t){return null===t||(0,d.HP)(t)?l(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(i){return null===i||(0,d.HP)(i)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),l(i)):96===i&&i===r?n(i):(e.consume(i),t)}(t))}function h(t){return e.attempt(a,g,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return o>0&&(0,d.On)(t)?(0,c.N)(e,m,"linePrefix",o+1)(t):m(t)}function m(t){return null===t||(0,d.HP)(t)?e.check(z,h,g)(t):(e.enter("codeFlowValue"),function t(n){return null===n||(0,d.HP)(n)?(e.exit("codeFlowValue"),m(n)):(e.consume(n),t)}(t))}function g(n){return e.exit("codeFenced"),t(n)}}},Y=document.createElement("i");function q(e){let t="&"+e+";";Y.innerHTML=t;let n=Y.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&n!==t&&n}let V={name:"characterReference",tokenize:function(e,t,n){let r,i,a=this,o=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"),r=31,i=d.lV,u(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=d.ok,u):(e.enter("characterReferenceValue"),r=7,i=d.BM,u(t))}function u(s){if(59===s&&o){let r=e.exit("characterReferenceValue");return i!==d.lV||q(a.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&o++<r?(e.consume(s),u):n(s)}}},W={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(0,d.ol)(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}},K={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),(0,c.N)(e,t,"linePrefix")}}};var Z=n(41006);let X={name:"labelEnd",resolveAll:function(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){let e="labelImage"===r.type?4:2;r.type="data",t+=e}}return e.length!==n.length&&(0,a.m)(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,o,s=e.length,l=0;for(;s--;)if(n=e[s][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[s][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[s][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=s,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(i=s);let u={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[i][1].end}},d={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[i-2][1].start}};return o=[["enter",u,t],["enter",c,t]],o=(0,a.V)(o,e.slice(r+1,r+l+3)),o=(0,a.V)(o,[["enter",d,t]]),o=(0,a.V)(o,(0,Z.W)(t.parser.constructs.insideSpan.null,e.slice(r+l+4,i-3),t)),o=(0,a.V)(o,[["exit",d,t],e[i-2],e[i-1],["exit",c,t]]),o=(0,a.V)(o,e.slice(i+1)),o=(0,a.V)(o,[["exit",u,t]]),(0,a.m)(e,r,e.length,o),e},tokenize:function(e,t,n){let r,i,a=this,o=a.events.length;for(;o--;)if(("labelImage"===a.events[o][1].type||"labelLink"===a.events[o][1].type)&&!a.events[o][1]._balanced){r=a.events[o][1];break}return function(t){return r?r._inactive?c(t):(i=a.parser.defined.includes((0,L.B)(a.sliceSerialize({start:r.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s):n(t)};function s(t){return 40===t?e.attempt(Q,u,i?u:c)(t):91===t?e.attempt(J,u,i?l:c)(t):i?u(t):c(t)}function l(t){return e.attempt(ee,u,c)(t)}function u(e){return t(e)}function c(e){return r._balanced=!0,n(e)}}},Q={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(0,d.Ee)(t)?D(e,i)(t):i(t)}function i(t){return 41===t?u(t):N(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function a(t){return(0,d.Ee)(t)?D(e,s)(t):u(t)}function o(e){return n(e)}function s(t){return 34===t||39===t||40===t?R(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):u(t)}function l(t){return(0,d.Ee)(t)?D(e,u)(t):u(t)}function u(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},J={tokenize:function(e,t,n){let r=this;return function(t){return O.call(r,e,i,a,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes((0,L.B)(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function a(e){return n(e)}}},ee={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)}}},et={name:"labelStartImage",resolveAll:X.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),a):n(t)}function a(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};var en=n(23362);
1let er={name:"attention",resolveAll:function(e,t){let n,r,i,o,s,l,u,c,d=-1;for(;++d<e.length;)if("enter"===e[d][0]&&"attentionSequence"===e[d][1].type&&e[d][1]._close){for(n=d;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[d][1]).charCodeAt(0)){if((e[n][1]._close||e[d][1]._open)&&(e[d][1].end.offset-e[d][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[d][1].end.offset-e[d][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[d][1].end.offset-e[d][1].start.offset>1?2:1;let h={...e[n][1].end},p={...e[d][1].start};ei(h,-l),ei(p,l),o={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...e[n][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[d][1].start},end:p},i={type:l>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[d][1].start}},r={type:l>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[n][1].end={...o.start},e[d][1].start={...s.end},u=[],e[n][1].end.offset-e[n][1].start.offset&&(u=(0,a.V)(u,[["enter",e[n][1],t],["exit",e[n][1],t]])),u=(0,a.V)(u,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=(0,a.V)(u,(0,Z.W)(t.parser.constructs.insideSpan.null,e.slice(n+1,d),t)),u=(0,a.V)(u,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",r,t]]),e[d][1].end.offset-e[d][1].start.offset?(c=2,u=(0,a.V)(u,[["enter",e[d][1],t],["exit",e[d][1],t]])):c=0,(0,a.m)(e,n-1,d-n+3,u),d=n+u.length-c-2;break}}for(d=-1;++d<e.length;)"attentionSequence"===e[d][1].type&&(e[d][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,i=this.previous,a=(0,en.S)(i);return function(o){return n=o,e.enter("attentionSequence"),function o(s){if(s===n)return e.consume(s),o;let l=e.exit("attentionSequence"),u=(0,en.S)(s),c=!u||2===u&&a||r.includes(s),d=!a||2===a&&u||r.includes(i);return l._open=!!(42===n?c:c&&(a||!d)),l._close=!!(42===n?d:d&&(u||!c)),t(s)}(o)}}};function ei(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let ea={name:"labelStartLink",resolveAll:X.resolveAll,tokenize:function(e,t,n){let r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}},eo={42:w,43:w,45:w,48:w,49:w,50:w,51:w,52:w,53:w,54:w,55:w,56:w,57:w,62:I},es={91:{name:"definition",tokenize:function(e,t,n){let r,i=this;return function(t){var r;return e.enter("definition"),r=t,O.call(i,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function a(t){return(r=(0,L.B)(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),58===t)?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o):n(t)}function o(t){return(0,d.Ee)(t)?D(e,s)(t):s(t)}function s(t){return N(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(P,u,u)(t)}function u(t){return(0,d.On)(t)?(0,c.N)(e,h,"whitespace")(t):h(t)}function h(a){return null===a||(0,d.HP)(a)?(e.exit("definition"),i.parser.defined.push(r),t(a)):n(a)}}}},el={[-2]:M,[-1]:M,32:M},eu={35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,o=3;return"whitespace"===e[3][1].type&&(o+=2),i-2>o&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4),i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},(0,a.m)(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e},tokenize:function(e,t,n){let r=0;return function(i){var a;return e.enter("atxHeading"),a=i,e.enter("atxHeadingSequence"),function i(a){return 35===a&&r++<6?(e.consume(a),i):null===a||(0,d.Ee)(a)?(e.exit("atxHeadingSequence"),function n(r){return 35===r?(e.enter("atxHeadingSequence"),function t(r){return 35===r?(e.consume(r),t):(e.exit("atxHeadingSequence"),n(r))}(r)):null===r||(0,d.HP)(r)?(e.exit("atxHeading"),t(r)):(0,d.On)(r)?(0,c.N)(e,n,"whitespace")(r):(e.enter("atxHeadingText"),function t(r){return null===r||35===r||(0,d.Ee)(r)?(e.exit("atxHeadingText"),n(r)):(e.consume(r),t)}(r))}(a)):n(a)}(a)}}},42:x,45:[B,x],60:{concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return 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)),e},tokenize:function(e,t,n){let r,i,a,o,s,l=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),u};function u(o){return 33===o?(e.consume(o),c):47===o?(e.consume(o),i=!0,f):63===o?(e.consume(o),r=3,l.interrupt?t:D):(0,d.CW)(o)?(e.consume(o),a=String.fromCharCode(o),m):n(o)}function c(i){return 45===i?(e.consume(i),r=2,h):91===i?(e.consume(i),r=5,o=0,p):(0,d.CW)(i)?(e.consume(i),r=4,l.interrupt?t:D):n(i)}function h(r){return 45===r?(e.consume(r),l.interrupt?t:D):n(r)}function p(r){let i="CDATA[";return r===i.charCodeAt(o++)?(e.consume(r),o===i.length)?l.interrupt?t:x:p:n(r)}function f(t){return(0,d.CW)(t)?(e.consume(t),a=String.fromCharCode(t),m):n(t)}function m(o){if(null===o||47===o||62===o||(0,d.Ee)(o)){let s=47===o,u=a.toLowerCase();return!s&&!i&&U.includes(u)?(r=1,l.interrupt?t(o):x(o)):j.includes(a.toLowerCase())?(r=6,s)?(e.consume(o),g):l.interrupt?t(o):x(o):(r=7,l.interrupt&&!l.parser.lazy[l.now().line]?n(o):i?function t(n){return(0,d.On)(n)?(e.consume(n),t):_(n)}(o):v(o))}return 45===o||(0,d.lV)(o)?(e.consume(o),a+=String.fromCharCode(o),m):n(o)}function g(r){return 62===r?(e.consume(r),l.interrupt?t:x):n(r)}function v(t){return 47===t?(e.consume(t),_):58===t||95===t||(0,d.CW)(t)?(e.consume(t),b):(0,d.On)(t)?(e.consume(t),v):_(t)}function b(t){return 45===t||46===t||58===t||95===t||(0,d.lV)(t)?(e.consume(t),b):y(t)}function y(t){return 61===t?(e.consume(t),E):(0,d.On)(t)?(e.consume(t),y):v(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),s=t,T):(0,d.On)(t)?(e.consume(t),E):function t(n){return null===n||34===n||39===n||47===n||60===n||61===n||62===n||96===n||(0,d.Ee)(n)?y(n):(e.consume(n),t)}(t)}function T(t){return t===s?(e.consume(t),s=null,k):null===t||(0,d.HP)(t)?n(t):(e.consume(t),T)}function k(e){return 47===e||62===e||(0,d.On)(e)?v(e):n(e)}function _(t){return 62===t?(e.consume(t),A):n(t)}function A(t){return null===t||(0,d.HP)(t)?x(t):(0,d.On)(t)?(e.consume(t),A):n(t)}function x(t){return 45===t&&2===r?(e.consume(t),I):60===t&&1===r?(e.consume(t),N):62===t&&4===r?(e.consume(t),L):63===t&&3===r?(e.consume(t),D):93===t&&5===r?(e.consume(t),R):(0,d.HP)(t)&&(6===r||7===r)?(e.exit("htmlFlowData"),e.check(H,P,w)(t)):null===t||(0,d.HP)(t)?(e.exit("htmlFlowData"),w(t)):(e.consume(t),x)}function w(t){return e.check($,S,P)(t)}function S(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),C}function C(t){return null===t||(0,d.HP)(t)?w(t):(e.enter("htmlFlowData"),x(t))}function I(t){return 45===t?(e.consume(t),D):x(t)}function N(t){return 47===t?(e.consume(t),a="",O):x(t)}function O(t){if(62===t){let n=a.toLowerCase();return U.includes(n)?(e.consume(t),L):x(t)}return(0,d.CW)(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),O):x(t)}function R(t){return 93===t?(e.consume(t),D):x(t)}function D(t){return 62===t?(e.consume(t),L):45===t&&2===r?(e.consume(t),D):x(t)}function L(t){return null===t||(0,d.HP)(t)?(e.exit("htmlFlowData"),P(t)):(e.consume(t),L)}function P(n){return e.exit("htmlFlow"),t(n)}}},61:B,95:x,96:G,126:G},ec={38:V,92:W},ed={[-5]:K,[-4]:K,[-3]:K,33:et,38:V,42:er,60:[{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"),i};function i(t){return(0,d.CW)(t)?(e.consume(t),a):64===t?n(t):s(t)}function a(t){return 43===t||45===t||46===t||(0,d.lV)(t)?(r=1,function t(n){return 58===n?(e.consume(n),r=0,o):(43===n||45===n||46===n||(0,d.lV)(n))&&r++<32?(e.consume(n),t):(r=0,s(n))}(t)):s(t)}function o(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||(0,d.JQ)(r)?n(r):(e.consume(r),o)}function s(t){return 64===t?(e.consume(t),l):(0,d.cx)(t)?(e.consume(t),s):n(t)}function l(i){return(0,d.lV)(i)?function i(a){return 46===a?(e.consume(a),r=0,l):62===a?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(a),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(a){if((45===a||(0,d.lV)(a))&&r++<63){let n=45===a?t:i;return e.consume(a),n}return n(a)}(a)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,a,o=this;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),E):(0,d.CW)(t)?(e.consume(t),A):n(t)}function l(t){return 45===t?(e.consume(t),u):91===t?(e.consume(t),i=0,m):(0,d.CW)(t)?(e.consume(t),y):n(t)}function u(t){return 45===t?(e.consume(t),f):n(t)}function h(t){return null===t?n(t):45===t?(e.consume(t),p):(0,d.HP)(t)?(a=h,R(t)):(e.consume(t),h)}function p(t){return 45===t?(e.consume(t),f):h(t)}function f(e){return 62===e?O(e):45===e?p(e):h(e)}function m(t){let r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),i===r.length?g:m):n(t)}function g(t){return null===t?n(t):93===t?(e.consume(t),v):(0,d.HP)(t)?(a=g,R(t)):(e.consume(t),g)}function v(t){return 93===t?(e.consume(t),b):g(t)}function b(t){return 62===t?O(t):93===t?(e.consume(t),b):g(t)}function y(t){return null===t||62===t?O(t):(0,d.HP)(t)?(a=y,R(t)):(e.consume(t),y)}function E(t){return null===t?n(t):63===t?(e.consume(t),T):(0,d.HP)(t)?(a=E,R(t)):(e.consume(t),E)}function T(e){return 62===e?O(e):E(e)}function k(t){return(0,d.CW)(t)?(e.consume(t),_):n(t)}function _(t){return 45===t||(0,d.lV)(t)?(e.consume(t),_):function t(n){return(0,d.HP)(n)?(a=t,R(n)):(0,d.On)(n)?(e.consume(n),t):O(n)}(t)}function A(t){return 45===t||(0,d.lV)(t)?(e.consume(t),A):47===t||62===t||(0,d.Ee)(t)?x(t):n(t)}function x(t){return 47===t?(e.consume(t),O):58===t||95===t||(0,d.CW)(t)?(e.consume(t),w):(0,d.HP)(t)?(a=x,R(t)):(0,d.On)(t)?(e.consume(t),x):O(t)}function w(t){return 45===t||46===t||58===t||95===t||(0,d.lV)(t)?(e.consume(t),w):function t(n){return 61===n?(e.consume(n),S):(0,d.HP)(n)?(a=t,R(n)):(0,d.On)(n)?(e.consume(n),t):x(n)}(t)}function S(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,C):(0,d.HP)(t)?(a=S,R(t)):(0,d.On)(t)?(e.consume(t),S):(e.consume(t),I)}function C(t){return t===r?(e.consume(t),r=void 0,N):null===t?n(t):(0,d.HP)(t)?(a=C,R(t)):(e.consume(t),C)}function I(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||(0,d.Ee)(t)?x(t):(e.consume(t),I)}function N(e){return 47===e||62===e||(0,d.Ee)(e)?x(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"),D}function D(t){return(0,d.On)(t)?(0,c.N)(e,L,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),a(t)}}}],91:ea,92:[{name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return(0,d.HP)(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}},W],93:X,95:er,96:{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,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++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,i,a=0;
1return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),a++,t):(e.exit("codeTextSequence"),o(n))}(t)};function o(l){return null===l?n(l):32===l?(e.enter("space"),e.consume(l),e.exit("space"),o):96===l?(i=e.enter("codeTextSequence"),r=0,function n(o){return 96===o?(e.consume(o),r++,n):r===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(o)):(i.type="codeTextData",s(o))}(l)):(0,d.HP)(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):(e.enter("codeTextData"),s(l))}function s(t){return null===t||32===t||96===t||(0,d.HP)(t)?(e.exit("codeTextData"),o(t)):(e.consume(t),s)}}}},eh={null:[er,y]},ep={null:[42,95]},ef={null:[]},em=/[\0\t\n\r]/g;function eg(e,t){let 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)==65535||(65535&n)==65534||n>1114111?"�":String.fromCodePoint(n)}let ev=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function eb(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){let e=n.charCodeAt(1),t=120===e||88===e;return eg(n.slice(t?2:1),t?16:10)}return q(n)||e}var ey=n(16277);let eE={}.hasOwnProperty;function eT(e){return{line:e.line,column:e.column,offset:e.offset}}function ek(e,t){if(e)throw Error("Cannot close `"+e.type+"` ("+(0,ey.L)({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+(0,ey.L)({start:t.start,end:t.end})+") is open");throw Error("Cannot close document, a token (`"+t.type+"`, "+(0,ey.L)({start:t.start,end:t.end})+") is still open")}function e_(e){let t=this;t.parser=function(n){var o,s;let c,f,m,g;return"object"==typeof(o={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(s=o,o=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(b),autolinkProtocol:c,autolinkEmail:c,atxHeading:r(m),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:c,characterReference:c,codeFenced:r(f),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:r(f,a),codeText:r(function(){return{type:"inlineCode",value:""}},a),codeTextData:c,data:c,codeFlowValue:c,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(g),hardBreakTrailing:r(g),htmlFlow:r(v,a),htmlFlowData:c,htmlText:r(v,a),htmlTextData:c,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:a,link:r(b),listItem:r(function(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}),listItemValue:function(e){this.data.expectingFirstListItemValue&&(this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0)},listOrdered:r(y,function(){this.data.expectingFirstListItemValue=!0}),listUnordered:r(y),paragraph:r(function(){return{type:"paragraph",children:[]}}),reference:function(){this.data.referenceType="collapsed"},referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:r(m),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:s(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:s(),autolinkEmail:function(e){d.call(this,e),this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)},autolinkProtocol:function(e){d.call(this,e),this.stack[this.stack.length-1].url=this.sliceSerialize(e)},blockQuote:s(),characterEscapeValue:d,characterReferenceMarkerHexadecimal:p,characterReferenceMarkerNumeric:p,characterReferenceValue:function(e){let t,n=this.sliceSerialize(e),r=this.data.characterReferenceType;r?(t=eg(n,"characterReferenceMarkerNumeric"===r?10:16),this.data.characterReferenceType=void 0):t=q(n);let i=this.stack[this.stack.length-1];i.value+=t},characterReference:function(e){this.stack.pop().position.end=eT(e.end)},codeFenced:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}),codeFencedFence:function(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)},codeFencedFenceInfo:function(){let e=this.resume();this.stack[this.stack.length-1].lang=e},codeFencedFenceMeta:function(){let e=this.resume();this.stack[this.stack.length-1].meta=e},codeFlowValue:d,codeIndented:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:d,data:d,definition:s(),definitionDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},definitionLabelString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=(0,L.B)(this.sliceSerialize(e)).toLowerCase()},definitionTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},emphasis:s(),hardBreakEscape:s(h),hardBreakTrailing:s(h),htmlFlow:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:d,htmlText:s(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:d,image:s(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let 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}),label:function(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,"link"===n.type?n.children=e.children:n.alt=t},labelText:function(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=t.replace(ev,eb),n.identifier=(0,L.B)(t).toLowerCase()},lineEnding:function(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){n.children[n.children.length-1].position.end=eT(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.t
1ype)&&(c.call(this,e),d.call(this,e))},link:s(function(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let 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}),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=(0,L.B)(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"},resourceDestinationString:function(){let e=this.resume();this.stack[this.stack.length-1].url=e},resourceTitleString:function(){let e=this.resume();this.stack[this.stack.length-1].title=e},resource:function(){this.data.inReference=void 0},setextHeading:s(function(){this.data.setextHeadingSlurpLineEnding=void 0}),setextHeadingLineSequence:function(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2},setextHeadingText:function(){this.data.setextHeadingSlurpLineEnding=!0},strong:s(),thematicBreak:s()}};!function e(t,n){let r=-1;for(;++r<n.length;){let i=n[r];Array.isArray(i)?e(t,i):function(e,t){let n;for(n in t)if(eE.call(t,n))switch(n){case"canContainEols":{let r=t[n];r&&e[n].push(...r);break}case"transforms":{let r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{let r=t[n];r&&Object.assign(e[n],r)}}}(t,i)}}(t,(e||{}).mdastExtensions||[]);let n={};return function(e){let r={type:"root",children:[]},i={stack:[r],tokenStack:[],config:t,enter:o,exit:l,buffer:a,resume:u,data:n},s=[],c=-1;for(;++c<e.length;)("listOrdered"===e[c][1].type||"listUnordered"===e[c][1].type)&&("enter"===e[c][0]?s.push(c):c=function(e,t,n){let r,i,a,o,s=t-1,l=-1,u=!1;for(;++s<=n;){let t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,o=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||o||l||a||(a=s),o=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:o=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 o=s;for(i=void 0;o--;){let t=e[o];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",u=!0),t[1].type="lineEnding",i=o}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}a&&(!i||a<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){let i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(s,0,["enter",i,t[2]]),s++,n++,a=void 0,o=!0}}}return e[t][1]._spread=u,n}(e,s.pop(),c));for(c=-1;++c<e.length;){let n=t[e[c][0]];eE.call(n,e[c][1].type)&&n[e[c][1].type].call(Object.assign({sliceSerialize:e[c][2].sliceSerialize},i),e[c][1])}if(i.tokenStack.length>0){let e=i.tokenStack[i.tokenStack.length-1];(e[1]||ek).call(i,void 0,e[0])}for(r.position={start:eT(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:eT(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},c=-1;++c<t.transforms.length;)r=t.transforms[c](r)||r;return r};function r(e,t){return function(n){o.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(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:eT(t.start),end:void 0}}function s(e){return function(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ek).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+(0,ey.L)({start:e.start,end:e.end})+"): it’s not open");n.position.end=eT(e.end)}function u(){return(0,i.d)(this.stack.pop())}function c(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&"text"===n.type||((n={type:"text",value:""}).position={start:eT(e.start),end:void 0},t.push(n)),this.stack.push(n)}function d(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=eT(e.end)}function h(){this.data.atHardBreak=!0}function p(e){this.data.characterReferenceType=e.type}function f(){return{type:"code",lang:null,meta:null,value:""}}function m(){return{type:"heading",depth:0,children:[]}}function g(){return{type:"break"}}function v(){return{type:"html",value:""}}function b(){return{type:"link",title:null,url:"",children:[]}}function y(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}})(s)(function(e){for(;!l(e););return e}((function(e){let t={constructs:(0,u.y)([r,...(e||{}).extensions||[]]),content:n(h),defined:[],document:n(p),flow:n(b),lazy:{},string:n(E),text:n(T)};return t;function n(e){return function(n){return function(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
1olumn:n&&n.column||1,offset:n&&n.offset||0},i={},o=[],s=[],l=[],u={attempt:g(function(e,t){v(e,t.from)}),check:g(m),consume:function(e){(0,d.HP)(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===s[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),l.push(n),n},exit:function(e){let t=l.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,b()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n,r=-1,i=[];for(;++r<e.length;){let a,o=e[r];if("string"==typeof o)a=o;else switch(o){case -5:a="\r";break;case -4:a="\n";break;case -3:a="\r\n";break;case -2:a=t?" ":"	";break;case -1:if(!t&&n)continue;a=" ";break;default:a=String.fromCharCode(o)}n=-2===o,i.push(a)}return i.join("")}(p(e),t)},sliceStream:p,write:function(e){return(s=(0,a.V)(s,e),function(){let e;for(;r._index<s.length;){let n=s[r._index];if("string"==typeof n)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<n.length;){var t;t=n.charCodeAt(r._bufferIndex),h=h(t)}else h=h(n)}}(),null!==s[s.length-1])?[]:(v(t,0),c.events=(0,Z.W)(o,c.events,c),c.events)}},h=t.tokenize.call(c,u);return t.resolveAll&&o.push(t),c;function p(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;if(r===a)n=[e[r].slice(i,o)];else{if(n=e.slice(r,a),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}o>0&&n.push(e[a].slice(0,o))}return n}(s,e)}function f(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function m(e,t){t.restore()}function g(e,t){return function(n,i,a){var o;let s,d,h,p;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(o=n,function(e){let t=null!==e&&o[e],n=null!==e&&o.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function m(e){return(s=e,d=0,0===e.length)?a:g(e[d])}function g(e){return function(n){return(p=function(){let e=f(),t=c.previous,n=c.currentConstruct,i=c.events.length,a=Array.from(l);return{from:i,restore:function(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,l=a,b()}}}(),h=e,e.partial||(c.currentConstruct=e),e.name&&c.parser.constructs.disable.null.includes(e.name))?y(n):e.tokenize.call(t?Object.assign(Object.create(c),t):c,u,v,y)(n)}}function v(t){return e(h,p),i}function y(e){return(p.restore(),++d<s.length)?g(s[d]):a}}}function v(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&(0,a.m)(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 i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(s).document().write((f=1,m="",g=!0,function(e,t,n){let r,i,a,o,s,l=[];for(e=m+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),a=0,m="",g&&(65279===e.charCodeAt(0)&&a++,g=void 0);a<e.length;){if(em.lastIndex=a,o=(r=em.exec(e))&&void 0!==r.index?r.index:e.length,s=e.charCodeAt(o),!r){m=e.slice(a);break}if(10===s&&a===o&&c)l.push(-3),c=void 0;else switch(c&&(l.push(-5),c=void 0),a<o&&(l.push(e.slice(a,o)),f+=o-a),s){case 0:l.push(65533),f++;break;case 9:for(i=4*Math.ceil(f/4),l.push(-2);f++<i;)l.push(-1);break;case 10:l.push(-4),f=1;break;default:c=!0,f=1}a=o+1}return n&&(c&&l.push(-5),m&&l.push(m),l.push(null)),l})(n,o,!0))))}}},14764:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};
1Object.defineProperty(t,"__esModule",{value:!0}),t.Allow=t.MalformedJSON=t.PartialJSON=t.parseJSON=t.parse=void 0;let a=n(9846);Object.defineProperty(t,"Allow",{enumerable:!0,get:function(){return a.Allow}}),i(n(9846),t);class o extends Error{}t.PartialJSON=o;class s extends Error{}function l(e,t=a.Allow.ALL){if("string"!=typeof e)throw TypeError(`expecting str, got ${typeof e}`);if(!e.trim())throw Error(`${e} is empty`);return u(e.trim(),t)}t.MalformedJSON=s,t.parseJSON=l;let u=(e,t)=>{let n=e.length,r=0,i=e=>{throw new o(`${e} at position ${r}`)},l=e=>{throw new s(`${e} at position ${r}`)},u=()=>(f(),r>=n&&i("Unexpected end of input"),'"'===e[r])?c():"{"===e[r]?d():"["===e[r]?h():"null"===e.substring(r,r+4)||a.Allow.NULL&t&&n-r<4&&"null".startsWith(e.substring(r))?(r+=4,null):"true"===e.substring(r,r+4)||a.Allow.BOOL&t&&n-r<4&&"true".startsWith(e.substring(r))?(r+=4,!0):"false"===e.substring(r,r+5)||a.Allow.BOOL&t&&n-r<5&&"false".startsWith(e.substring(r))?(r+=5,!1):"Infinity"===e.substring(r,r+8)||a.Allow.INFINITY&t&&n-r<8&&"Infinity".startsWith(e.substring(r))?(r+=8,1/0):"-Infinity"===e.substring(r,r+9)||a.Allow._INFINITY&t&&1<n-r&&n-r<9&&"-Infinity".startsWith(e.substring(r))?(r+=9,-1/0):"NaN"===e.substring(r,r+3)||a.Allow.NAN&t&&n-r<3&&"NaN".startsWith(e.substring(r))?(r+=3,NaN):p(),c=()=>{let o=r,s=!1;for(r++;r<n&&('"'!==e[r]||s&&"\\"===e[r-1]);)s="\\"===e[r]&&!s,r++;if('"'==e.charAt(r))try{return JSON.parse(e.substring(o,++r-Number(s)))}catch(e){l(String(e))}else if(a.Allow.STR&t)try{return JSON.parse(e.substring(o,r-Number(s))+'"')}catch(t){return JSON.parse(e.substring(o,e.lastIndexOf("\\"))+'"')}i("Unterminated string literal")},d=()=>{r++,f();let o={};try{for(;"}"!==e[r];){if(f(),r>=n&&a.Allow.OBJ&t)return o;let i=c();f(),r++;try{let e=u();o[i]=e}catch(e){if(a.Allow.OBJ&t)return o;throw e}f(),","===e[r]&&r++}}catch(e){if(a.Allow.OBJ&t)return o;i("Expected '}' at end of object")}return r++,o},h=()=>{r++;let n=[];try{for(;"]"!==e[r];)n.push(u()),f(),","===e[r]&&r++}catch(e){if(a.Allow.ARR&t)return n;i("Expected ']' at end of array")}return r++,n},p=()=>{if(0===r){"-"===e&&l("Not sure what '-' is");try{return JSON.parse(e)}catch(n){if(a.Allow.NUM&t)try{return JSON.parse(e.substring(0,e.lastIndexOf("e")))}catch(e){}l(String(n))}}let o=r;for("-"===e[r]&&r++;e[r]&&-1===",]}".indexOf(e[r]);)r++;r!=n||a.Allow.NUM&t||i("Unterminated number literal");try{return JSON.parse(e.substring(o,r))}catch(t){"-"===e.substring(o,r)&&i("Not sure what '-' is");try{return JSON.parse(e.substring(o,e.lastIndexOf("e")))}catch(e){l(String(e))}}},f=()=>{for(;r<n&&" \n\r	".includes(e[r]);)r++};return u()};t.parse=l},16277:(e,t,n)=>{function r(e){return e&&"object"==typeof e?"position"in e||"type"in e?a(e.position):"start"in e||"end"in e?a(e):"line"in e||"column"in e?i(e):"":""}function i(e){return o(e&&e.line)+":"+o(e&&e.column)}function a(e){return i(e&&e.start)+"-"+i(e&&e.end)}function o(e){return e&&"number"==typeof e?e:1}n.d(t,{L:()=>r})},16433:(e,t,n)=>{n.d(t,{s:()=>o});var r=n(47211),i=n(96948),a=n(28400);function o(e){return e<=0?function(){return r.w}:(0,i.N)(function(t,n){var r=0;t.subscribe((0,a._)(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}},17032:(e,t,n)=>{function r(e,t,n,r){let i,a=e.length,o=0;if(t=t<0?-t>a?0:a+t:t>a?a:t,n=n>0?n:0,r.length<1e4)(i=Array.from(r)).unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);o<r.length;)(i=r.slice(o,o+1e4)).unshift(t,0),e.splice(...i),o+=1e4,t+=1e4}function i(e,t){return e.length>0?(r(e,e.length,0,t),e):t}n.d(t,{V:()=>i,m:()=>r})},18283:(e,t,n)=>{n.d(t,{o:()=>i});var r=n(16277);class i extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let i="",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?i=e:!a.cause&&e&&(o=!0,i=e.message,a.cause=e),!a.ruleId&&!a.source&&"string"==typeof n){let 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){let e=a.ancestors[a.ancestors.length-1];e&&(a.place=e.position)}let s=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=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=(0,r.L)(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}}i.prototype.file="",i.prototype.name="",i.prototype.reason="",i.prototype.message="",i.prototype.stack="",i.prototype.column=void 0,i.prototype.line=void 0,i.prototype.ancestors=void 0,i.prototype.cause=void 0,i.prototype.fatal=void 0,i.prototype.place=void 0,i.prototype.ruleId=void 0,i.prototype.source=void 0}
1,18362:(e,t,n)=>{n.d(t,{F:()=>o});var r=n(77163),i=n(96948),a=n(28400);function o(e,t){return void 0===t&&(t=r.D),e=null!=e?e:s,(0,i.N)(function(n,r){var i,o=!0;n.subscribe((0,a._)(r,function(n){var a=t(n);(o||!e(i,a))&&(o=!1,i=a,r.next(n))}))})}function s(e,t){return e===t}},19526:(e,t,n)=>{n.d(t,{Oh:()=>o});var r=n(12115),i=0,a=null;function o(){r.useEffect(()=>{a||(a={start:s(),end:s()});let{start:e,end:t}=a;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),i++,()=>{1===i&&(null==a||a.start.remove(),null==a||a.end.remove(),a=null),i=Math.max(0,i-1)}},[])}function s(){let 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}},20437:(e,t,n)=>{n.d(t,{N:()=>r});function r(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var a=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(a),!i)return a}},20545:(e,t,n)=>{n.d(t,{w:()=>d});var r=n(12718),i=n(42421),a=n(96948),o=n(8286),s=n(10899),l=n(28400),u=n(20437),c=(0,s.L)(function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function d(e,t){var n=(0,i.v)(e)?{first:e}:"number"==typeof e?{each:e}:e,s=n.first,c=n.each,d=n.with,p=void 0===d?h:d,f=n.scheduler,m=void 0===f?null!=t?t:r.E:f,g=n.meta,v=void 0===g?null:g;if(null==s&&null==c)throw TypeError("No timeout provided.");return(0,a.N)(function(e,t){var n,r,i=null,a=0,d=function(e){r=(0,u.N)(t,m,function(){try{n.unsubscribe(),(0,o.Tg)(p({meta:v,lastValue:i,seen:a})).subscribe(t)}catch(e){t.error(e)}},e)};n=e.subscribe((0,l._)(t,function(e){null==r||r.unsubscribe(),a++,t.next(i=e),c>0&&d(c)},void 0,void 0,function(){(null==r?void 0:r.closed)||null==r||r.unsubscribe(),i=null})),a||d(null!=s?"number"==typeof s?s:s-m.now():c)})}function h(e){throw new c(e)}},20973:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("thumbs-down",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]])},20981:(e,t,n)=>{n.d(t,{s:()=>i});var r=n(47948);function i(e,t){var n="object"==typeof t;return new Promise(function(i,a){var o,s=!1;e.subscribe({next:function(e){o=e,s=!0},error:a,complete:function(){s?i(o):n?i(t.defaultValue):a(new r.G)}})})}},21594:(e,t,n)=>{n.d(t,{z:()=>g});var r=n(45037),i=Array.isArray,a=Object.getPrototypeOf,o=Object.prototype,s=Object.keys,l=n(78842),u=n(77163),c=n(71450),d=n(63704),h=Array.isArray,p=n(95868),f=n(28400),m=n(20437);function g(){for(var e,t,n,m=[],g=0;g<arguments.length;g++)m[g]=arguments[g];var b=(0,p.lI)(m),y=(0,p.ms)(m),E=function(e){if(1===e.length){var t,n=e[0];if(i(n))return{args:n,keys:null};if((t=n)&&"object"==typeof t&&a(t)===o){var r=s(n);return{args:r.map(function(e){return n[e]}),keys:r}}}return{args:e,keys:null}}(m),T=E.args,k=E.keys;if(0===T.length)return(0,l.H)([],b);var _=new r.c((e=T,t=b,void 0===(n=k?function(e){return k.reduce(function(t,n,r){return t[n]=e[r],t},{})}:u.D)&&(n=u.D),function(r){v(t,function(){for(var i=e.length,a=Array(i),o=i,s=i,u=function(i){v(t,function(){var u=(0,l.H)(e[i],t),c=!1;u.subscribe((0,f._)(r,function(e){a[i]=e,!c&&(c=!0,s--),s||r.next(n(a.slice()))},function(){--o||r.complete()}))},r)},c=0;c<i;c++)u(c)},r)}));return y?_.pipe((0,d.T)(function(e){return h(e)?y.apply(void 0,(0,c.fX)([],(0,c.zs)(e))):y(e)})):_}function v(e,t,n){e?(0,m.N)(n,e,t):t()}},22220:(e,t,n)=>{let r;n.d(t,{Ik:()=>x});let i=Symbol("Let zodToJsonSchema decide on which parser to use"),a={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"};var o=n(98734);let s=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};function l(e){if("openAi"!==e.target)return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:"relative"===e.$refStrategy?s(t,e.currentPath):t.join("/")}}function u(e,t,n,r){r?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}
1function c(e,t,n,r,i){e[t]=n,u(e,t,r,i)}function d(e,t){return k(e.type._def,t)}let h={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(void 0===r&&(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r),ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function p(e,t){let n={type:"string"};if(e.checks)for(let r of e.checks)switch(r.kind){case"min":c(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,r.message,t);break;case"max":c(n,"maxLength","number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"email":switch(t.emailStrategy){case"format:email":g(n,"email",r.message,t);break;case"format:idn-email":g(n,"idn-email",r.message,t);break;case"pattern:zod":v(n,h.email,r.message,t)}break;case"url":g(n,"uri",r.message,t);break;case"uuid":g(n,"uuid",r.message,t);break;case"regex":v(n,r.regex,r.message,t);break;case"cuid":v(n,h.cuid,r.message,t);break;case"cuid2":v(n,h.cuid2,r.message,t);break;case"startsWith":v(n,RegExp(`^${f(r.value,t)}`),r.message,t);break;case"endsWith":v(n,RegExp(`${f(r.value,t)}$`),r.message,t);break;case"datetime":g(n,"date-time",r.message,t);break;case"date":g(n,"date",r.message,t);break;case"time":g(n,"time",r.message,t);break;case"duration":g(n,"duration",r.message,t);break;case"length":c(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,r.message,t),c(n,"maxLength","number"==typeof n.maxLength?Math.min(n.maxLength,r.value):r.value,r.message,t);break;case"includes":v(n,RegExp(f(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&g(n,"ipv4",r.message,t),"v4"!==r.version&&g(n,"ipv6",r.message,t);break;case"base64url":v(n,h.base64url,r.message,t);break;case"jwt":v(n,h.jwt,r.message,t);break;case"cidr":"v6"!==r.version&&v(n,h.ipv4Cidr,r.message,t),"v4"!==r.version&&v(n,h.ipv6Cidr,r.message,t);break;case"emoji":v(n,h.emoji(),r.message,t);break;case"ulid":v(n,h.ulid,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":g(n,"binary",r.message,t);break;case"contentEncoding:base64":c(n,"contentEncoding","base64",r.message,t);break;case"pattern:zod":v(n,h.base64,r.message,t)}break;case"nanoid":v(n,h.nanoid,r.message,t)}return n}function f(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let n=0;n<e.length;n++)m.has(e[n])||(t+="\\"),t+=e[n];return t}(e):e}let m=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function g(e,t,n,r){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):c(e,"format",t,n,r)}function v(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.allOf.push({pattern:b(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):c(e,"pattern",b(t,r),n,r)}
1function b(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},r=n.i?e.source.toLowerCase():e.source,i="",a=!1,o=!1,s=!1;for(let e=0;e<r.length;e++){if(a){i+=r[e],a=!1;continue}if(n.i){if(o){if(r[e].match(/[a-z]/)){s?(i+=r[e],i+=`${r[e-2]}-${r[e]}`.toUpperCase(),s=!1):"-"===r[e+1]&&r[e+2]?.match(/[a-z]/)?(i+=r[e],s=!0):i+=`${r[e]}${r[e].toUpperCase()}`;continue}}else if(r[e].match(/[a-z]/)){i+=`[${r[e]}${r[e].toUpperCase()}]`;continue}}if(n.m){if("^"===r[e]){i+=`(^|(?<=[\r
2]))`;continue}else if("$"===r[e]){i+=`($|(?=[\r
3]))`;continue}}if(n.s&&"."===r[e]){i+=o?`${r[e]}\r
4`:`[${r[e]}\r
5]`;continue}i+=r[e],"\\"===r[e]?a=!0:o&&"]"===r[e]?o=!1:o||"["!==r[e]||(o=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function y(e,t){if("openAi"===t.target&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),"openApi3"===t.target&&e.keyType?._def.typeName===o.kY.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((n,r)=>({...n,[r]:k(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",r]})??l(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let n={type:"object",additionalProperties:k(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if("openApi3"===t.target)return n;if(e.keyType?._def.typeName===o.kY.ZodString&&e.keyType._def.checks?.length){let{type:r,...i}=p(e.keyType._def,t);return{...n,propertyNames:i}}if(e.keyType?._def.typeName===o.kY.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===o.kY.ZodBranded&&e.keyType._def.type._def.typeName===o.kY.ZodString&&e.keyType._def.type._def.checks?.length){let{type:r,...i}=d(e.keyType._def,t);return{...n,propertyNames:i}}return n}let E={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},T=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>k(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0};function k(e,t,n=!1){let r=t.seen.get(e);if(t.override){let a=t.override?.(e,t,r,n);if(a!==i)return a}if(r&&!n){let e=_(r,t);if(void 0!==e)return e}let a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);let s=((e,t,n)=>{switch(t){case o.kY.ZodString:return p(e,n);case o.kY.ZodNumber:var r,i,a,s,h,f,m,g,v,b=e,_=n;let A={type:"number"};if(!b.checks)return A;for(let e of b.checks)switch(e.kind){case"int":A.type="integer",u(A,"type",e.message,_);break;case"min":"jsonSchema7"===_.target?e.inclusive?c(A,"minimum",e.value,e.message,_):c(A,"exclusiveMinimum",e.value,e.message,_):(e.inclusive||(A.exclusiveMinimum=!0),c(A,"minimum",e.value,e.message,_));break;case"max":"jsonSchema7"===_.target?e.inclusive?c(A,"maximum",e.value,e.message,_):c(A,"exclusiveMaximum",e.value,e.message,_):(e.inclusive||(A.exclusiveMaximum=!0),c(A,"maximum",e.value,e.message,_));break;case"multipleOf":c(A,"multipleOf",e.value,e.message,_)}return A;case o.kY.ZodObject:return function(e,t){let n="openAi"===t.target,r={type:"object",properties:{}},i=[],a=e.shape();for(let e in a){let o=a[e];if(void 0===o||void 0===o._def)continue;let s=function(e){try{return e.isOptional()}catch{return!0}}(o);s&&n&&("ZodOptional"===o._def.typeName&&(o=o._def.innerType),o.isNullable()||(o=o.nullable()),s=!1);let l=k(o._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==l&&(r.properties[e]=l,s||i.push(e))}i.length&&(r.required=i);let o=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return k(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==o&&(r.additionalProperties=o),r}(e,n);case o.kY.ZodBigInt:var x=e,w=n;let S={type:"integer",format:"int64"};if(!x.checks)return S;for(let e of x.checks)switch(e.kind){case"min":"jsonSchema7"===w.target?e.inclusive?c(S,"minimum",e.value,e.message,w):c(S,"exclusiveMinimum",e.value,e.message,w):(e.inclusive||(S.exclusiveMinimum=!0),c(S,"minimum",e.value,e.message,w));break;case"max":"jsonSchema7"===w.target?e.inclusive?c(S,"maximum",e.value,e.message,w):c(S,"exclusiveMaximum",e.value,e.message,w):(e.inclusive||(S.exclusiveMaximum=!0),c(S,"maximum",e.value,e.message,w));break;case"multipleOf":c(S,"multipleOf",e.value,e.message,w)}return S;case o.kY.ZodBoolean:return{type:"boolean"};
5case o.kY.ZodDate:return function e(t,n,r){let i=r??n.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((r,i)=>e(t,n,r))};switch(i){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":var a=t,o=n;let s={type:"integer",format:"unix-time"};if("openApi3"===o.target)return s;for(let e of a.checks)switch(e.kind){case"min":c(s,"minimum",e.value,e.message,o);break;case"max":c(s,"maximum",e.value,e.message,o)}return s}}(e,n);case o.kY.ZodUndefined:return{not:l(n)};case o.kY.ZodNull:return"openApi3"===n.target?{enum:["null"],nullable:!0}:{type:"null"};case o.kY.ZodArray:var C=e,I=n;let N={type:"array"};return C.type?._def&&C.type?._def?.typeName!==o.kY.ZodAny&&(N.items=k(C.type._def,{...I,currentPath:[...I.currentPath,"items"]})),C.minLength&&c(N,"minItems",C.minLength.value,C.minLength.message,I),C.maxLength&&c(N,"maxItems",C.maxLength.value,C.maxLength.message,I),C.exactLength&&(c(N,"minItems",C.exactLength.value,C.exactLength.message,I),c(N,"maxItems",C.exactLength.value,C.exactLength.message,I)),N;case o.kY.ZodUnion:case o.kY.ZodDiscriminatedUnion:var O=e,R=n;if("openApi3"===R.target)return T(O,R);let D=O.options instanceof Map?Array.from(O.options.values()):O.options;if(D.every(e=>e._def.typeName in E&&(!e._def.checks||!e._def.checks.length))){let e=D.reduce((e,t)=>{let n=E[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}if(D.every(e=>"ZodLiteral"===e._def.typeName&&!e.description)){let e=D.reduce((e,t)=>{let n=typeof t._def.value;switch(n){case"string":case"number":case"boolean":return[...e,n];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}},[]);if(e.length===D.length){let t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:D.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(D.every(e=>"ZodEnum"===e._def.typeName))return{type:"string",enum:D.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return T(O,R);case o.kY.ZodIntersection:var L=e,P=n;let M=[k(L.left._def,{...P,currentPath:[...P.currentPath,"allOf","0"]}),k(L.right._def,{...P,currentPath:[...P.currentPath,"allOf","1"]})].filter(e=>!!e),F="jsonSchema2019-09"===P.target?{unevaluatedProperties:!1}:void 0,B=[];return M.forEach(e=>{if((!("type"in e)||"string"!==e.type)&&"allOf"in e)B.push(...e.allOf),void 0===e.unevaluatedProperties&&(F=void 0);else{let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){let{additionalProperties:n,...r}=e;t=r}else F=void 0;B.push(t)}}),B.length?{allOf:B,...F}:void 0;case o.kY.ZodTuple:return r=e,i=n,r.rest?{type:"array",minItems:r.items.length,items:r.items.map((e,t)=>k(e._def,{...i,currentPath:[...i.currentPath,"items",`${t}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[]),additionalItems:k(r.rest._def,{...i,currentPath:[...i.currentPath,"additionalItems"]})}:{type:"array",minItems:r.items.length,maxItems:r.items.length,items:r.items.map((e,t)=>k(e._def,{...i,currentPath:[...i.currentPath,"items",`${t}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[])};case o.kY.ZodRecord:return y(e,n);case o.kY.ZodLiteral:var j=e,U=n;let H=typeof j.value;return"bigint"!==H&&"number"!==H&&"boolean"!==H&&"string"!==H?{type:Array.isArray(j.value)?"array":"object"}:"openApi3"===U.target?{type:"bigint"===H?"integer":H,enum:[j.value]}:{type:"bigint"===H?"integer":H,const:j.value};case o.kY.ZodEnum:return{type:"string",enum:Array.from(e.values)};case o.kY.ZodNativeEnum:var $=e;let z=$.values,G=Object.keys($.values).filter(e=>"number"!=typeof z[z[e]]).map(e=>z[e]),Y=Array.from(new Set(G.map(e=>typeof e)));return{type:1===Y.length?"string"===Y[0]?"string":"number":["string","number"],enum:G};case o.kY.ZodNullable:var q=e,V=n;if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(q.innerType._def.typeName)&&(!q.innerType._def.checks||!q.innerType._def.checks.length))return"openApi3"===V.target?{type:E[q.innerType._def.typeName],nullable:!0}:{type:[E[q.innerType._def.typeName],"null"]};if("openApi3"===V.target){let e=k(q.innerType._def,{...V,currentPath:[...V.currentPath]});return e&&"$ref"in e?{allOf:[e],nullable:!0}:e&&{...e,nullable:!0}}let W=k(q.innerType._def,{...V,currentPath:[...V.currentPath,"anyOf","0"]});return W&&{anyOf:[W,{type:"null"}]};case o.kY.ZodOptional:var K=e,Z=n;if(Z.currentPath.toString()===Z.propertyPath?.toString())return k(K.innerType._def,Z);let X=k(K.innerType._def,{...Z,currentPath:[...Z.currentPath,"anyOf","1"]});return X?{anyOf:[{not:l(Z)},X]}:l(Z);case o.kY.ZodMap:return a=e,"record"===(s=n).mapStrategy?y(a,s):{type:"array",maxItems:125,items:{type:"array",items:[k(a.keyType._def,{...s,currentPath:[...s.currentPath,"items","items","0"]})||l(s),k(a.valueType._def,{...s,currentPath:[...s.currentPath,"items","items","1"]})||l(s)],minItems:2,maxItems:2}};case o.kY.ZodSet:var Q=e,J=n;let ee={type:"array",uniqueItems:!0,items:k(Q.valueType._def,{...J,currentPath:[...J.currentPath,"items"]})};return Q.minSize&&c(ee,"minItems",Q.minSize.value,Q.minSize.message,J),Q.maxSize&&c(ee,"maxItems",Q.maxSize.value,Q.maxSize.message,J),ee;case o.kY.ZodLazy:return()=>e.getter()._def;
5case o.kY.ZodPromise:return k(e.type._def,n);case o.kY.ZodNaN:case o.kY.ZodNever:return"openAi"===(h=n).target?void 0:{not:l({...h,currentPath:[...h.currentPath,"not"]})};case o.kY.ZodEffects:return f=e,"input"===(m=n).effectStrategy?k(f.schema._def,m):l(m);case o.kY.ZodAny:case o.kY.ZodUnknown:return l(n);case o.kY.ZodDefault:return g=e,v=n,{...k(g.innerType._def,v),default:g.defaultValue()};case o.kY.ZodBranded:return d(e,n);case o.kY.ZodReadonly:case o.kY.ZodCatch:return k(e.innerType._def,n);case o.kY.ZodPipeline:var et=e,en=n;if("input"===en.pipeStrategy)return k(et.in._def,en);if("output"===en.pipeStrategy)return k(et.out._def,en);let er=k(et.in._def,{...en,currentPath:[...en.currentPath,"allOf","0"]}),ei=k(et.out._def,{...en,currentPath:[...en.currentPath,"allOf",er?"1":"0"]});return{allOf:[er,ei].filter(e=>void 0!==e)};case o.kY.ZodFunction:case o.kY.ZodVoid:case o.kY.ZodSymbol:default:return}})(e,e.typeName,t),h="function"==typeof s?k(s(),t):s;if(h&&A(e,t,h),t.postProcess){let n=t.postProcess(h,e,t);return a.jsonSchema=h,n}return a.jsonSchema=h,h}let _=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:s(t.currentPath,e.path)};case"none":case"seen":if(e.path.length<t.currentPath.length&&e.path.every((e,n)=>t.currentPath[n]===e))return console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),l(t);return"seen"===t.$refStrategy?l(t):void 0}},A=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n),x=(e,t)=>{let n=(e=>{let t=(e=>"string"==typeof e?{...a,name:e}:{...a,...e})(e),n=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}})(t),r="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:k(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??l(n)}),{}):void 0,i="string"==typeof t?t:t?.nameStrategy==="title"?void 0:t?.name,o=k(e._def,void 0===i?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1)??l(n),s="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==s&&(o.title=s),n.flags.hasReferencedOpenAiAnyType&&(r||(r={}),r[n.openAiAnyTypeName]||(r[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:"relative"===n.$refStrategy?"1":[...n.basePath,n.definitionPath,n.openAiAnyTypeName].join("/")}}));let u=void 0===i?r?{...o,[n.definitionPath]:r}:o:{$ref:[..."relative"===n.$refStrategy?[]:n.basePath,n.definitionPath,i].join("/"),[n.definitionPath]:{...r,[i]:o}};return"jsonSchema7"===n.target?u.$schema="http://json-schema.org/draft-07/schema#":("jsonSchema2019-09"===n.target||"openAi"===n.target)&&(u.$schema="https://json-schema.org/draft/2019-09/schema#"),"openAi"===n.target&&("anyOf"in u||"oneOf"in u||"allOf"in u||"type"in u&&Array.isArray(u.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),u}},23362:(e,t,n)=>{n.d(t,{S:()=>i});var r=n(3407);function i(e){return null===e||(0,r.Ee)(e)||(0,r.Ny)(e)?1:(0,r.es)(e)?2:void 0}},23558:(e,t,n)=>{n.d(t,{i:()=>s});var r,i=n(12115),a=n(4129),o=(r||(r=n.t(i,2)))[" useInsertionEffect ".trim().toString()]||a.N;function s({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[a,s,l]=function({defaultProp:e,onChange:t}){let[n,r]=i.useState(e),a=i.useRef(n),s=i.useRef(t);return o(()=>{s.current=t},[t]),i.useEffect(()=>{a.current!==n&&(s.current?.(n),a.current=n)},[n,a]),[n,r,s]}({defaultProp:t,onChange:n}),u=void 0!==e,c=u?e:a;{let t=i.useRef(void 0!==e);i.useEffect(()=>{let e=t.current;if(e!==u){let t=u?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. 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=u},[u,r])}return[c,i.useCallback(t=>{if(u){let n="function"==typeof t?t(e):t;n!==e&&l.current?.(n)}else s(t)},[u,e,s,l])]}Symbol("RADIX:SYNC_STATE")},26068:(e,t,n)=>{n.d(t,{q:()=>r});function r(e,t){if(function(e){let t=e["~standard"];return null!=t&&"object"==typeof t&&"jsonSchema"in t&&null!=t.jsonSchema&&"object"==typeof t.jsonSchema&&"input"in t.jsonSchema&&"function"==typeof t.jsonSchema.input}(e))return e["~standard"].jsonSchema.input({target:"draft-07"});if("function"==typeof e.toJSONSchema)return e.toJSONSchema();let n=e["~standard"].vendor;if("zod"===n&&t?.zodToJsonSchema)return t.zodToJsonSchema(e,{$refStrategy:"none"});throw Error(`Cannot convert schema to JSON Schema. The schema (vendor: "${n}") does not implement Standard JSON Schema V1 and no zodToJsonSchema fallback is available. Use a library that supports Standard JSON Schema (e.g., Zod 3.24+, Valibot v1+, ArkType v2+) or pass a zodToJsonSchema function in options.`)}}
5,27012:(e,t,n)=>{n.d(t,{A:()=>eD});var r=n(5009),i=n(63758),a=n(3407),o=n(56522),s=n(95502);let l="phrasing",u=["autolink","link","image","label"];function c(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function d(e){this.config.enter.autolinkProtocol.call(this,e)}function h(e){this.config.exit.autolinkProtocol.call(this,e)}function p(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];(0,i.ok)("link"===t.type),t.url="http://"+this.sliceSerialize(e)}function f(e){this.config.exit.autolinkEmail.call(this,e)}function m(e){this.exit(e)}function g(e){!function(e,t,n){let r=(0,s.C)((n||{}).ignore||[]),i=function(e){let t=[];if(!Array.isArray(e))throw TypeError("Expected find and replace tuple or list of tuples");let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){var i;let e=n[r];t.push(["string"==typeof(i=e[0])?RegExp(function(e){if("string"!=typeof e)throw TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(i),"g"):i,function(e){return"function"==typeof e?e:function(){return e}}(e[1])])}return t}(t),a=-1;for(;++a<i.length;)(0,o.VG)(e,"text",l);function l(e,t){let n,o=-1;for(;++o<t.length;){let e=t[o],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,l=n.children.indexOf(e),u=!1,c=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if("string"==typeof a&&(a=a.length>0?{type:"text",value:a}:void 0),!1===a?r.lastIndex=n+1:(s!==n&&c.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(a)?c.push(...a):a&&c.push(a),s=n+d[0].length,u=!0),!r.global)break;d=r.exec(e.value)}return u?(s<e.value.length&&c.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...c)):c=[e],l+c.length}(e,t)}}(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,v],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,b]],{ignore:["link","linkReference"]})}function v(e,t,n,i,a){let o="";if(!y(a)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}(n)))return!1;let s=function(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")"),a=(0,r.D)(e,"("),o=(0,r.D)(e,")");for(;-1!==i&&a>o;)e+=n.slice(0,i+1),i=(n=n.slice(i+1)).indexOf(")"),o++;return[e,n]}(n+i);if(!s[0])return!1;let l={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[l,{type:"text",value:s[1]}]:l}function b(e,t,n,r){return!(!y(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function y(e,t){let n=e.input.charCodeAt(e.index-1);return(0===e.index||(0,a.Ny)(n)||(0,a.es)(n))&&(!t||47!==n)}var E=n(35983);function T(){this.buffer()}function k(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function _(){this.buffer()}function A(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function x(e){let t=this.resume(),n=this.stack[this.stack.length-1];(0,i.ok)("footnoteReference"===n.type),n.identifier=(0,E.B)(this.sliceSerialize(e)).toLowerCase(),n.label=t}function w(e){this.exit(e)}function S(e){let t=this.resume(),n=this.stack[this.stack.length-1];(0,i.ok)("footnoteDefinition"===n.type),n.identifier=(0,E.B)(this.sliceSerialize(e)).toLowerCase(),n.label=t}function C(e){this.exit(e)}function I(e,t,n,r){let i=n.createTracker(r),a=i.move("[^"),o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),o(),a+=i.move("]")}function N(e,t,n){return 0===t?e:O(e,t,n)}function O(e,t,n){return(n?"":"    ")+e}I.peek=function(){return"["};let R=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function D(e){this.enter({type:"delete",children:[]},e)}function L(e){this.exit(e)}function P(e,t,n,r){let i=n.createTracker(r),a=n.enter("strikethrough"),o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function M(e){return e.length}function F(e){let t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:114*(82===t||114===t)}P.peek=function(){return"~"};n(95578);var B=n(23362);n(95139);n(84151);function j(e,t,n){let r=e.value||"",i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){let e,t=n.unsafe[a],i=n.compilePattern(t);if(t.atBreak)for(;e=i.exec(r);){let t=e.index;10===r.charCodeAt(t)&&13===r.charCodeAt(t-1)&&t--,r=r.slice(0,t)+" "+r.slice(e.index+1)}}return i+r+i}j.peek=function(){return"`"};(0,s.C)(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let U={inlineCode:j,listItem:function(e,t,n,r){let i=function(e){let t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n),a=n.bulletCurrent||function(e){let t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}(n);t&&"list"===t.type&&t.ordered&&(a=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+a);let o=a.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(o=4*Math.ceil(o/4));let s=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);let l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){return t?(n?"":" ".repeat(o))+e:(n?a:a+" ".repeat(o-a.length))+e});return l(),u}};function H(e){let t=e._align;(0,i.ok)(t,"expected `_align` on table"),this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function $(e){this.exit(e),this.data.inTable=void 0}function z(e){this.enter({type:"tableRow",children:[]},e)}function G(e){this.exit(e)}function Y(e){this.enter({type:"tableCell",children:[]},e)}function q(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,V));let n=this.stack[this.stack.length-1];(0,i.ok)("inlineCode"===n.type),n.value=t,this.exit(e)}function V(e,t){return"|"===t?t:e}function W(e){let t=this.stack[this.stack.length-2];(0,i.ok)("listItem"===t.type),t.checked="taskListCheckValueChecked"===e.type}function K(e){let t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){let e=this.stack[this.stack.length-1];(0,i.ok)("paragraph"===e.type);let n=e.children[0];if(n&&"text"===n.type){let r,i=t.children,a=-1;for(;++a<i.length;){let e=i[a];if("paragraph"===e.type){r=e;break}}r===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 Z(e,t,n,r){let i=e.children[0],a="boolean"==typeof e.checked&&i&&"paragraph"===i.type,o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let l=U.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+o})),l}var X=n(38220);let Q={tokenize:function(e,t,n){let r=0;return function t(a){return(87===a||119===a)&&r<3?(r++,e.consume(a),t):46===a&&3===r?(e.consume(a),i):n(a)};function i(e){return null===e?n(e):t(e)}},partial:!0},J={tokenize:function(e,t,n){let r,i,o;return s;function s(t){return 46===t||95===t?e.check(et,u,l)(t):null===t||(0,a.Ee)(t)||(0,a.Ny)(t)||45!==t&&(0,a.es)(t)?u(t):(o=!0,e.consume(t),s)}function l(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),s}function u(e){return i||r||!o?n(e):t(e)}},partial:!0},ee={tokenize:function(e,t){let n=0,r=0;return i;function i(s){return 40===s?(n++,e.consume(s),i):41===s&&r<n?o(s):33===s||34===s||38===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||60===s||63===s||93===s||95===s||126===s?e.check(et,t,o)(s):null===s||(0,a.Ee)(s)||(0,a.Ny)(s)?t(s):(e.consume(s),i)}function o(t){return 41===t&&r++,e.consume(t),i}},partial:!0},et={tokenize:function(e,t,n){return r;function r(s){return 33===s||34===s||39===s||41===s||42===s||44===s||46===s||58===s||59===s||63===s||95===s||126===s?(e.consume(s),r):38===s?(e.consume(s),o):93===s?(e.consume(s),i):60===s||null===s||(0,a.Ee)(s)||(0,a.Ny)(s)?t(s):n(s)}function i(e){return null===e||40===e||91===e||(0,a.Ee)(e)||(0,a.Ny)(e)?t(e):r(e)}function o(t){return(0,a.CW)(t)?function t(i){return 59===i?(e.consume(i),r):(0,a.CW)(i)?(e.consume(i),t):n(i)}(t):n(t)}},partial:!0},en={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return(0,a.lV)(e)?n(e):t(e)}},partial:!0},er={name:"wwwAutolink",tokenize:function(e,t,n){let r=this;return function(t){return 87!==t&&119!==t||!el.call(r,r.previous)||eh(r.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Q,e.attempt(J,e.attempt(ee,i),n),n)(t))};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:el},ei={name:"protocolAutolink",tokenize:function(e,t,n){let r=this,i="",o=!1;return function(t){return(72===t||104===t)&&eu.call(r,r.previous)&&!eh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),s):n(t)};function s(t){if((0,a.CW)(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(58===t){let n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),l}return n(t)}function l(t){return 47===t?(e.consume(t),o)?u:(o=!0,l):n(t)}function u(t){return null===t||(0,a.JQ)(t)||(0,a.Ee)(t)||(0,a.Ny)(t)||(0,a.es)(t)?n(t):e.attempt(J,e.attempt(ee,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:eu},ea={name:"emailAutolink",tokenize:function(e,t,n){let r,i,o=this;return function(t){return!ed(t)||!ec.call(o,o.previous)||eh(o.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return ed(r)?(e.consume(r),t):64===r?(e.consume(r),s):n(r)}(t))};function s(t){return 46===t?e.check(en,u,l)(t):45===t||95===t||(0,a.lV)(t)?(i=!0,e.consume(t),s):u(t)}function l(t){return e.consume(t),r=!0,s}function u(s){return i&&r&&(0,a.CW)(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(s)):n(s)}},previous:ec},eo={},es=48;for(;es<123;)eo[es]=ea,58==++es?es=65:91===es&&(es=97);function el(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||(0,a.Ee)(e)}function eu(e){return!(0,a.CW)(e)}function ec(e){return!(47===e||ed(e))}function ed(e){return 43===e||45===e||46===e||95===e||(0,a.lV)(e)}function eh(e){let t=e.length,n=!1;for(;t--;){let 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}eo[43]=ea,eo[45]=ea,eo[46]=ea,eo[95]=ea,eo[72]=[ea,ei],eo[104]=[ea,ei],eo[87]=[ea,er],eo[119]=[ea,er];var ep=n(33634),ef=n(79168);let em={tokenize:function(e,t,n){let r=this;return(0,ef.N)(e,function(e){let i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function eg(e,t,n){let r,i=this,a=i.events.length,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;a--;){let e=i.events[a][1];if("labelImage"===e.type){r=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}
5return function(a){if(!r||!r._balanced)return n(a);let s=(0,E.B)(i.sliceSerialize({start:r.end,end:i.now()}));return 94===s.codePointAt(0)&&o.includes(s.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(a),e.exit("gfmFootnoteCallLabelMarker"),t(a)):n(a)}}function ev(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";let r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function eb(e,t,n){let r,i=this,o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),s=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),l};function l(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(l){if(s>999||93===l&&!r||null===l||91===l||(0,a.Ee)(l))return n(l);if(93===l){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return o.includes((0,E.B)(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(l)}return(0,a.Ee)(l)||(r=!0),s++,e.consume(l),92===l?c:u}function c(t){return 91===t||92===t||93===t?(e.consume(t),s++,u):u(t)}}function ey(e,t,n){let r,i,o=this,s=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]),l=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),u};function u(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(l>999||93===t&&!i||null===t||91===t||(0,a.Ee)(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=(0,E.B)(o.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return(0,a.Ee)(t)||(i=!0),l++,e.consume(t),92===t?d:c}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,c):c(t)}function h(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),s.includes(r)||s.push(r),(0,ef.N)(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function eE(e,t,n){return e.check(ep.B,t,e.attempt(em,t,n))}function eT(e){e.exit("gfmFootnoteDefinition")}var ek=n(17032),e_=n(41006);class eA{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0!==n||0!==r.length){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=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,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(let t of r)e.push(t);r=n.pop()}this.map.length=0}}function ex(e,t,n){let r,i=this,o=0,s=0;return function(e){let t=i.events.length-1;for(;t>-1;){let e=i.events[t][1].type;if("lineEnding"===e||"linePrefix"===e)t--;else break}let r=t>-1?i.events[t][1].type:null,a="tableHead"===r||"tableRow"===r?y:l;return a===y&&i.parser.lazy[i.now().line]?n(e):a(e)};function l(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,s+=1),u(n)}function u(t){return null===t?n(t):(0,a.HP)(t)?s>1?(s=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h):n(t):(0,a.On)(t)?(0,ef.N)(e,u,"whitespace")(t):(s+=1,r&&(r=!1,o+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,u):(e.enter("data"),c(t))}function c(t){return null===t||124===t||(0,a.Ee)(t)?(e.exit("data"),u(t)):(e.consume(t),92===t?d:c)}function d(t){return 92===t||124===t?(e.consume(t),c):c(t)}function h(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,(0,a.On)(t))?(0,ef.N)(e,p,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t)}function p(t){return 45===t||58===t?m(t):124===t?(r=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):n(t)}function f(t){return(0,a.On)(t)?(0,ef.N)(e,m,"whitespace")(t):m(t)}function m(t){return 58===t?(s+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),g):45===t?(s+=1,g(t)):null===t||(0,a.HP)(t)?b(t):n(t)}function g(t){return 45===t?(e.enter("tableDelimiterFiller"),function t(n){return 45===n?(e.consume(n),t):58===n?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(n),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(n))}(t)):n(t)}function v(t){return(0,a.On)(t)?(0,ef.N)(e,b,"whitespace")(t):b(t)}
5function b(i){if(124===i)return p(i);if(null===i||(0,a.HP)(i))return r&&o===s?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(i)):n(i);return n(i)}function y(t){return e.enter("tableRow"),E(t)}function E(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),E):null===n||(0,a.HP)(n)?(e.exit("tableRow"),t(n)):(0,a.On)(n)?(0,ef.N)(e,E,"whitespace")(n):(e.enter("data"),T(n))}function T(t){return null===t||124===t||(0,a.Ee)(t)?(e.exit("data"),E(t)):(e.consume(t),92===t?k:T)}function k(t){return 92===t||124===t?(e.consume(t),T):T(t)}}function ew(e,t){let n,r,i,a=-1,o=!0,s=0,l=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,h=new eA;for(;++a<e.length;){let p=e[a],f=p[1];"enter"===p[0]?"tableHead"===f.type?(c=!1,0!==d&&(eC(h,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(a,0,[["enter",n,t]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(o=!0,i=void 0,l=[0,0,0,0],u=[0,a+1,0,0],c&&(c=!1,r={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(a,0,[["enter",r,t]])),s="tableDelimiterRow"===f.type?2:r?3:1):s&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)?(o=!1,0===u[2]&&(0!==l[1]&&(u[0]=u[1],i=eS(h,t,l,s,void 0,i),l=[0,0,0,0]),u[2]=a)):"tableCellDivider"===f.type&&(o?o=!1:(0!==l[1]&&(u[0]=u[1],i=eS(h,t,l,s,void 0,i)),u=[(l=u)[1],a,0,0])):"tableHead"===f.type?(c=!0,d=a):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=a,0!==l[1]?(u[0]=u[1],i=eS(h,t,l,s,a,i)):0!==u[1]&&(i=eS(h,t,u,s,a,i)),s=0):s&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)&&(u[3]=a)}for(0!==d&&eC(h,t,d,n,r),h.consume(t.events),a=-1;++a<t.events.length;){let e=t.events[a];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=function(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){let e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}(t.events,a))}return e}function eS(e,t,n,r,i,a){0!==n[0]&&(a.end=Object.assign({},eI(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));let o=eI(t.events,n[1]);if(a={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},o),end:Object.assign({},o)},e.add(n[1],0,[["enter",a,t]]),0!==n[2]){let i=eI(t.events,n[2]),a=eI(t.events,n[3]),o={type:"tableContent",start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[["enter",o,t]]),2!==r){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",o,t]])}return void 0!==i&&(a.end=Object.assign({},eI(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function eC(e,t,n,r,i){let a=[],o=eI(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function eI(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let eN={name:"tasklistCheck",tokenize:function(e,t,n){let r=this;return function(t){return null===r.previous&&r._gfmTasklistFirstContentOfListItem?(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i):n(t)};function i(t){return(0,a.Ee)(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"),s):n(t)}function s(r){return(0,a.HP)(r)?t(r):(0,a.On)(r)?e.check({tokenize:eO},t,n)(r):n(r)}}};function eO(e,t,n){return(0,ef.N)(e,function(e){return null===e?n(e):t(e)},"whitespace")}let eR={};function eD(e){let t,n=e||eR,r=this.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push((0,X.y)([{text:eo}
5,{document:{91:{name:"gfmFootnoteDefinition",tokenize:ey,continuation:{tokenize:eE},exit:eT}},text:{91:{name:"gfmFootnoteCall",tokenize:eb},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:eg,resolveTo:ev}}},function(e){let t=(e||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let i=this.previous,a=this.events,o=0;return function(s){return 126===i&&"characterEscape"!==a[a.length-1][1].type?r(s):(e.enter("strikethroughSequenceTemporary"),function a(s){let l=(0,B.S)(i);if(126===s)return o>1?r(s):(e.consume(s),o++,a);if(o<2&&!t)return r(s);let u=e.exit("strikethroughSequenceTemporary"),c=(0,B.S)(s);return u._open=!c||2===c&&!!l,u._close=!l||2===l&&!!c,n(s)}(s))}},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";let i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],s=t.parser.constructs.insideSpan.null;s&&(0,ek.m)(o,o.length,0,(0,e_.W)(s,e.slice(r+1,n),t)),(0,ek.m)(o,o.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),(0,ek.m)(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++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]}}}(n),{flow:{null:{name:"table",tokenize:ex,resolveAll:ew}}},{text:{91:eN}}])),a.push([{transforms:[g],enter:{literalAutolink:c,literalAutolinkEmail:d,literalAutolinkHttp:d,literalAutolinkWww:d},exit:{literalAutolink:m,literalAutolinkEmail:f,literalAutolinkHttp:h,literalAutolinkWww:p}},{enter:{gfmFootnoteCallString:T,gfmFootnoteCall:k,gfmFootnoteDefinitionLabelString:_,gfmFootnoteDefinition:A},exit:{gfmFootnoteCallString:x,gfmFootnoteCall:w,gfmFootnoteDefinitionLabelString:S,gfmFootnoteDefinition:C}},{canContainEols:["delete"],enter:{strikethrough:D},exit:{strikethrough:L}},{enter:{table:H,tableData:Y,tableHeader:Y,tableRow:z},exit:{codeText:q,table:$,tableData:G,tableHeader:G,tableRow:G}},{exit:{taskListCheckValueChecked:W,taskListCheckValueUnchecked:W,paragraph:K}}]),o.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:l,notInConstruct:u},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:l,notInConstruct:u},{character:":",before:"[ps]",after:"\\/",inConstruct:l,notInConstruct:u}]},(t=!1,n&&n.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,i){let a=r.createTracker(i),o=a.move("[^"),s=r.enter("footnoteDefinition"),l=r.enter("label");return o+=a.move(r.safe(r.associationId(e),{before:o,after:"]"})),l(),o+=a.move("]:"),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,a.current()),t?O:N))),s(),o},footnoteReference:I},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:R}],handlers:{delete:P}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=U.inlineCode(e,t,n);return n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&")),r},table:function(e,t,n,r){return s(function(e,t,n){let r=e.children,i=-1,a=[],o=t.enter("table");for(;++i<r.length;)a[i]=l(r[i],t,n);return o(),a}(e,n,r),e.align)},tableCell:o,tableRow:function(e,t,n,r){let i=s([l(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function o(e,t,n,r){let i=n.enter("tableCell"),o=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function s(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||M,a=[],o=[],s=[],l=[],u=0,c=-1;for(;++c<e.length;){let t=[],r=[],a=-1;for(e[c].length>u&&(u=e[c].length);++a<e[c].length;){var d;let o=null==(d=e[c][a])?"":String(d);if(!1!==n.alignDelimiters){let e=i(o);r[a]=e,(void 0===l[a]||e>l[a])&&(l[a]=e)}t.push(o)}o[c]=t,s[c]=r}let h=-1;if("object"==typeof r&&"length"in r)for(;
5++h<u;)a[h]=F(r[h]);else{let e=F(r);for(;++h<u;)a[h]=e}h=-1;let p=[],f=[];for(;++h<u;){let e=a[h],t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,l[h]-t.length-r.length),o=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&((i=t.length+i+r.length)>l[h]&&(l[h]=i),f[h]=i),p[h]=o}o.splice(1,0,p),s.splice(1,0,f),c=-1;let m=[];for(;++c<o.length;){let e=o[c],t=s[c];h=-1;let r=[];for(;++h<u;){let i=e[h]||"",o="",s="";if(!1!==n.alignDelimiters){let e=l[h]-(t[h]||0),n=a[h];114===n?o=" ".repeat(e):99===n?e%2?(o=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):s=o=" ".repeat(e/2):s=" ".repeat(e)}!1===n.delimiterStart||h||r.push("|"),!1!==n.padding&&(!1!==n.alignDelimiters||""!==i)&&(!1!==n.delimiterStart||h)&&r.push(" "),!1!==n.alignDelimiters&&r.push(o),r.push(i),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||h!==u-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:i})}function l(e,t,n){let r=e.children,i=-1,a=[],s=t.enter("tableRow");for(;++i<r.length;)a[i]=o(r[i],e,t,n);return s(),a}}(n),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Z}}]})}},27201:(e,t,n)=>{n.d(t,{kZ:()=>r});function r(e){let t=e??null,n="expired"!==t&&"invalid"!==t;return{status:t,license:null,checkFeature:()=>n,getLimit:()=>null}}},28400:(e,t,n)=>{n.d(t,{_:()=>i});var r=n(71450);function i(e,t,n,r,i){return new a(e,t,n,r,i)}var a=function(e){function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return(0,r.C6)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),n||null==(t=this.onFinalize)||t.call(this)}},t}(n(28786).vU)},28775:(e,t,n)=>{n.d(t,{_:()=>a});var r=n(47948),i=n(28786);function a(e,t){var n="object"==typeof t;return new Promise(function(a,o){var s=new i.Ms({next:function(e){a(e),s.unsubscribe()},error:o,complete:function(){n?a(t.defaultValue):o(new r.G)}});e.subscribe(s)})}},28786:(e,t,n)=>{n.d(t,{Ms:()=>v,vU:()=>p});var r=n(71450),i=n(39097),a=n(41449),o=n(29846),s=n(55180),l=n(34793),u=c("C",void 0,void 0);function c(e,t,n){return{kind:e,value:t,error:n}}var d=n(14192),h=n(75968),p=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,(0,a.Uv)(t)&&t.add(n)):n.destination=E,n}return(0,r.C6)(t,e),t.create=function(e,t,n){return new v(e,t,n)},t.prototype.next=function(e){this.isStopped?y(c("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?y(c("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?y(u,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(a.yU),f=Function.prototype.bind;function m(e,t){return f.call(e,t)}var g=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){b(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){b(e)}else b(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){b(e)}},e}(),v=function(e){function t(t,n,r){var a,s,l=e.call(this)||this;return(0,i.T)(t)||!t?a={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:l&&o.$.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return l.unsubscribe()},a={next:t.next&&m(t.next,s),error:t.error&&m(t.error,s),complete:t.complete&&m(t.complete,s)}):a=t,l.destination=new g(a),l}return(0,r.C6)(t,e),t}(p);function b(e){o.$.useDeprecatedSynchronousErrorHandling?(0,h.l)(e):(0,s.m)(e)}function y(e,t){var n=o.$.onStoppedNotification;n&&d.f.setTimeout(function(){return n(e,t)})}var E={closed:!0,next:l.l,error:function(e){throw e},complete:l.l}},29279:(e,t,n)=>{n.d(t,{M:()=>s});var r=n(39097),i=n(96948),a=n(28400),o=n(77163);function s(e,t,n){var s=(0,r.T)(e)||t||n?{next:e,error:t,complete:n}:e;return s?(0,i.N)(function(e,t){null==(n=s.subscribe)||n.call(s);var n,r=!0;e.subscribe((0,a._)(t,function(e){var n;null==(n=s.next)||n.call(s,e),t.next(e)},function(){var e;r=!1,null==(e=s.complete)||e.call(s),t.complete()},function(e){var n;r=!1,null==(n=s.error)||n.call(s,e),t.error(e)},function(){var e,t;r&&(null==(e=s.unsubscribe)||e.call(s)),null==(t=s.finalize)||t.call(s)}))}):o.D}},29396:(e,t,n)=>{n.d(t,{j:()=>i});var r=n(96948);function i(e){return(0,r.N)(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}}
5,29593:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},29699:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},29833:(e,t,n)=>{function r(e){if(e)throw e}n.d(t,{l:()=>d});var i=n(70011),a=n(63758);function o(e){if("object"!=typeof e||null===e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var s=n(68681);let l=function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},u={}.hasOwnProperty;class c extends l{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=function(){let e=[],t={run:function(...t){let n=-1,r=t.pop();if("function"!=typeof r)throw TypeError("Expected function as last argument, not "+r);!function i(a,...o){let s=e[++n],l=-1;if(a)return void r(a);for(;++l<t.length;)(null===o[l]||void 0===o[l])&&(o[l]=t[l]);t=o,s?(function(e,t){let n;return function(...t){let a,o=e.length>t.length;o&&t.push(r);try{a=e.apply(this,t)}catch(e){if(o&&n)throw e;return r(e)}o||(a&&a.then&&"function"==typeof a.then?a.then(i,r):a instanceof Error?r(a):i(a))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(s,i)(...o):r(null,...o)}(null,...t)},use:function(n){if("function"!=typeof n)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}()}copy(){let e=new c,t=-1;for(;++t<this.attachers.length;){let n=this.attachers[t];e.use(...n)}return e.data(i(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2==arguments.length?(f("data",this.frozen),this.namespace[e]=t,this):u.call(this.namespace,e)&&this.namespace[e]||void 0:e?(f("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;for(;++this.freezeIndex<this.attachers.length;){let[e,...t]=this.attachers[this.freezeIndex];if(!1===t[0])continue;!0===t[0]&&(t[0]=void 0);let n=e.call(this,...t);"function"==typeof n&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=v(e),n=this.parser||this.Parser;return h("parse",n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),h("process",this.parser||this.Parser),p("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let o=v(e),s=n.parse(o);function l(e,n){e||!n?i(e):r?r(n):((0,a.ok)(t,"`done` is defined if `resolve` is not"),t(void 0,n))}n.run(s,o,function(e,t,r){var i,a;if(e||!t||!r)return l(e);let o=n.stringify(t,r);"string"==typeof(i=o)||(a=i)&&"object"==typeof a&&"byteLength"in a&&"byteOffset"in a?r.value=o:r.result=o,l(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),h("processSync",this.parser||this.Parser),p("processSync",this.compiler||this.Compiler),this.process(e,function(e,i){n=!0,r(e),t=i}),g("processSync","process",n),(0,a.ok)(t,"we either bailed on an error or have a tree"),t}run(e,t,n){m(e),this.freeze();let r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,o){(0,a.ok)("function"!=typeof t,"`file` can’t be a `done` anymore, we checked");let s=v(t);r.run(e,s,function(t,r,s){let l=r||e;t?o(t):i?i(l):((0,a.ok)(n,"`done` is defined if `resolve` is not"),n(void 0,l,s))})}}runSync(e,t){let n,i=!1;return this.run(e,t,function(e,t){r(e),n=t,i=!0}),g("runSync","run",i),(0,a.ok)(n,"we either bailed on an error or have a tree"),n}stringify(e,t){this.freeze();let n=v(t),r=this.compiler||this.Compiler;return p("stringify",r),m(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(f("use",this.frozen),null==e);else if("function"==typeof e)l(e,t);else if("object"==typeof e)Array.isArray(e)?s(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function a(e){if(!("plugins"in e)&&!("settings"in e))throw 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");s(e.plugins),e.settings&&(r.settings=i(!0,r.settings,e.settings))}function s(e){let t=-1;if(null==e);else if(Array.isArray(e))for(;++t<e.length;){var n=e[t];if("function"==typeof n)l(n,[]);else if("object"==typeof n)if(Array.isArray(n)){let[e,...t]=n;l(e,t)}else a(n);else throw TypeError("Expected usable value, not `"+n+"`")}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function l(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,...s]=t,l=n[a][1];o(l)&&o(r)&&(r=i(!0,l,r)),n[a]=[e,r,...s]}}}}let d=new c().freeze();function h(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `parser`")}function p(e,t){if("function"!=typeof t)throw TypeError("Cannot `"+e+"` without `compiler`")}function f(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function m(e){if(!o(e)||"string"!=typeof e.type)throw TypeError("Expected node, got `"+e+"`")}function g(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function v(e){var t;return(t=e)&&"object"==typeof t&&"message"in t&&"messages"in t?e:new s.T(e)}},29846:(e,t,n)=>{n.d(t,{$:()=>r});var r={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNext
5Context:!1}},31536:(e,t,n)=>{n.d(t,{B:()=>u});var r=n(71450),i=n(45037),a=n(41449),o=(0,n(10899).L)(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),s=n(12668),l=n(75968),u=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,r.C6)(t,e),t.prototype.lift=function(e){var t=new c(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new o},t.prototype.next=function(e){var t=this;(0,l.Y)(function(){var n,i;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var a=(0,r.Ju)(t.currentObservers),o=a.next();!o.done;o=a.next())o.value.next(e)}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;(0,l.Y)(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;(0,l.Y)(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this.hasError,r=this.isStopped,i=this.observers;return n||r?a.Kn:(this.currentObservers=null,i.push(e),new a.yU(function(){t.currentObservers=null,(0,s.o)(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,n=this.thrownError,r=this.isStopped;t?e.error(n):r&&e.complete()},t.prototype.asObservable=function(){var e=new i.c;return e.source=this,e},t.create=function(e,t){return new c(e,t)},t}(i.c),c=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return(0,r.C6)(t,e),t.prototype.next=function(e){var t,n;null==(n=null==(t=this.destination)?void 0:t.next)||n.call(t,e)},t.prototype.error=function(e){var t,n;null==(n=null==(t=this.destination)?void 0:t.error)||n.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!=(n=null==(t=this.source)?void 0:t.subscribe(e))?n:a.Kn},t}(u)},31590:(e,t,n)=>{n.d(t,{C:()=>a,U:()=>o});var r=n(71450),i=n(39097);function a(e){return(0,r.AQ)(this,arguments,function(){var t,n,i;return(0,r.YH)(this,function(a){switch(a.label){case 0:t=e.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,(0,r.N3)(t.read())];case 3:if(i=(n=a.sent()).value,!n.done)return[3,5];return[4,(0,r.N3)(void 0)];case 4:return[2,a.sent()];case 5:return[4,(0,r.N3)(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function o(e){return(0,i.T)(null==e?void 0:e.getReader)}},31734:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},32156:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},32466:(e,t,n)=>{n.d(t,{h:()=>l});var r=n(81933),i=n(8286),a=n(47211),o=n(95868),s=n(78842);function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(0,o.lI)(e),l=(0,o.R0)(e,1/0);return e.length?1===e.length?(0,i.Tg)(e[0]):(0,r.U)(l)((0,s.H)(e,n)):a.w}},32467:(e,t,n)=>{n.d(t,{DX:()=>s,Dc:()=>u,TL:()=>o,bL:()=>s});var r,i=n(12115),a=n(94446);function o(e){let t=i.forwardRef((t,n)=>{var r;let o,s,{children:u,...d}=t,g=null,v=!1,b=[];
5h(u)&&"function"==typeof m&&(u=m(u._payload)),i.Children.forEach(u,e=>{var t;if(t=e,i.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===l){v=!0;let t="child"in e.props?e.props.child:e.props.children;h(t)&&"function"==typeof m&&(t=m(t._payload)),g=c(e,t),b.push(g?.props?.children)}else b.push(e)}),g?g=i.cloneElement(g,void 0,b):!v&&1===i.Children.count(u)&&i.isValidElement(u)&&(g=u);let y=g?(r=g,(s=(o=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?r.ref:(s=(o=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in o&&o.isReactWarning)?r.props.ref:r.props.ref||r.ref):void 0,E=(0,a.s)(n,y);if(!g){if(u||0===u)throw Error(v?f(e):p(e));return u}let T=function(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):"style"===r?n[r]={...i,...a}:"className"===r&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}(d,g.props??{});return g.type!==i.Fragment&&(T.ref=n?E:y),i.cloneElement(g,T)});return t.displayName=`${e}.Slot`,t}var s=o("Slot"),l=Symbol.for("radix.slottable");function u(e){let t=e=>"child"in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=l,t}var c=(e,t)=>{if("child"in e.props){let t=e.props.child;return i.isValidElement(t)?i.cloneElement(t,void 0,e.props.children(t.props.children)):null}return i.isValidElement(t)?t:null},d=Symbol.for("react.lazy");function h(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===d&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var p=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,f=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,m=(r||(r=n.t(i,2)))[" use ".trim().toString()]},32973:(e,t,n)=>{n.d(t,{OA:()=>r,WL:()=>a,u$:()=>i});let r={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},i=e=>(...t)=>({_$litDirective$:e,values:t});class a{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,n){this._$Ct=e,this._$AM=t,this._$Ci=n}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}},33421:(e,t,n)=>{n.d(t,{R:()=>s});var r=n(71450),i=function(e){function t(t,n){return e.call(this)||this}return(0,r.C6)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(n(41449).yU),a={setInterval:function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=a.delegate;return(null==o?void 0:o.setInterval)?o.setInterval.apply(o,(0,r.fX)([e,t],(0,r.zs)(n))):setInterval.apply(void 0,(0,r.fX)([e,t],(0,r.zs)(n)))},clearInterval:function(e){var t=a.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},o=n(12668),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return(0,r.C6)(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n,r=this.id,i=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(i,r,t)),this.pending=!0,this.delay=t,this.id=null!=(n=this.id)?n:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),a.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;null!=t&&a.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=e||Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,o.o)(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(i)},33634:(e,t,n)=>{n.d(t,{B:()=>a});var r=n(79168),i=n(3407);let a={partial:!0,tokenize:function(e,t,n){return function(t){return(0,i.On)(t)?(0,r.N)(e,a,"linePrefix")(t):a(t)};function a(e){return null===e||(0,i.HP)(e)?t(e):n(e)}}}},33859:(e,t,n)=>{let r;n.d(t,{A:()=>s});let i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},a=new Uint8Array(16);var o=n(48765);let s=function(e,t,n){if(i.randomUUID&&!t&&!e)return i.randomUUID();let s=(e=e||{}).random??e.rng?.()??function(){if(!r){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(a)}();if(s.length<16)throw Error("Random bytes length must be >= 16");if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=s[e];return t}return(0,o.k)(s)}}
5,34098:(e,t,n)=>{n.d(t,{t:()=>a});var r=n(37305),i=n(77241);function a(e,t,n){var a,o,s,l,u=!1;return e&&"object"==typeof e?(l=void 0===(a=e.bufferSize)?1/0:a,t=void 0===(o=e.windowTime)?1/0:o,u=void 0!==(s=e.refCount)&&s,n=e.scheduler):l=null!=e?e:1/0,(0,i.u)({connector:function(){return new r.m(l,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}},34793:(e,t,n)=>{n.d(t,{l:()=>r});function r(){}},35239:(e,t,n)=>{n.d(t,{H:()=>ee});var r={};n.r(r),n.d(r,{boolean:()=>v,booleanish:()=>b,commaOrSpaceSeparated:()=>_,commaSeparated:()=>k,number:()=>E,overloadedBoolean:()=>y,spaceSeparated:()=>T});var i=n(52371),a=n(63758);let o=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,l={};function u(e,t){return((t||l).jsx?s:o).test(e)}let c=/[ \t\n\f\r]/g;function d(e){return""===e.replace(c,"")}class h{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function p(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new h(n,r,t)}function f(e){return e.toLowerCase()}h.prototype.normal={},h.prototype.property={},h.prototype.space=void 0;class m{constructor(e,t){this.attribute=t,this.property=e}}m.prototype.attribute="",m.prototype.booleanish=!1,m.prototype.boolean=!1,m.prototype.commaOrSpaceSeparated=!1,m.prototype.commaSeparated=!1,m.prototype.defined=!1,m.prototype.mustUseProperty=!1,m.prototype.number=!1,m.prototype.overloadedBoolean=!1,m.prototype.property="",m.prototype.spaceSeparated=!1,m.prototype.space=void 0;let g=0,v=A(),b=A(),y=A(),E=A(),T=A(),k=A(),_=A();function A(){return 2**++g}let x=Object.keys(r);class w extends m{constructor(e,t,n,i){let a=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",i),"number"==typeof n)for(;++a<x.length;){let e=x[a];!function(e,t,n){n&&(e[t]=n)}(this,x[a],(n&r[e])===r[e])}}}function S(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new w(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[f(r)]=r,n[f(a.attribute)]=r}return new h(t,n,e.space)}w.prototype.defined=!0;let C=S({properties:{ariaActiveDescendant:null,ariaAtomic:b,ariaAutoComplete:null,ariaBusy:b,ariaChecked:b,ariaColCount:E,ariaColIndex:E,ariaColSpan:E,ariaControls:T,ariaCurrent:null,ariaDescribedBy:T,ariaDetails:null,ariaDisabled:b,ariaDropEffect:T,ariaErrorMessage:null,ariaExpanded:b,ariaFlowTo:T,ariaGrabbed:b,ariaHasPopup:null,ariaHidden:b,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:T,ariaLevel:E,ariaLive:null,ariaModal:b,ariaMultiLine:b,ariaMultiSelectable:b,ariaOrientation:null,ariaOwns:T,ariaPlaceholder:null,ariaPosInSet:E,ariaPressed:b,ariaReadOnly:b,ariaRelevant:null,ariaRequired:b,ariaRoleDescription:T,ariaRowCount:E,ariaRowIndex:E,ariaRowSpan:E,ariaSelected:b,ariaSetSize:E,ariaSort:null,ariaValueMax:E,ariaValueMin:E,ariaValueNow:E,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function I(e,t){return t in e?e[t]:t}function N(e,t){return I(e,t.toLowerCase())}let O=S({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:k,acceptCharset:T,accessKey:T,action:null,allow:null,allowFullScreen:v,allowPaymentRequest:v,allowUserMedia:v,alt:null,as:null,async:v,autoCapitalize:null,autoComplete:T,autoFocus:v,autoPlay:v,blocking:T,capture:null,charSet:null,checked:v,cite:null,className:T,cols:E,colSpan:null,content:null,contentEditable:b,controls:v,controlsList:T,coords:E|k,crossOrigin:null,data:null,dateTime:null,decoding:null,default:v,defer:v,dir:null,dirName:null,disabled:v,download:y,draggable:b,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:v,formTarget:null,headers:T,height:E,hidden:y,high:E,href:null,hrefLang:null,htmlFor:T,httpEquiv:T,id:null,imageSizes:null,imageSrcSet:null,inert:v,inputMode:null,integrity:null,is:null,isMap:v,itemId:null,itemProp:T,itemRef:T,itemScope:v,itemType:T,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:v,low:E,manifest:null,max:null,maxLength:E,media:null,method:null,min:null,minLength:E,multiple:v,muted:v,name:null,nonce:null,noModule:v,noValidate:v,onAbort:null,onAfterPrint:null,onAuxCl
5ick: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:v,optimum:E,pattern:null,ping:T,placeholder:null,playsInline:v,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:v,referrerPolicy:null,rel:T,required:v,reversed:v,rows:E,rowSpan:E,sandbox:T,scope:null,scoped:v,seamless:v,selected:v,shadowRootClonable:v,shadowRootDelegatesFocus:v,shadowRootMode:null,shape:null,size:E,sizes:null,slot:null,span:E,spellCheck:b,src:null,
5srcDoc:null,srcLang:null,srcSet:null,start:E,step:null,style:null,tabIndex:E,target:null,title:null,translate:null,type:null,typeMustMatch:v,useMap:null,value:b,width:E,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:T,axis:null,background:null,bgColor:null,border:E,borderColor:null,bottomMargin:E,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:v,declare:v,event:null,face:null,frame:null,frameBorder:null,hSpace:E,leftMargin:E,link:null,longDesc:null,lowSrc:null,marginHeight:E,marginWidth:E,noResize:v,noHref:v,noShade:v,noWrap:v,object:null,profile:null,prompt:null,rev:null,rightMargin:E,rules:null,scheme:null,scrolling:b,standby:null,summary:null,text:null,topMargin:E,valueType:null,version:null,vAlign:null,vLink:null,vSpace:E,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:v,disableRemotePlayback:v,prefix:null,property:null,results:E,security:null,unselectable:null},space:"html",transform:N}),R=S({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
5-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:_,accentHeight:E,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:E,amplitude:E,arabicForm:null,ascent:E,attributeName:null,attributeType:null,azimuth:E,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:E,by:null,calcMode:null,capHeight:E,className:T,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:E,diffuseConstant:E,direction:null,display:null,dur:null,divisor:E,dominantBaseline:null,download:v,dx:null,dy:null,edgeMode:null,editable:null,elevation:E,enableBackground:null,end:null,event:null,exponent:E,externalResourcesRequired:null,fill:null,fillOpacity:E,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:k,g2:k,glyphName:k,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:E,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:E,horizOriginX:E,horizOriginY:E,id:null,ideographic:E,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:E,k:E,k1:E,k2:E,k3:E,k4:E,kernelMatrix:_,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:E,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:E,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,on
5Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:E,overlineThickness:E,paintOrder:null,panose1:null,path:null,pathLength:E,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:T,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:E,pointsAtY:E,pointsAtZ:E,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:_,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:_,rev:_,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:_,requiredFeatures:_,requiredFonts:_,requiredFormats:_,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:E,specularExponent:E,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:E,strikethroughThickness:E,string:null,stroke:null,strokeDashArray:_,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:E,strokeOpacity:E,strokeWidth:null,style:null,surfaceScale:E,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:_,tabIndex:E,tableValues:null,target:null,targetX:E,targetY:E,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:_,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:E,underlineThickness:E,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:E,values:null,vAlphabetic:E,vMathematical:E,vectorEffect:null,vHanging:E,vIdeographic:E,version:null,vertAdvY:E,vertOriginX:E,vertOriginY:E,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:E,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:I}),D=S({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()}),L=S({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:N}),P=S({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),M=p([C,O,D,L,P],"html"),F=p([C,R,D,L,P],"svg"),B=/[A-Z]/g,j=/-[a-z]/g,U=/^data[-\w.:]+$/i;function H(e){return"-"+e.toLowerCase()}function $(e){return e.charAt(1).toUpperCase()}let z={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"};var G=n(59292),Y=n(54185),q=n(73545),V=n(18283);let W={}.hasOwnProperty,K=new Map,Z=/[A-Z]/g,X=new Set(["table","tbody","thead","tfoot","tr"]),Q=new Set(["td","th"]),J="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ee(e,t){var n,r,i,a;let o;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let s=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=s,r=t.jsxDEV,o=function(e,t,i,a){let o=Array.isArray(i.children),s=(0,q.PW)(e);return r(t,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:n,lineNumber:s?s.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");
5if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");i=t.jsx,a=t.jsxs,o=function(e,t,n,r){let o=Array.isArray(n.children)?a:i;return r?o(t,n,r):o(t,n)}}let l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:o,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?F:M,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},u=et(l,e,void 0);return u&&"string"!=typeof u?u:l.create(e,l.Fragment,{children:u||void 0},void 0)}function et(e,t,n){return"element"===t.type?function(e,t,n){let r=e.schema;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(e.schema=F),e.ancestors.push(t);let a=ea(e,t.tagName,!1),o=function(e,t){let n,r,a={};for(r in t.properties)if("children"!==r&&W.call(t.properties,r)){let o=function(e,t,n){let r=function(e,t){let n=f(t),r=t,i=m;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&U.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(j,$);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!j.test(e)){let n=e.replace(B,H);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=w}return new i(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?(0,i.A)(n):(0,G.A)(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return Y(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new V.o("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=J+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)W.call(e,t)&&(n[function(e){let t=e.replace(Z,es);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?z[r.property]||r.property:r.attribute,n]}}(e,r,t.properties[r]);if(o){let[r,i]=o;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof i&&Q.has(t.tagName)?n=i:a[r]=i}}return n&&((a.style||(a.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),a}(e,t),s=ei(e,t);return X.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof e?"text"===e.type&&d(e.value):d(e))})),en(e,o,a,t),er(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return(0,a.ok)("ExpressionStatement"===n.type),e.evaluater.evaluateExpression(n.expression)}eo(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){let r=e.schema;"svg"===t.name&&"html"===r.space&&(e.schema=F),e.ancestors.push(t);let i=null===t.name?e.Fragment:ea(e,t.name,!0),o=function(e,t){let n={};for(let r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];(0,a.ok)("ExpressionStatement"===t.type);let i=t.expression;(0,a.ok)("ObjectExpression"===i.type);let o=i.properties[0];(0,a.ok)("SpreadElement"===o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else eo(e,t.position);else{let i,o=r.name;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];(0,a.ok)("ExpressionStatement"===t.type),i=e.evaluater.evaluateExpression(t.expression)}else eo(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=ei(e,t);return en(e,o,i,t),er(o,s),e.ancestors.pop(),e.schema=r,e.create(t,i,o,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);eo(e,t.position)}(e,t):"root"===t.type?function(e,t,n){let r={};return er(r,ei(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?t.value:void 0}function en(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function er(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ei(e,t){let n=[],r=-1,i=e.passKeys?new Map:K;for(;++r<t.children.length;){let a,o=t.children[r];if(e.passKeys){let e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){let t=i.get(e)||0;a=e+"-"+t,i.set(e,t+1)}}let s=et(e,o,a);void 0!==s&&n.push(s)}return n}function ea(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),i=-1;for(;++i<n.length;){let t=u(n[i])?{type:"Identifier",name:n[i]}:{type:"Literal",value:n[i]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(i&&"Literal"===t.type),optional:!1}:t}(0,a.ok)(e,"always a result"),r=e}else r=u(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){let t=r.value;return W.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);eo(e)}function eo(e,t){let n=new V.o("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=J+"#cannot-handle-mdx-estrees-without-createevaluater",n}function es(e){return"-"+e.toLowerCase()}}
5,35623:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},35983:(e,t,n)=>{n.d(t,{B:()=>r});function r(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}},36142:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},37305:(e,t,n)=>{n.d(t,{m:()=>o});var r=n(71450),i=n(31536),a=n(91239),o=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=a.U);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return(0,r.C6)(t,e),t.prototype.next=function(t){var n=this.isStopped,r=this._buffer,i=this._infiniteTimeWindow,a=this._timestampProvider,o=this._windowTime;!n&&(r.push(t),i||r.push(a.now()+o)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!e.closed;i+=n?1:2)e.next(r[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,n=this._buffer,r=this._infiniteTimeWindow,i=(r?1:2)*e;if(e<1/0&&i<n.length&&n.splice(0,n.length-i),!r){for(var a=t.now(),o=0,s=1;s<n.length&&n[s]<=a;s+=2)o=s;o&&n.splice(0,o+1)}},t}(i.B)},38139:(e,t,n)=>{n.d(t,{kM:()=>y,ss:()=>I});var r=n(51532);let i=e=>(0,r.iz)(e),a={bg:"oklch(1 0 0)",fg:"oklch(0.145 0 0)",surface:"oklch(1 0 0)","surface-fg":"oklch(0.145 0 0)",muted:"oklch(0.97 0 0)","muted-fg":"oklch(0.556 0 0)",accent:"oklch(0.97 0 0)","accent-fg":"oklch(0.205 0 0)",primary:"oklch(0.205 0 0)","primary-fg":"oklch(0.985 0 0)",danger:"oklch(0.577 0.245 27.325)",border:"oklch(0.922 0 0)",ring:"oklch(0.708 0 0)",radius:"0.625rem"},o=(0,r.AH)`
6  :host {
7    /* Re-pin inheritable properties to close inheritance leaks from hostile
8       host CSS. These are the only properties that cross the shadow boundary
9       via inheritance, so we hard-set them at the root. */
10    all: initial;
11    display: block;
12    height: 100%;
13    box-sizing: border-box;
14    font-family: var(
15      --cpk-drawer-font-family,
16      ui-sans-serif,
17      system-ui,
18      sans-serif
19    );
20    font-size: var(--cpk-drawer-font-size, 14px);
21    line-height: var(--cpk-drawer-line-height, 1.4);
22    color: var(--cpk-drawer-fg, var(--foreground, ${i(a.fg)}));
23
24    /* Three-level token resolution, highest priority first:
25       1. explicit per-token override (--cpk-drawer-*),
26       2. the host app's theme variable (--background/--card/… — the standard
27          react-core/shadcn names), so the drawer follows the host's light/dark
28          theme by inheritance (custom properties are NOT reset by all:initial),
29       3. the built-in light default derived from react-core at build time, so a
30          host with no theme still renders correctly (self-contained). */
31    --_bg: var(--cpk-drawer-bg, var(--background, ${i(a.bg)}));
32    --_surface: var(--cpk-drawer-surface, var(--card, ${i(a.surface)}));
33    --_surface-fg: var(
34      --cpk-drawer-surface-fg,
35      var(--card-foreground, ${i(a["surface-fg"])})
36    );
37    --_muted: var(--cpk-drawer-muted, var(--muted, ${i(a.muted)}));
38    --_muted-fg: var(
39      --cpk-drawer-muted-fg,
40      var(--muted-foreground, ${i(a["muted-fg"])})
41    );
42    --_accent: var(--cpk-drawer-accent, var(--accent, ${i(a.accent)}));
43    --_accent-fg: var(
44      --cpk-drawer-accent-fg,
45      var(--accent-foreground, ${i(a["accent-fg"])})
46    );
47    --_primary: var(--cpk-drawer-primary, var(--primary, ${i(a.primary)}));
48    --_primary-fg: var(
49      --cpk-drawer-primary-fg,
50      var(--primary-foreground, ${i(a["primary-fg"])})
51    );
52    --_danger: var(--cpk-drawer-danger, var(--destructive, ${i(a.danger)}));
53    --_border: var(--cpk-drawer-border, var(--border, ${i(a.border)}));
54    --_ring: var(--cpk-drawer-ring, var(--ring, ${i(a.ring)}));
55    --_indicator: var(--cpk-drawer-indicator, #5b94e4);
56    /* Cap the corner radius at 4px (per designer) — themeable but never larger. */
57    --_radius: min(
58      var(--cpk-drawer-radius, var(--radius, ${i(a.radius)})),
59      4px
60    );
61    --_width: var(--cpk-drawer-width, 320px);
62  }
63
64  :host([hidden]) {
65    display: none;
66  }
67
68  * {
69    box-sizing: border-box;
70  }
71
72  .root {
73    display: flex;
74    flex-direction: column;
75    height: 100%;
76    width: var(--_width);
77    background: var(--_bg);
78    border-right: 1px solid var(--_border);
79    overflow: hidden;
80    transition: width 0.2s ease;
81    /* The confirm-delete dialog no longer needs a positioning context here: it
82       is a native <dialog> opened with showModal(), which renders in the
83       browser top layer independent of any stacking context (ENT-1051). No
84       other direct child of .root is absolutely positioned (the filter and
85       row-action popovers anchor to their own positioned ancestors), so .root
86       stays static. The mobile path establishes its own context via
87       position:fixed. */
88  }
89
90  /* Mobile: off-canvas overlay (modal pattern). */
91  .root.mobile {
92    position: fixed;
93    inset: 0 auto 0 0;
94    z-index: 1000;
95    width: min(var(--_width), 85vw);
96    transform: translateX(-100%);
97    transition: transform 0.2s ease;
98    box-shadow: 0 0 0 100vmax transparent;
99  }
100
101  .root.mobile.open {
102    transform: translateX(0);
103  }
104
105  /* Desktop collapsed: the panel is replaced by the floating cluster, so remove
106     it from the layout entirely. The host reclaims the reserved column via the
107     --cpk-drawer-reserved-width:0px override the element sets on collapse. */
108  .root.collapsed {
109    display: none;
110  }
111
112  .backdrop {
113    position: fixed;
114    inset: 0;
115    z-index: 999;
116    background: rgba(0, 0, 0, 0.4);
117    border: 0;
118    padding: 0;
119    margin: 0;
120    cursor: pointer;
121  }
122
123  /* Floating launcher cluster (Figma "closed" mockup): a rounded surface card
124     holding the sidebar toggle + a "New Conversation" (+) icon button. Rendered
125     by the element itself in the mobile-closed AND desktop-collapsed 
125states so
126     there is always a way to reopen/expand — and to start a new conversation —
127     with no host wiring. */
128  .launcher-cluster {
129    position: fixed;
130    z-index: 998;
131    /* Position is themeable so a host can line the cluster up with its own
132       header controls (e.g. vertically centering it on a toggle group). */
133    top: var(--cpk-drawer-launcher-top, 24px);
134    left: var(--cpk-drawer-launcher-left, 24px);
135    display: inline-flex;
136    align-items: center;
137    gap: 2px;
138    padding: 6px;
139    border-radius: var(--_radius);
140    border: 1px solid var(--_border);
141    background: var(--_surface);
142    color: var(--_surface-fg);
143    box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
144  }
145
146  .launcher {
147    display: inline-flex;
148    align-items: center;
149    justify-content: center;
150    width: 32px;
151    height: 32px;
152    padding: 6px;
153    border: 0;
154    border-radius: calc(var(--_radius) - 3px);
155    background: transparent;
156    color: var(--_surface-fg);
157    cursor: pointer;
158    font: inherit;
159  }
160
161  .launcher:hover,
162  .launcher:focus-visible {
163    background: var(--_muted);
164  }
165
166  .launcher .icon {
167    width: 18px;
168    height: 18px;
169    display: block;
170  }
171
172  .header {
173    display: flex;
174    align-items: center;
175    gap: 8px;
176    padding: 12px;
177  }
178
179  /* The header is hidden until a consumer projects slot="header" content
180     (the redesign has no built-in header controls). Mirrors the memories/footer
181     gating so an empty padded header bar never renders above the list. */
182  .header[hidden] {
183    display: none;
184  }
185
186  /* Optional consumer projection surface. When a consumer projects into
187     slot="header" it fills the header row. */
188  .header slot[name="header"] {
189    display: flex;
190    align-items: center;
191    flex: 1;
192    min-width: 0;
193  }
194
195  .icon-btn {
196    position: relative;
197    display: inline-flex;
198    align-items: center;
199    justify-content: center;
200    width: 32px;
201    height: 32px;
202    padding: 6px;
203    border: 0;
204    border-radius: var(--_radius);
205    background: transparent;
206    color: var(--_muted-fg);
207    cursor: pointer;
208    font: inherit;
209  }
210
211  /* "Filter applied" indicator dot at the funnel's bottom-right (Figma archived
212     view). Shown only when a non-default filter is active. */
213  .filter-dot {
214    position: absolute;
215    right: 3px;
216    bottom: 4px;
217    width: 6px;
218    height: 6px;
219    border-radius: 50%;
220    background: var(--_indicator);
221    pointer-events: none;
222  }
223
224  .icon-btn:hover,
225  .icon-btn:focus-visible {
226    background: var(--_muted);
227    color: inherit;
228  }
229
230  .icon-btn[aria-pressed="true"] {
231    background: var(--_muted);
232    color: inherit;
233  }
234
235  .icon {
236    width: 20px;
237    height: 20px;
238    display: block;
239  }
240
241  .new-conversation {
242    display: flex;
243    align-items: center;
244    gap: 12px;
245    /* No top margin by default: the header bar (the collapse toggle on de
245sktop,
246       the close button on mobile-open) sits above this row and supplies the top
247       spacing — the header-hidden case re-adds it below. Horizontal geometry
248       matches the list rows: the hover background insets 12px (like a row's
249       highlight) and, with 10px inner padding, the icon's left edge lands at
250       22px — the same x as the thread names below (list padding 12 + row
251       padding 10). */
252    margin: 0 12px;
253    padding: 8px 10px;
254    border: 0;
255    border-radius: var(--_radius);
256    background: transparent;
257    color: inherit;
258    cursor: pointer;
259    font: inherit;
260    text-align: left;
261  }
262
263  /* Only when the header bar is fully hidden (collapsible=false AND no projected
264     header content) is this row the first element — give it the top spacing the
265     header would otherwise supply. */
266  .header[hidden] + .new-conversation {
267    margin-top: 12px;
268  }
269
270  .new-conversation:hover,
271  .new-conversation:focus-visible {
272    background: var(--_muted);
273  }
274
275  .new-conversation .icon {
276    width: 16px;
277    height: 16px;
278  }
279
280  .section-heading {
281    position: relative;
282    display: flex;
283    align-items: center;
284    justify-content: space-between;
285    /* Match the list rows' content edge: "Recent Conversations" lands at 22px
286       (margin 12 + padding 10), aligned with the thread names and the New
287       Conversation icon; the funnel sits 22px from the right, over the kebabs. */
288    padding: 8px 10px;
289    margin: 0 12px;
290  }
291
292  .section-title {
293    font-size: 11px;
294    font-weight: 600;
295    letter-spacing: 0.02em;
296    color: var(--_muted-fg);
297    text-transform: none;
298  }
299
300  .icon-btn.small {
301    width: 24px;
302    height: 24px;
303    padding: 4px;
304  }
305
306  .icon-btn.small .icon {
307    width: 16px;
308    height: 16px;
309  }
310
311  .filter-popover {
312    position: absolute;
313    right: 0;
314    top: calc(100% + 4px);
315    z-index: 15;
316    display: flex;
317    flex-direction: column;
318    min-width: 120px;
319    padding: 4px;
320    background: var(--_surface);
321    color: var(--_surface-fg);
322    border: 1px solid var(--_border);
323    border-radius: var(--_radius);
324    box-shadow: 0 4px 12px rgb(0 0 0 / 0.18);
325  }
326
327  .filter-opt {
328    border: 0;
329    background: transparent;
330    color: inherit;
331    cursor: pointer;
332    font: inherit;
333    text-align: left;
334    padding: 6px 8px;
335    border-radius: 4px;
336  }
337
338  .filter-opt:hover,
339  .filter-opt:focus-visible {
340    background: var(--_muted);
341  }
342
343  .filter-opt[aria-pressed="true"] {
344    font-weight: 600;
345  }
346
347  .list {
348    flex: 1;
349    min-height: 0;
350    overflow-y: auto;
351    padding: 8px 12px;
352    margin: 0;
353    list-style: none;
354    display: flex;
355    flex-direction: column;
356    gap: 4px;
357  }
358
359  .row {
360    display: flex;
361    align-items: center;
362    gap: 8px;
363    padding: 8px 10px;
364    border-radius: var(--_radius);
365    cursor: pointer;
366    background: transparent;
367    color: inherit;
368    border: 1px solid transparent;
369    opacity: 0;
370    transform: translateY(4px);
371    animation: cpk-drawer-row-in 0.18s ease forwards;
372    /* Positioned so the hovered row can be lifted above later rows (below). */
373    position: relative;
374  }
375
376  /* Lift the interacted row above later rows so its kebab popover (which paints
377     inside the row's own transform stacking context) is not clipped by / drawn
378     under the rows below it. */
379  .row:hover,
380  .row:focus-within,
381  .row.menu-open {
382    z-index: 3;
383  }
384
385  /* While a kebab menu is open, the popover only covers part of the rows it
386     overlaps, so the rest of the list would still respond to hover — revealing
387     other rows' kebabs and (under a host \`::part(row):hover\` theme) painting a
388     hover background "through"/around the open menu. Freeze pointer events on
389     every OTHER row so the menu reads as a single focused surface. The owner
390     row (\`.menu-open\`) and its popover stay interactive, and a pointerdown that
391     lands on a frozen row still reaches the document handler that closes the
392     menu, so click-away dismissal is preserved. */
393  .list.menu-open .row:not(.menu-open) {
394    pointer-events: none;
395  }
396
397  @keyframes cpk-drawer-row-in {
398    to {
399      opacity: 1;
400      transform: translateY(0);
401    }
402  }
403
404  .row.active {
405    background: var(--_accent);
406    color: var(--_accent-fg);
407    /* No border on the selected row — the background change alone marks it
408       (per designer). The base row keeps its 1px transparent border so the
409       layout stays stable. */
410  }
411
412  .row.archived .row-name {
413    color: var(--_muted-fg);
414    font-style: italic;
415  }
416
417  .row-name {
418    flex: 1;
419    min-width: 0;
420  }
421
422  .row-name-text {
423    display: block;
424    overflow: hidden;
425    text-overflow: ellipsis;
426    white-space: nowrap;
427  }
428
429  .row-name.placeholder {
430    color: var(--_muted-fg);
431    font-style: italic;
432  }
433
434  .row-name.revealed {
435    animation: cpk-drawer-name-reveal 0.3s ease;
436  }
437
438  @keyframes cpk-drawer-name-reveal {
439    from {
440      opacity: 0.4;
441    }
442    to {
443      opacity: 1;
444    }
445  }
446
447  .row-action {
448    position: relative;
449    display: inline-flex;
450    align-items: center;
451    justify-content: center;
452    flex: none;
453    border: 0;
454    background: transparent;
455    color: var(--_muted-fg);
456    cursor: pointer;
457    font: inherit;
458    padding: 5px;
459    border-radius: 4px;
460  }
461
462  .row-action:hover,
463  .row-action:focus-visible {
464    background: var(--_muted);
465    color: inherit;
466  }
467
468  .row-action-icon {
469    width: 15px;
470    height: 15px;
471    display: block;
472  }
473
474  /* Per-row kebab trigger: hidden at rest, revealed when the row is hovered,
475     focused (keyboard), active (selected), or its menu is open. */
476  .row-menu {
477    flex: none;
478    display: inline-flex;
479    align-items: center;
480    justify-content: center;
481    width: 24px;
482    height: 24px;
483    padding: 4px;
484    border: 0;
485    border-radius: 4px;
486    background: transparent;
487    color: var(--_muted-fg);
488    cursor: pointer;
489    font: inherit;
490    opacity: 0;
491  }
492
493  .row:hover .row-menu,
494  .row:focus-within .row-menu,
495  .row.active .row-menu,
496  .row-menu[aria-expanded="true"] {
497    opacity: 1;
498  }
499
500  .row-menu:hover,
501  .row-menu:focus-visible {
502    background: var(--_muted);
503    color: inherit;
504  }
505
506  .row-menu .icon {
507    width: 16px;
508    height: 16px;
509  }
510
511  .row-menu-popover {
512    position: absolute;
513    right: 8px;
514    top: calc(100% - 4px);
515    z-index: 16;
516    display: flex;
517    flex-direction: column;
518    min-width: 140px;
519    padding: 4px;
520    background: var(--_surface);
521    color: var(--_surface-fg);
522    border: 1px solid var(--_border);
523    border-radius: var(--_radius);
524    box-shadow: 0 4px 12px rgb(0 0 0 / 0.18);
525  }
526
527  /* Rows in the lower portion of the list open their kebab menu UPWARD so it is
528     not clipped by the list's overflow scroll box (.list is overflow-y:auto,
529     which also clips the x-axis). Anchoring to the button's top edge via
530     \`bottom\` keeps the popover inside the list's visible area for bottom rows. */
531  .row.menu-up .row-menu-popover {
532    top: auto;
533    bottom: calc(100% - 4px);
534  }
535
536  .row-menu-item {
537    display: flex;
538    align-items: center;
539    gap: 8px;
540    border: 0;
541    background: transparent;
542    color: inherit;
543    cursor: pointer;
544    font: inherit;
545    text-align: left;
546    padding: 6px 8px;
547    border-radius: 4px;
548  }
549
550  .row-menu-item:hover,
551  .row-menu-item:focus-visible {
552    background: var(--_muted);
553  }
554
555  .row-menu-item.danger:hover,
556  .row-menu-item.danger:focus-visible {
557    color: var(--_danger);
558  }
559
560  .row-menu-item .row-action-icon,
561  .row-menu-item .icon {
562    width: 15px;
563    height: 15px;
564  }
565
566  button.primary {
567    background: var(--_primary);
568    color: var(--_primary-fg);
569    border: 0;
570    border-radius: var(--_radius);
571    padding: 8px 12px;
572    cursor: pointer;
573    font: inherit;
574  }
575
576  .state {
577    padding: 24px 16px;
578    text-align: center;
579    color: var(--_muted-fg);
580  }
581
582  .state.error {
583    color: var(--_danger);
584  }
585
586  .fetch-more-error {
587    padding: 8px 12px;
588    text-align: center;
589    color: var(--_danger);
590    font-size: 0.9em;
591  }
592
593  .load-more {
594    display: block;
595    width: 100%;
596    padding: 8px 12px;
597    background: none;
598    border: none;
599    color: var(--_muted-fg);
600    font: inherit;
601    font-size: 0.9em;
602    cursor: pointer;
603  }
604
605  .load-more:hover,
606  .load-more:focus-visible {
607    color: var(--_surface-fg);
608    background: var(--_muted);
609  }
610
611  .licensed {
612    padding: 24px 16px;
613    text-align: center;
614    display: flex;
615    flex-direction: column;
616    gap: 12px;
617  }
618
619  .memories {
620    border-top: 1px solid var(--_border);
621    padding: 8px 12px;
622  }
623
624  .memories[hidden] {
625    display: none;
626  }
627
628  /* Confirm-delete dialog — a native <dialog> opened with showModal(). It lives
629     in the browser TOP LAYER, so it can never be painted under other UI (the
630     old CSS-positioned overlay was trapped in the drawer host's stacking
631     context and appeared under the chat's welcome view — ENT-1051). The UA
632     centers it in the viewport via margin:auto; we reset the UA chrome and
633     apply the drawer's surface-card look. */
634  .dialog {
635    /* Top-layer (showModal) so it is never clipped, but centered over the DRAWER
636       PANEL rather than the viewport: JS sets --confirm-cx/cy from the visible
637       .root rect (falls back to viewport-center when unmeasured, e.g. jsdom).
638       Width is capped to the drawer band so it reads as "inside the drawer". */
639    margin: 0;
640    position: fixed;
641    left: var(--confirm-cx, 50%);
642    top: var(--confirm-cy, 50%);
643    transform: translate(-50%, -50%);
644    border: 0;
645    padding: 16px;
646    width: max-content;
647    max-width: min(80vw, calc(var(--_width) - 24px));
648    background: var(--_surface);
649    color: var(--_surface-fg);
650    border-radius: var(--_radius);
651  }
652
653  /* Only lay out the card contents when open. A closed <dialog> is display:none
654     via the UA stylesheet, and author display rules must not override that (or
655     an empty box would leak), so the flex layout is scoped to [open]. */
656  .dialog[open] {
657    display: flex;
658    flex-direction: column;
659    gap: 12px;
660  }
661
662  .dialog::backdrop {
663    background: rgba(0, 0, 0, 0.3);
664  }
665
666  .dialog-actions {
667    display: flex;
668    justify-content: flex-end;
669    gap: 8px;
670  }
671
672  .footer {
673    border-top: 1px solid var(--_border);
674    padding: 12px;
675  }
676
677  .footer[hidden] {
678    display: none;
679  }
680`;var s=n(52321),l=n(32973);let{I:u}=s.ge,c=e=>e,d=()=>document.createComment(""),h=(e,t,n)=>{let r=e._$AA.parentNode,i=void 0===t?e._$AB:t._$AA;if(void 0===n)n=new u(r.insertBefore(d(),i),r.insertBefore(d(),i),e,e.options);else{let t=n._$AB.nextSibling,a=n._$AM,o=a!==e;if(o){let t;n._$AQ?.(e),n._$AM=e,void 0!==n._$AP&&(t=e._$AU)!==a._$AU&&n._$AP(t)}if(t!==i||o){let e=n._$AA;for(;e!==t;){let t=c(e).nextSibling;c(r).insertBefore(e,i),e=t}}}return n},p=(e,t,n=e)=>(e._$AI(t,n),e),f={},m=e=>{e._$AR(),e._$AA.remove()},g=(e,t,n)=>{let r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},v=(0,l.u$)(class extends l.WL{constructor(e){if(super(e),e.type!==l.OA.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,n){let r;void 0===n?n=t:void 0!==t&&(r=t);let i=[],a=[],o=0;for(let t of e)i[o]=r?r(t,o):o,a[o]=n(t,o),o++;return{values:a,keys:i}}render(e,t,n){return this.dt(e,t,n).values}update(e,[t,n,r]){let i=e._$AH,{values:a,keys:o}=this.dt(t,n,r);if(!Array.isArray(i))return this.ut=o,a;let l=this.ut??=[],u=[],c,d,v=0,b=i.length-1,y=0,E=a.length-1;for(;v<=b&&y<=E;)if(null===i[v])v++;else if(null===i[b])b--;else if(l[v]===o[y])u[y]=p(i[v],a[y]),v++,y++;else if(l[b]===o[E])u[E]=p(i[b],a[E]),b--,E--;else if(l[v]===o[E])u[E]=p(i[v],a[E]),h(e,u[E+1],i[v]),v++,E--;else if(l[b]===o[y])u[y]=p(i[b],a[y]),h(e,i[v],i[b]),b--,y++;else if(void 0===c&&(c=g(o,y,E),d=g(l,v,b)),c.has(l[v]))if(c.has(l[b])){let t=d.get(o[y]),n=void 0!==t?i[t]:null;if(null===n){let t=h(e,i[v]);p(t,a[y]),u[y]=t}else u[y]=p(n,a[y]),h(e,i[v],n),i[t]=null;y++}else m(i[b]),b--;else m(i[v]),v++;for(;y<=E;){let t=h(e,u[E+1]);p(t,a[y]),u[y++]=t}for(;v<=b;){let e=i[v++];null!==e&&m(e)}return this.ut=o,((e,t=f)=>e._$AH=t)(e,u),s.c0}}),b=(0,l.u$)(class extends l.WL{constructor(e){if(super(e),e.type!==l.OA.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this.st){for(let n in this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e))),t)t[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(t)}let n=e.element.classList;for(let e of this.st)e in t||(n.remove(e),this.st.delete(e));for(let e in t){let r=!!t[e];r===this.st.has(e)||this.nt?.has(e)||(r?(n.add(e),this.st.add(e)):(n.remove(e),this.st.delete(e)))}return s.c0}}),y="copilotkit-threads-drawer";function E(e){return null!==e&&e.trim().length>0}let T=(0,r.qy)`
681  <svg
682    class="row-action-icon"
683    viewBox="0 0 24 24"
684    fill="none"
685    stroke="currentColor"
686    stroke-width="2"
687    stroke-linecap="round"
688    stroke-linejoin="round"
689    aria-hidden="true"
690  >
691    <rect width="20" height="5" x="2" y="3" rx="1" />
692    <path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" />
693    <path d="M10 12h4" />
694  </svg>
695`,k=(0,r.qy)`
696  <svg
697    class="row-action-icon"
698    viewBox="0 0 24 24"
699    fill="none"
700    stroke="currentColor"
701    stroke-width="2"
702    stroke-linecap="round"
703    stroke-linejoin="round"
704    aria-hidden="true"
705  >
706    <rect width="20" height="5" x="2" y="3" rx="1" />
707    <path d="M4 8v11a2 2 0 0 0 2 2h2" />
708    <path d="M20 8v11a2 2 0 0 1-2 2h-2" />
709    <path d="m9 15 3-3 3 3" />
710    <path d="M12 12v9" />
711  </svg>
712`,_=(0,r.qy)`
713  <svg
714    class="row-action-icon"
715    viewBox="0 0 24 24"
716    fill="none"
717    stroke="currentColor"
718    stroke-width="2"
719    stroke-linecap="round"
720    stroke-linejoin="round"
721    aria-hidden="true"
722  >
723    <path d="M3 6h18" />
724    <path
725      d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"
726    />
727    <line x1="10" x2="10" y1="11" y2="17" />
728    <line x1="14" x2="14" y1="11" y2="17" />
729  </svg>
730`,A=(0,r.qy)`
731  <svg
732    class="icon"
733    viewBox="0 0 24 24"
734    fill="none"
735    stroke="currentColor"
736    stroke-width="2"
737    stroke-linecap="round"
738    stroke-linejoin="round"
739    aria-hidden="true"
740  >
741    <rect width="18" height="18" x="3" y="3" rx="2" />
742    <path d="M9 3v18" />
743  </svg>
744`,x=(0,r.qy)`
745  <svg
746    class="icon"
747    viewBox="0 0 24 24"
748    fill="none"
749    stroke="currentColor"
750    stroke-width="2"
751    stroke-linecap="round"
752    stroke-linejoin="round"
753    aria-hidden="true"
754  >
755    <rect width="18" height="18" x="3" y="3" rx="2" />
756    <path d="M8 12h8" />
757    <path d="M12 8v8" />
758  </svg>
759`,w=(0,r.qy)`
760  <svg
761    class="icon"
762    viewBox="0 0 24 24"
763    fill="none"
764    stroke="currentColor"
765    stroke-width="2"
766    stroke-linecap="round"
767    stroke-linejoin="round"
768    aria-hidden="true"
769  >
770    <line x1="3" y1="5" x2="21" y2="5" />
771    <line x1="6" y1="12" x2="18" y2="12" />
772    <line x1="10" y1="19" x2="14" y2="19" />
773  </svg>
774`,S=(0,r.qy)`
775  <svg class="icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
776    <circle cx="12" cy="5" r="1.6" />
777    <circle cx="12" cy="12" r="1.6" />
778    <circle cx="12" cy="19" r="1.6" />
779  </svg>
780`;var C=class extends r.WF{constructor(...e){super(...e),this.label="Threads",this.recentLabel="Recent Conversations",this.threads=[],this.loading=!1,this.error=null,this.activeThreadId=null,this.licensed=!0,this.licenseUrl="https://docs.copilotkit.ai/intelligence",this.hasMore=!1,this.fetchingMore=!1,this.fetchMoreError=null,this.open=!1,this.collapsed=!1,this.collapsible=!0,this._filter="active",this._confirmingDeleteId=null,this._viewportIsMobile=!1,this._hasHeader=!1,this._hasMemories=!1,this._hasFooter=!1,this._filterOpen=!1,this._openMenuId=null,this._mediaQuery=null,this._onMediaChange=e=>{this._viewportIsMobile=e.matches},this._onKeyDown=e=>{if("Escape"===e.key){if(null!==this._openMenuId){this._openMenuId=null,e.stopPropagation();return}if(this._filterOpen){this._filterOpen=!1,e.stopPropagation();return}return null!==this._confirmingDeleteId?void e.stopPropagation():void(this._viewportIsMobile&&this.open&&(this._setOpen(!1),e.stopPropagation()))}"Tab"===e.key&&this._trapTab(e)},this._onDocumentPointerDown=e=>{if(!this._filterOpen&&null===this._openMenuId)return;let t=e.composedPath();if(this._filterOpen){let e=this.renderRoot.querySelector('[part="filters"]'),n=this.renderRoot.querySelector('[part="filter-toggle"]');e&&t.includes(e)||n&&t.includes(n)||(this._filterOpen=!1)}if(null!==this._openMenuId){let e=this.renderRoot.querySelector('[part="row-menu-popover"]'),n=this.renderRoot.querySelector('.row.menu-open [part="row-menu"]');e&&t.includes(e)||n&&t.includes(n)||(this._openMenuId=null)}},this._seenNamed=new Set,this._justRevealed=new Set,this._repositionConfirm=()=>this._positionConfirmDialog(),this._scrollLocked=!1,this._prevBodyOverflow="",this._trapTab=e=>{if("Tab"!==e.key||!this._isMobileModalOpen())return;let t=this._composedFocusable();if(0===t.length)return;let n=t[0],r=t[t.length-1],i=this.renderRoot.activeElement??document.activeElement;e.shiftKey&&i===n?(r.focus(),e.preventDefault()):e.shiftKey||i!==r||(n.focus(),e.preventDefault())}}static{this.styles=o}static{this.properties={threads:{attribute:!1},loading:{type:Boolean},error:{type:String},activeThreadId:{attribute:"active-thread-id",type:String},licensed:{type:Boolean},licenseUrl:{attribute:"license-url",type:String},hasMore:{attribute:"has-more",type:Boolean},fetchingMore:{attribute:"fetching-more",type:Boolean},fetchMoreError:{attribute:"fetch-more-error",type:String},label:{type:String},recentLabel:{attribute:"recent-label",type:String},collapsible:{type:Boolean},open:{type:Boolean,reflect:!0},collapsed:{type:Boolean,reflect:!0},_filter:{state:!0},_confirmingDeleteId:{state:!0},_viewportIsMobile:{state:!0},_hasHeader:{state:!0},_hasMemories:{state:!0},_hasFooter:{state:!0},_filterOpen:{state:!0},_openMenuId:{state:!0}}}connectedCallback(){super.connectedCallback(),"undefined"!=typeof window&&window.matchMedia&&(this._mediaQuery=window.matchMedia("(max-width: 768px)"),this._viewportIsMobile=this._mediaQuery.matches,this._mediaQuery.addEventListener("change",this._onMediaChange)),this.addEventListener("keydown",this._onKeyDown),"undefined"!=typeof document&&document.addEventListener("pointerdown",this._onDocumentPointerDown)}disconnectedCallback(){super.disconnectedCallback(),this._mediaQuery?.removeEventListener("change",this._onMediaChange),this.removeEventListener("keydown",this._onKeyDown),"undefined"!=typeof document&&document.removeEventListener("pointerdown",this._onDocumentPointerDown),"undefined"!=typeof window&&(window.removeEventListener("scroll",this._repositionConfirm,!0),window.removeEventListener("resize",this._repositionConfirm)),"undefined"!=typeof document&&document.documentElement.style.removeProperty("--cpk-drawer-reserved-width"),this._releaseScrollLock()}willUpdate(e){if(e.has("threads")){let e=new Set,t=new Set;for(let n of this.threads){e.add(n.id);let r=null!==n.name&&""!==n.name;r&&!this._seenNamed.has(n.id)&&t.add(n.id),r&&this._seenNamed.add(n.id)}for(let t of this._seenNamed)e.has(t)||this._seenNamed.delete(t);this._justRevealed=t,null===this._confirmingDeleteId||this._visibleThreads().some(e=>e.id===this._confirmingDeleteId)||(this._confirmingDeleteId=null),null===this._openMenuId||this._visibleThreads().some(e=>e.id===this._openMenuId)||(this._openMenuId=null)}}updated(e){(e.has("open")||e.has("_viewportIsMobile"))&&(this._isMobileModalOpen()?(this._applyScrollLock(),this._focusFirstFocusable()):this._releaseScrollLock()),(e.has("collapsed")||e.has("collapsible")||e.has("_viewportIsMobile"))&&this._syncReservedWidth();let t=this.renderRoot.querySelector("dialog");if(t){let e=this._confirmingDeleteId;null===e||t.open?null===e&&t.open&&("function"==typeof t.close?t.close():t.removeAttribute("open"),window.removeEventListener("scroll",this._repositionConfirm,!0),window.removeEventListener("resize",this._repositionConfirm)):("function"==typeof t.showModal?t.showModal():t.setAttribute("open",""),this._positionConfirmDialog(),window.addEventListener("scroll",this._repositionConfirm,!0),window.addEventListener("resize",this._repositionConfirm))}this._justRevealed.size>0&&(this._justRevealed=new Set)}_isMobileModalOpen(){return this._viewportIsMobile&&this.open}_setOpen(e){this.open!==e&&(this.open=e,this._emit("open-change",{open:e}))}_setCollapsed(e){this.collapsed!==e&&(this.collapsed=e,this._emit("collapse-change",{collapsed:e}))}_syncReservedWidth(){if("undefined"==typeof document)return;let e=this.collapsible&&this.collapsed&&!this._viewportIsMobile,t=document.documentElement;e?t.style.setProperty("--cpk-drawer-reserved-width","0px"):t.style.removeProperty("--cpk-drawer-reserved-width")}_positionConfirmDialog(){let e=this.renderRoot.querySelector("dialog"),t=this.renderRoot.querySelector(".root");
780if(!e)return;let n=t?.getBoundingClientRect();if(!n||0===n.width&&0===n.height){e.style.removeProperty("--confirm-cx"),e.style.removeProperty("--confirm-cy");return}let r=window.innerWidth,i=window.innerHeight,a=Math.max(n.left,0),o=Math.min(n.right,r),s=Math.max(n.top,0),l=Math.min(n.bottom,i);e.style.setProperty("--confirm-cx",`${(a+o)/2}px`),e.style.setProperty("--confirm-cy",`${(s+l)/2}px`)}_setFilter(e){this._filter!==e&&(this._filter=e,this._emit("filter-change",{filter:e}))}_visibleThreads(){return[..."active"===this._filter?this.threads.filter(e=>!e.archived):this.threads].map((e,t)=>({thread:e,index:t,ts:(e=>{let t=Date.parse(e.lastRunAt??e.updatedAt??e.createdAt);return Number.isNaN(t)?null:t})(e)})).sort((e,t)=>null===e.ts&&null===t.ts?e.index-t.index:null===e.ts?1:null===t.ts?-1:e.ts!==t.ts?t.ts-e.ts:e.index-t.index).map(e=>e.thread)}_emit(e,t){this.dispatchEvent(new CustomEvent(e,{detail:t,bubbles:!0,composed:!0}))}_applyScrollLock(){this._scrollLocked||"undefined"==typeof document||(this._prevBodyOverflow=document.body.style.overflow,document.body.style.overflow="hidden",this._scrollLocked=!0)}_releaseScrollLock(){this._scrollLocked&&"undefined"!=typeof document&&(document.body.style.overflow=this._prevBodyOverflow,this._scrollLocked=!1)}_composedFocusable(){let e='a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])',t=[],n=this.renderRoot.querySelector(".backdrop");n&&t.push(n);let r=this.renderRoot.querySelector(".root");if(!r)return t;let i=n=>{n.querySelectorAll(e).forEach(e=>t.push(e))};return i(r),r.querySelectorAll("slot").forEach(n=>{n.assignedElements({flatten:!0}).forEach(n=>{n.matches(e)&&t.push(n),i(n)})}),t}_focusFirstFocusable(){queueMicrotask(()=>{let e=this._composedFocusable(),t=this.renderRoot.querySelector(".backdrop");(e.find(e=>e!==t)??e[0])?.focus()})}render(){let e=this.collapsible&&this.collapsed&&!this._viewportIsMobile,t=this._viewportIsMobile&&!this.open,n=e||t,i={root:!0,mobile:this._viewportIsMobile,open:this.open,collapsed:e};return(0,r.qy)`
781      ${n?this._renderCluster():r.s6}
782      ${this._isMobileModalOpen()?(0,r.qy)`<button
783            class="backdrop"
784            part="backdrop"
785            aria-label="Close threads drawer"
786            @click=${()=>this._setOpen(!1)}
787          ></button>`:r.s6}
788      <div
789        class=${b(i)}
790        part="root"
791        role=${this._isMobileModalOpen()?"dialog":"region"}
792        aria-modal=${this._isMobileModalOpen()?"true":r.s6}
793        aria-hidden=${e?"true":r.s6}
794        aria-label=${this.label}
795      >
796        ${e?r.s6:(0,r.qy)`${this._renderHeader()} ${this._renderBody()}
797              ${this._renderMemories()} ${this._renderFooter()}
798              ${this._renderConfirmDialog()}`}
799      </div>
800    `}_renderCluster(){let e=this._viewportIsMobile?()=>this._setOpen(!0):()=>this._setCollapsed(!1);return(0,r.qy)`
801      <div class="launcher-cluster" part="launcher-cluster">
802        <button
803          class="launcher"
804          part="launcher"
805          aria-label=${this._viewportIsMobile?"Open threads":"Expand threads"}
806          @click=${e}
807        >
808          <slot name="launcher-icon">${A}</slot>
809        </button>
810        ${this.licensed?(0,r.qy)`<button
811                class="launcher launcher-new-thread"
812                part="launcher-new-thread"
813                aria-label="New Conversation"
814                @click=${()=>this._emit("new-thread",{})}
815              >
816                ${x}
817              </button>`:r.s6}
818      </div>
819    `}_renderHeader(){let e=this._viewportIsMobile&&this.open,t=this.collapsible&&!this._viewportIsMobile;return(0,r.qy)`
820      <div
821        class="header"
822        part="header"
823        ?hidden=${!this._hasHeader&&!e&&!t}
824      >
825        <slot
826          name="header"
827          @slotchange=${e=>{this._hasHeader=e.target.assignedElements().length>0}}
828        ></slot>
829        ${t?(0,r.qy)`<button
830              class="icon-btn"
831              part="collapse-toggle"
832              aria-label="Collapse threads"
833              @click=${()=>this._setCollapsed(!0)}
834            >
835              ${A}
836            </button>`:r.s6}
837        ${e?(0,r.qy)`<button
838              class="icon-btn"
839              part="close-toggle"
840              aria-label="Close threads"
841              @click=${()=>this._setOpen(!1)}
842            >
843              ${A}
844            </button>`:r.s6}
845      </div>
846      ${this.licensed?this._renderNewConversation():r.s6}
847      ${this._renderSectionHeading()}
848    `}_renderNewConversation(){return(0,r.qy)`
849      <button
850        class="new-conversation"
851        part="new-thread-button"
852        @click=${()=>this._emit("new-thread",{})}
853      >
854        ${x}
855        <span>New Conversation</span>
856      </button>
857    `}_renderSectionHeading(){return!this.licensed||E(this.error)&&0===this.threads.length?r.s6:(0,r.qy)`
858      <div class="section-heading" part="section-heading">
859        <span class="section-title">${this.recentLabel}</span>
860        <button
861          class="icon-btn small"
862          part="filter-toggle"
863          aria-label="Filter threads"
864          aria-expanded=${this._filterOpen}
865          @click=${()=>this._filterOpen=!this._filterOpen}
866        >
867          ${w}
868          ${"active"!==this._filter?(0,r.qy)`
869                  <span class="filter-dot" part="filter-indicator"></span>
870                `:r.s6}
871        </button>
872        ${this._filterOpen?(0,r.qy)`<div
873              class="filter-popover"
874              part="filters"
875              role="group"
876              aria-label="Filter threads"
877            >
878              <button
879                class="filter-opt"
880                part="filter-active"
881                aria-pressed=${"active"===this._filter}
882                @click=${()=>{this._setFilter("active"),this._filterOpen=!1}}
883              >
884                Active
885              </button>
886              <button
887                class="filter-opt"
888                part="filter-all"
889                aria-pressed=${"all"===this._filter}
890                @click=${()=>{this._setFilter("all"),this._filterOpen=!1}}
891              >
892                All
893              </button>
894            </div>`:r.s6}
895      </div>
896    `}_renderBody(){return this.licensed?E(this.error)&&0===this.threads.length?this._renderError():this.loading&&0===this.threads.length?this._renderLoading():this._renderList():this._renderLicensed()}_onLicensedCta(){this.dispatchEvent(new CustomEvent("licensed",{detail:{licenseUrl:this.licenseUrl},bubbles:!0,composed:!0,cancelable:!0}))&&this.licenseUrl&&"undefined"!=typeof window&&window.open(this.licenseUrl,"_blank","noopener,noreferrer")}_renderLicensed(){return(0,r.qy)`
897      <div class="licensed" part="licensed" data-testid="drawer-licensed">
898        <slot name="licensed">
899          <p>Threads are a CopilotKit Intelligence feature.</p>
900          <button
901            class="primary"
902            part="licensed-cta"
903            @click=${()=>this._onLicensedCta()}
904          >
905            Upgrade
906          </button>
907        </slot>
908      </div>
909    `}_renderError(){return(0,r.qy)`
910      <div
911        class="state error"
912        part="error"
913        role="alert"
914        data-testid="drawer-error"
915      >
916        <p>${this.error}</p>
917        <button
918          class="primary"
919          part="retry-button"
920          @click=${()=>this._emit("retry",{scope:"initial"})}
921        >
922          Retry
923        </button>
924      </div>
925    `}_renderLoading(){return(0,r.qy)`
926      <div class="state" part="loading" data-testid="drawer-loading" aria-busy="true">
927        Loading threads…
928      </div>
929    `}_renderList(){let e=this._visibleThreads();return 0===e.length?(0,r.qy)`
930        <div class="state" part="empty" data-testid="drawer
930-empty">
931          <slot name="empty">No threads yet.</slot>
932        </div>
933      `:(0,r.qy)`
934      <ul
935        class=${null!==this._openMenuId?"list menu-open":"list"}
936        part="list"
937        role="listbox"
938        aria-label=${this.label}
939      >
940        ${v(e,e=>e.id,(t,n)=>this._renderRow(t,n,e.length))}
941      </ul>
942      ${this._renderFetchMore()}
943    `}_renderRow(e,t=0,n=1){var i;let a=e.id===this.activeThreadId,o=null!==e.name&&""!==e.name,s=o?e.name:"New thread",l=this._justRevealed.has(e.id),u=this._openMenuId===e.id,c={row:!0,active:a,archived:e.archived,"menu-open":u,"menu-up":u&&n>1&&t>=n/2},d=0===(i=e.id).length||/[\s"'<>=]/.test(i)?null:`row:${i}`,h=(0,r.qy)`<span class=${b({"row-name":!0,placeholder:!o,revealed:l})} part="row-name">
944      <span class="row-name-text">${s}</span>
945    </span>`;return(0,r.qy)`
946      <li
947        class=${b(c)}
948        part=${a?"row row-active":"row"}
949        role="option"
950        aria-selected=${a?"true":"false"}
951        tabindex="0"
952        data-thread-id=${e.id}
953        @click=${()=>{this._openMenuId=null,this._emit("thread-selected",{threadId:e.id})}}
954        @keydown=${t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),this._openMenuId=null,this._emit("thread-selected",{threadId:e.id}))}}
955      >
956        ${null!==d?(0,r.qy)`<slot name=${d}>${h}</slot>`:h}
957        <button
958          class="row-menu"
959          part="row-menu"
960          aria-label=${`Actions for ${s}`}
961          aria-haspopup="menu"
962          aria-expanded=${u}
963          @click=${t=>{t.stopPropagation(),this._openMenuId=u?null:e.id}}
964        >
965          ${S}
966        </button>
967        ${u?(0,r.qy)`<div
968              class="row-menu-popover"
969              part="row-menu-popover"
970              role="menu"
971            >
972              ${e.archived?(0,r.qy)`<button
973                    class="row-menu-item"
974                    part="row-unarchive"
975                    role="menuitem"
976                    aria-label=${`Unarchive thread ${s}`}
977                    @click=${t=>{t.stopPropagation(),this._openMenuId=null,this._emit("unarchive",{threadId:e.id})}}
978                  >
979                    ${k}<span>Unarchive</span>
980                  </button>`:(0,r.qy)`<button
981                    class="row-menu-item"
982                    part="row-archive"
983                    role="menuitem"
984                    aria-label=${`Archive thread ${s}`}
985                    @click=${t=>{t.stopPropagation(),this._openMenuId=null,this._emit("archive",{threadId:e.id})}}
986                  >
987                    ${T}<span>Archive</span>
988                  </button>`}
989              <button
990                class="row-menu-item danger"
991                part="row-delete"
992                role="menuitem"
993                aria-label=${`Delete thread ${s}`}
994                @click=${t=>{t.stopPropagation(),this._openMenuId=null,this._confirmingDeleteId=e.id}}
995              >
996                ${_}<span>Delete</span>
997              </button>
998            </div>`:r.s6}
999      </li>
1000    `}_renderFetchMore(){return E(this.fetchMoreError)?(0,r.qy)`
1001        <div class="fetch-more-error" part="fetch-more-error" role="alert">
1002          Couldn't load more —
1003          <button
1004            class="row-action"
1005            part="fetch-more-retry"
1006            @click=${()=>this._emit("retry",{scope:"fetch-more"})}
1007          >
1008            retry
1009          </button>
1010        </div>
1011      `:this.fetchingMore?(0,r.qy)`
1012        <div class="state" part="fetching-more" aria-busy="true">Loading more…</div>
1013      `:this.hasMore?(0,r.qy)`
1014        <button
1015          class="load-more"
1016          part="load-more"
1017          @click=${()=>this._emit("load-more",{})}
1018        >
1019          Load more
1020        </button>
1021      `:r.s6}_renderMemories(){return(0,r.qy)`
1022      <div class="memories" part="memories" ?hidden=${!this._hasMemories}>
1023        <slot
1024          name="memories"
1025          @slotchange=${e=>{this._hasMemories=e.target.assignedElements().length>0}}
1026        ></slot>
1027      </div>
1028    `}_renderFooter(){return(0,r.qy)`
1029      <div class="footer" part="footer" ?hidden=${!this._hasFooter}>
1030        <slot
1031          name="footer"
1032          @slotchange=${e=>{this._hasFooter=e.target.assignedElements().length>0}}
1033        ></slot>
1034      </div>
1035    `}_renderConfirmDialog(){let e=this._confirmingDeleteId;return(0,r.qy)`
1036      <dialog
1037        class="dialog"
1038        part="confirm-dialog"
1039        role="alertdialog"
1040        aria-label="Confirm delete"
1041        data-testid="drawer-confirm-delete"
1042        @cancel=${e=>{e.preventDefault(),this._confirmingDeleteId=null}}
1043        @click=${e=>{e.target===e.currentTarget&&(this._confirmingDeleteId=null)}}
1044      >
1045        ${null!==e?(0,r.qy)`
1046                <p>Delete this thread? This cannot be undone.</p>
1047                <div class="dialog-actions">
1048                  <button
1049                    class="row-action"
1050                    part="confirm-cancel"
1051                    @click=${()=>this._confirmingDeleteId=null}
1052                  >
1053                    Cancel
1054                  </button>
1055                  <button
1056                    class="primary"
1057                    part="confirm-delete"
1058                    @click=${()=>{this._confirmingDeleteId=null,this._emit("delete",{threadId:e})}}
1059                  >
1060                    Delete
1061                  </button>
1062                </div>
1063              `:r.s6}
1064      </dialog>
1065    `}};function I(){"undefined"==typeof customElements||customElements.get(y)||customElements.define(y,C)}},38220:(e,t,n)=>{n.d(t,{y:()=>a});var r=n(17032);let i={}.hasOwnProperty;function a(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let a,o=(i.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];if(s)for(a in s){i.call(o,a)||(o[a]=[]);let e=s[a];!function(e,t){let n=-1,i=[];for(;++n<t.length;)("after"===t[n].add?e:i).push(t[n]);(0,r.m)(e,0,0,i)}(o[a],Array.isArray(e)?e:e?[e]:[])}}}(t,e[n]);return t}},39097:(e,t,n)=>{n.d(t,{T:()=>r});function r(e){return"function"==typeof e}},40712:(e,t,n)=>{n.d(t,{$:()=>a});var r=n(45037),i=n(39097);function a(e,t){var n=(0,i.T)(e)?e:function(){return e},a=function(e){return e.error(n())};return new r.c(t?function(e){return t.schedule(a,0,e)}:a)}},41006:(e,t,n)=>{n.d(t,{W:()=>r});function r(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}},41423:(e,t,n)=>{n.d(t,{Q:()=>o});var r=n(20437),i=n(96948),a=n(28400);function o(e,t){return void 0===t&&(t=0),(0,i.N)(function(n,i){n.subscribe((0,a._)(i,function(n){return(0,r.N)(i,e,function(){return i.next(n)},t)},function(){return(0,r.N)(i,e,function(){return i.complete()},t)},function(n){return(0,r.N)(i,e,function(){return i.error(n)},t)}))})}},41449:(e,t,n)=>{n.d(t,{Kn:()=>l,yU:()=>s,Uv:()=>u});var r=n(71450),i=n(39097),a=(0,n(10899).L)(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}}),o=n(12668),s=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,n,o,s,l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var u=(0,r.Ju)(l),d=u.next();!d.done;d=u.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}else l.remove(this);var h=this.initialTeardown;if((0,i.T)(h))try{h()}catch(e){s=e instanceof a?e.errors:[e]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var f=(0,r.Ju)(p),m=f.next();!m.done;m=f.next()){var g=m.value;try{c(g)}catch(e){s=null!=s?s:[],e instanceof a?s=(0,r.fX)((0,r.fX)([],(0,r.zs)(s)),(0,r.zs)(e.errors)):s.push(e)}}}catch(e){n={error:e}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}}if(s)throw new a(s)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)c(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(n=this._finalizers)?n:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&(0,o.o)(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&(0,o.o)(n,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}(),l=s.EMPTY;function u(e){return e instanceof s||e&&"closed"in e&&(0,i.T)(e.remove)&&(0,i.T)(e.add)&&(0,i.T)(e.unsubscribe)}function c(e){(0,i.T)(e)?e():e.unsubscribe()}},42421:(e,t,n)=>{n.d(t,{v:()=>r});function r(e){return e instanceof Date&&!isNaN(e)}}
1065,42764:(e,t,n)=>{n.d(t,{p:()=>a});var r=n(96948),i=n(28400);function a(e,t){return(0,r.N)(function(n,r){var a=0;n.subscribe((0,i._)(r,function(n){return e.call(t,n,a++)&&r.next(n)}))})}},43198:(e,t,n)=>{n.d(t,{t:()=>i});var r=n(71450),i=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return(0,r.C6)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n.closed||t.next(this._value),n},t.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,n=this._value;if(e)throw t;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(n(31536).B)},43279:(e,t,n)=>{n.d(t,{Q:()=>s});var r=n(96948),i=n(28400),a=n(8286),o=n(34793);function s(e){return(0,r.N)(function(t,n){(0,a.Tg)(e).subscribe((0,i._)(n,function(){return n.complete()},o.l)),n.closed||t.subscribe(n)})}},43633:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},43756:(e,t,n)=>{n.d(t,{t:()=>a});var r=n(45037),i=n(34793),a=new r.c(i.l)},44193:(e,t,n)=>{n.d(t,{G:()=>a,eq:()=>i});var r=n(88658);
1065let i=r.ZS.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class a extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(r);else if("invalid_return_type"===i.code)r(i.returnTypeError);else if("invalid_arguments"===i.code)r(i.argumentsError);else if(0===i.path.length)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof a))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.ZS.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}a.create=e=>new a(e)},44289:(e,t,n)=>{n.d(t,{q:()=>o});var r=n(71450),i=n(91239),a=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=i.U.now,e}(),o=function(e){function t(t,n){void 0===n&&(n=a.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r}return(0,r.C6)(t,e),t.prototype.flush=function(e){var t,n=this.actions;if(this._active)return void n.push(e);this._active=!0;do if(t=e.execute(e.state,e.delay))break;while(e=n.shift());if(this._active=!1,t){for(;e=n.shift();)e.unsubscribe();throw t}},t}(a)},44379:(e,t,n)=>{let r;function i(e,...t){return"function"==typeof e?e(...t):e}n.d(t,{xG:()=>A});var a=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#l=0;#u=5;#c=!1;#d=!1;#h=null;#p=()=>{this.debugLog("Connected to event bus"),this.#a=!0,this.#c=!1,this.debugLog("Emitting queued events",this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener("tanstack-connect-success",this.#p)};#f=()=>{if(this.#l<this.#u){this.#l++,this.dispatchCustomEvent("tanstack-connect",{});return}this.#n().removeEventListener("tanstack-connect",this.#f),this.#d=!0,this.debugLog("Max retries reached, giving up on connection"),this.stopConnectLoop()};#m=()=>{this.#c||(this.#c=!0,this.#n().addEventListener("tanstack-connect-success",this.#p),this.#f())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(" Initializing event subscription for plugin",this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){null!==this.#o||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#f,this.#s))}stopConnectLoop(){this.#c=!1,null!==this.#o&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog("Stopped connect loop"))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if("undefined"!=typeof globalThis&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog("Using global event target"),globalThis.__TANSTACK_EVENT_TARGET__;if("undefined"!=typeof window&&void 0!==window.addEventListener)return this.debugLog("Using window as event target"),window;let e="undefined"!=typeof EventTarget?new EventTarget:void 0;return void 0===e||void 0===e.addEventListener?(this.debugLog("No event mechanism available, running in non-web environment"),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog("Using new EventTarget as fallback"),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch(e){this.debugLog("Failed to dispatch shim event")}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch(n){this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog("Emitting event to client bus",e),this.dispatchCustomEvent("tanstack-dispatch-event",e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e)return void this.debugLog("Event bus client is disabled, not emitting event",e,t);if(this.#h&&(this.debugLog("Emitting event to internal event target",e,t),this.#h.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d)return void this.debugLog("Previously failed to connect, not emitting to bus");if(!this.#a){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#i.push(this.createEventPayload(e,t)),"undefined"==typeof CustomEvent||this.#c||(this.#m(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#h||(this.#h=new EventTarget),this.#h.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog("Event bus client is disabled, not registering event",i),()=>{};let a=e=>{this.debugLog("Received event from bus",e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog("Registered event to bus",i),()=>{r&&this.#h?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{e(t.detail)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog("Event bus client is disabled, not registering event"),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener("tanstack-devtools-global",t),()=>this.#n().removeEventListener("tanstack-devtools-global",t)}};let o=new Map;function s(e){if(void 0!==e)try{return JSON.parse(JSON.stringify(e))}catch{return null}}let l=new class extends a{constructor(e){super({pluginId:"pacer",debug:e?.debug,reconnectEveryMs:1e3})}};var u=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(u||{});
1065function c(e,t,n){let r="object"==typeof e,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}let d=[],h=0,{link:p,unlink:f,propagate:m,checkDirty:g,shallowPropagate:v}=function({update:e,notify:t,unwatched:n}){return{link:function(e,t,n){let r=t.depsTail;if(void 0!==r&&r.dep===e)return;let i=void 0!==r?r.nextDep:t.deps;if(void 0!==i&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(void 0!==a&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};void 0!==i&&(i.prevDep=o),void 0!==r?r.nextDep=o:t.deps=o,void 0!==a?a.nextSub=o:e.subs=o},unlink:function(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return void 0!==a?a.prevDep=i:t.depsTail=i,void 0!==i?i.nextDep=a:t.deps=a,void 0!==o?o.prevSub=s:r.subsTail=s,void 0!==s?s.nextSub=o:void 0===(r.subs=o)&&n(r),a},propagate:function(e){let n,r=e.nextSub;e:for(;;){let i=e.sub,a=i.flags;if(60&a?12&a?4&a?!(48&a)&&function(e,t){let n=t.depsTail;for(;void 0!==n;){if(n===e)return!0;n=n.prevDep}return!1}(e,i)?(i.flags=40|a,a&=1):a=0:i.flags=-9&a|32:a=0:i.flags=32|a,2&a&&t(i),1&a){let t=i.subs;if(void 0!==t){let i=(e=t).nextSub;void 0!==i&&(n={value:r,prev:n},r=i);continue}}if(void 0!==(e=r)){r=e.nextSub;continue}for(;void 0!==n;
1065)if(e=n.value,n=n.prev,void 0!==e){r=e.nextSub;continue e}break}},checkDirty:function(t,n){let i,a=0,o=!1;e:for(;;){let s=t.dep,l=s.flags;if(16&n.flags)o=!0;else if((17&l)==17){if(e(s)){let e=s.subs;void 0!==e.nextSub&&r(e),o=!0}}else if((33&l)==33){(void 0!==t.nextSub||void 0!==t.prevSub)&&(i={value:t,prev:i}),t=s.deps,n=s,++a;continue}if(!o){let e=t.nextDep;if(void 0!==e){t=e;continue}}for(;a--;){let a=n.subs,s=void 0!==a.nextSub;if(s?(t=i.value,i=i.prev):t=a,o){if(e(n)){s&&r(a),n=t.sub;continue}o=!1}else n.flags&=-33;n=t.sub;let l=t.nextDep;if(void 0!==l){t=l;continue e}}return o}},shallowPropagate:r};function r(e){do{let n=e.sub,r=n.flags;(48&r)==32&&(n.flags=16|r,(6&r)==2&&t(n))}while(void 0!==(e=e.nextSub))}}({update:e=>e._update(),notify(e){d[y++]=e,e.flags&=~u.Watching},unwatched(e){void 0!==e.depsTail&&(e.depsTail=void 0,e.flags=u.Mutable|u.Dirty,E(e))}}),b=0,y=0;function E(e){let t=e.depsTail,n=void 0!==t?t.nextDep:e.deps;for(;void 0!==n;)n=f(n,e)}class T{constructor(e){this.atom=function(e,t){let n="function"==typeof e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?u.None:u.Mutable,get:()=>(void 0!==r&&p(i,r,h),i._snapshot),subscribe(e){let t=c(e),n={current:!1},a=function(e){let t=()=>{let t=r;r=n,++h,n.depsTail=void 0,n.flags=u.Watching|u.RecursedCheck;try{return e()}finally{r=t,n.flags&=~u.RecursedCheck,E(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:u.Watching|u.RecursedCheck,notify(){let e=this.flags;e&u.Dirty||e&u.Pending&&g(this.deps,this)?t():this.flags=u.Watching},stop(){this.flags=u.None,this.depsTail=void 0,E(this)}};return t(),n}(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{a.stop()}}},_update(t){let a=r,o=(void 0)??Object.is;if(n)r=i,++h,i.depsTail=void 0;else if(void 0===t)return!1;n&&(i.flags=u.Mutable|u.RecursedCheck);try{let r=i._snapshot,a="function"==typeof t?t(r):void 0===t&&n?e(r):t;if(void 0===r||!o(r,a))return i._snapshot=a,!0;return!1}finally{r=a,n&&(i.flags&=~u.RecursedCheck),E(i)}}};return n?(i.flags=u.Mutable|u.Dirty,i.get=function(){let e=i.flags;if(e&u.Dirty||e&u.Pending&&g(i.deps,i)){if(i._update()){let e=i.subs;void 0!==e&&v(e)}}else e&u.Pending&&(i.flags=e&~u.Pending);return void 0!==r&&p(i,r,h),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;if(void 0!==e&&(m(e),v(e),1)){for(;b<y;){let e=d[b];d[b++]=void 0,e.notify()}b=0,y=0}}},i}(e)}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(c(e))}}function k(){return{executionCount:0,isPending:!1,lastArgs:void 0,lastExecutionTime:0,nextExecutionTime:0,status:"idle",maybeExecuteCount:0}}let _={enabled:!0,leading:!0,trailing:!0,wait:0};var A=class{#g;constructor(e,t){this.fn=e,this.store=new T(k()),this.setOptions=e=>{this.options={...this.options,...e},this.#v()||this.cancel()},this.maybeExecute=(...e)=>{this.#b({maybeExecuteCount:this.store.state.maybeExecuteCount+1});let t=Date.now(),n=t-this.store.state.lastExecutionTime,r=this.#y();if(this.options.leading&&n>=r)this.#E(...e);else if(this.#b({lastArgs:e}),!this.#g&&this.options.trailing){let e=r-(this.store.state.lastExecutionTime?t-this.store.state.lastExecutionTime:0);this.#b({isPending:!0}),this.#g=setTimeout(()=>{let{lastArgs:e}=this.store.state;void 0!==e&&this.#E(...e)},e)}},this.flush=()=>{this.store.state.isPending&&this.store.state.lastArgs&&this.#E(...this.store.state.lastArgs)},this.cancel=()=>{this.#T(),this.#b({lastArgs:void 0,isPending:!1})},this.reset=()=>{this.#b(k())},this.key=t.key,this.options={..._,...t},this.#b(this.options.initialState??{}),this.key&&l.on("d-Throttler",e=>{e.payload.key===this.key&&(this.#b(e.payload.store.state),this.setOptions(e.payload.options))})}#b=e=>{this.store.setState(t=>{let n={...t,...e},{isPending:r}=n;return{...n,status:this.#v()?r?"pending":"idle":"disabled"}}),((e,t)=>{let n=t.key;n&&(o.set(n,t),l.emit(e,function(e){var t;return{key:e.key,store:{state:s("function"==typeof(t=e.store).get?t.get():t.state)},options:s(e.options)}}({...t,key:n})))})("Throttler",this)};#v=()=>!!i(this.options.enabled,this);#y=()=>i(this.options.wait,this);#E=(...e)=>{if(!this.#v())return;this.fn(...e);let t=Date.now(),n=t+this.#y();this.#T(),this.#b({executionCount:this.store.state.executionCount+1,lastExecutionTime:t,nextExecutionTime:n,isPending:!1,lastArgs:void 0}),this.options.onExecute?.(e,this),setTimeout(()=>{this.store.state.isPending||this.#b({nextExecutionTime:void 0})},this.#y())};#T=()=>{this.#g&&(clearTimeout(this.#g),this.#g=void 0)}}}
1065,44599:(e,t,n)=>{n.d(t,{Ay:()=>d});let r="object"==typeof self?self:globalThis,i=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw TypeError("unable to deserialize "+e)}return new r[e](t)},a=e=>((e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=a=>{if(e.has(a))return e.get(a);let[o,s]=t[a];switch(o){case 0:case -1:return n(s,a);case 1:{let e=n([],a);for(let t of s)e.push(r(t));return e}case 2:{let e=n({},a);for(let[t,n]of s)e[r(t)]=r(n);return e}case 3:return n(new Date(s),a);case 4:{let{source:e,flags:t}=s;return n(new RegExp(e,t),a)}case 5:{let e=n(new Map,a);for(let[t,n]of s)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,a);for(let t of s)e.add(r(t));return e}case 7:{let{name:e,message:t}=s;return n(i(e,t),a)}case 8:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{let{buffer:e}=new Uint8Array(s);return n(new DataView(e),s)}}return n(i(o,s),a)};return r})(new Map,e)(0),{toString:o}={},{keys:s}=Object,l=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=o.call(e).slice(8,-1);switch(n){case"Array":return[1,""];case"Object":return[2,""];case"Date":return[3,""];case"RegExp":return[4,""];case"Map":return[5,""];case"Set":return[6,""];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},u=([e,t])=>0===e&&("function"===t||"symbol"===t),c=(e,{json:t,lossy:n}={})=>{let r=[];return((e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,c]=l(r);switch(o){case 0:{let t=r;switch(c){case"bigint":o=8,t=r.toString();break;case"function":case"symbol":if(e)throw TypeError("unable to serialize "+c);t=null;break;case"undefined":return i([-1],r)}return i([o,t],r)}case 1:{if(c){let e=r;return"DataView"===c?e=new Uint8Array(r.buffer):"ArrayBuffer"===c&&(e=new Uint8Array(r)),i([c,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(c)switch(c){case"BigInt":return i([c,r.toString()],r);case"Boolean":case"Number":case"String":return i([c,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());let n=[],d=i([o,n],r);for(let t of s(r))(e||!u(l(r[t])))&&n.push([a(t),a(r[t])]);return d}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);
1065for(let[n,i]of r)(e||!(u(l(n))||u(l(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!u(l(n)))&&t.push(a(n));return n}}let{message:d}=r;return i([o,{name:c,message:d}],r)};return a})(!(t||n),!!t,new Map,r)(e),r},d="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?a(c(e,t)):structuredClone(e):(e,t)=>a(c(e,t))},44725:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},44831:(e,t,n)=>{n.d(t,{qW:()=>h});var r,i=n(12115),a=n(92556),o=n(97602),s=n(94446),l=n(70222),u=n(95155),c="dismissableLayer.update",d=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),h=i.forwardRef((e,t)=>{var n,h;let{disableOutsidePointerEvents:m=!1,deferPointerDownOutside:g=!1,onEscapeKeyDown:v,onPointerDownOutside:b,onFocusOutside:y,onInteractOutside:E,onDismiss:T,...k}=e,_=i.useContext(d),[A,x]=i.useState(null),w=null!=(h=null==A?void 0:A.ownerDocument)?h:null==(n=globalThis)?void 0:n.document,[,S]=i.useState({}),C=(0,s.s)(t,e=>
1065x(e)),I=Array.from(_.layers),[N]=[..._.layersWithOutsidePointerEventsDisabled].slice(-1),O=I.indexOf(N),R=A?I.indexOf(A):-1,D=_.layersWithOutsidePointerEventsDisabled.size>0,L=R>=O,P=i.useRef(!1),M=function(e,t){var n;let{ownerDocument:r=null==(n=globalThis)?void 0:n.document,deferPointerDownOutside:a=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s}=t,u=(0,l.c)(e),c=i.useRef(!1),d=i.useRef(!1),h=i.useRef(new Map),p=i.useRef(()=>{});return i.useEffect(()=>{function e(){d.current=!1,o.current=!1,h.current.clear()}function t(e){if(!d.current)return;let t=e.target;t instanceof Node&&[...s].some(e=>e.contains(t))||h.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{d.current&&p.current()},0)}function n(e){d.current&&h.current.set(e.type,!1)}let i=t=>{if(t.target&&!c.current){let n=function(){r.removeEventListener("click",p.current);let t=Array.from(h.current.values()).some(Boolean);e(),t||f("dismissableLayer.pointerDownOutside",u,i,{discrete:!0})},i={originalEvent:t};d.current=!0,o.current=a&&0===t.button,h.current.clear(),a&&0===t.button?(r.removeEventListener("click",p.current),p.current=n,r.addEventListener("click",p.current,{once:!0})):n()}else r.removeEventListener("click",p.current),e();c.current=!1},l=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let e of l)r.addEventListener(e,t,!0),r.addEventListener(e,n);let m=window.setTimeout(()=>{r.addEventListener("pointerdown",i)},0);return()=>{for(let e of(window.clearTimeout(m),r.removeEventListener("pointerdown",i),r.removeEventListener("click",p.current),l))r.removeEventListener(e,t,!0),r.removeEventListener(e,n)}},[r,u,a,o,s]),{onPointerDownCapture:()=>c.current=!0}}(e=>{let t=e.target;if(!(t instanceof Node))return;let n=[..._.branches].some(e=>e.contains(t));L&&!n&&(null==b||b(e),null==E||E(e),e.defaultPrevented||null==T||T())},{ownerDocument:w,deferPointerDownOutside:g,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:_.dismissableSurfaces}),F=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null==(t=globalThis)?void 0:t.document,r=(0,l.c)(e),a=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!a.current&&f("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}(e=>{if(g&&P.current)return;let t=e.target;![..._.branches].some(e=>e.contains(t))&&(null==y||y(e),null==E||E(e),e.defaultPrevented||null==T||T())},w);return!function(e,t=globalThis?.document){let n=(0,l.c)(e);i.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{R===_.layers.size-1&&(null==v||v(e),!e.defaultPrevented&&T&&(e.preventDefault(),T()))},w),i.useEffect(()=>{if(A)return m&&(0===_.layersWithOutsidePointerEventsDisabled.size&&(r=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),_.layersWithOutsidePointerEventsDisabled.add(A)),_.layers.add(A),p(),()=>{m&&(_.layersWithOutsidePointerEventsDisabled.delete(A),0===_.layersWithOutsidePointerEventsDisabled.size&&(w.body.style.pointerEvents=r))}},[A,w,m,_]),i.useEffect(()=>()=>{A&&(_.layers.delete(A),_.layersWithOutsidePointerEventsDisabled.delete(A),p())},[A,_]),i.useEffect(()=>{let e=()=>S({});return document.addEventListener(c,e),()=>document.removeEventListener(c,e)},[]),(0,u.jsx)(o.sG.div,{...k,ref:C,style:{pointerEvents:D?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,a.mK)(e.onFocusCapture,F.onFocusCapture),onBlurCapture:(0,a.mK)(e.onBlurCapture,F.onBlurCapture),onPointerDownCapture:(0,a.mK)(e.onPointerDownCapture,M.onPointerDownCapture)})});function p(){let e=new CustomEvent(c);document.dispatchEvent(e)}function f(e,t,n,r){let{discrete:i}=r,a=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),i?(0,o.hO)(a,s):a.dispatchEvent(s)}h.displayName="DismissableLayer",i.forwardRef((e,t)=>{let n=i.useContext(d),r=i.useRef(null),a=(0,s.s)(t,r);return i.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,u.jsx)(o.sG.div,{...e,ref:a})}).displayName="DismissableLayerBranch"},45037:(e,t,n)=>{n.d(t,{c:()=>c});var r=n(28786),i=n(41449),a=n(60488),o=n(89577),s=n(29846),l=n(39097),u=n(75968),c=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var a=this,o=!function(e){return e&&e instanceof r.vU||e&&(0,l.T)(e.next)&&(0,l.T)(e.error)&&(0,l.T)(e.complete)&&(0,i.Uv)(e)}(e)?new r.Ms(e,t,n):e;return(0,u.Y)(function(){var e=a.operator,t=a.source;o.add(e?e.call(o,t):t?a._subscribe(o):a._trySubscribe(o))}),o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=d(t))(function(t,i){var a=new r.Ms({next:function(t){try{e(t)}catch(e){i(e),a.unsubscribe()}},error:i,complete:t});n.subscribe(a)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[a.s]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,o.m)(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=d(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function d(e){var t;return null!=(t=null!=e?e:s.$.Promise)?t:Promise}},45150:(e,t,n)=>{n.d(t,{Ar:()=>nO,qB:()=>nR,T7:()=>nb,E7:()=>nv,N4:()=>t0,BR:()=>nt,I$:()=>tJ,bt:()=>ng,l8:()=>nn});var r,i={};n.r(i),n.d(i,{JsonPatchError:()=>b,_areEquals:()=>C,applyOperation:()=>_,applyPatch:()=>A,applyReducer:()=>x,deepClone:()=>y,getValueByPointer:()=>k,validate:()=>S,validator:()=>w});var a={};n.r(a),n.d(a,{compare:()=>M,generate:()=>L,observe:()=>D,unobserve:()=>R});var o=n(33859),s=n(48204),l=function(){var e=function(t,n){return(e=Object.setPrototypeOf||({__proto__:[]}
vendor: 2,001 bytes, line 1065
1065)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=Object.prototype.hasOwnProperty;function c(e,t){return u.call(e,t)}function d(e){if(Array.isArray(e)){for(var t=Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var r=[];for(var i in e)c(e,i)&&r.push(i);return r}function h(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function p(e){for(var t,n=0,r=e.length;n<r;){if((t=e.charCodeAt(n))>=48&&t<=57){n++;continue}return!1}return!0}function f(e){return -1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function m(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function g(e,t){var n=[e];for(var r in t){var i="object"==typeof t[r]?JSON.stringify(t[r],null,2):t[r];void 0!==i&&n.push(r+": "+i)}return n.join("\n")}var v=function(e){function t(t,n,r,i,a){var o=this.constructor,s=e.call(this,g(t,{name:n,index:r,operation:i,tree:a}))||this;return s.name=n,s.index=r,s.operation=i,s.tree=a,Object.setPrototypeOf(s,o.prototype),s.message=g(t,{name:n,index:r,operation:i,tree:a}),s}return l(t,e),t}(Error),b=v,y=h,E={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=k(n,this.path);r&&(r=h(r));var i=_(n,{op:"remove",path:this.from}).removed;return _(n,{op:"add",path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=k(n,this.from);return _(n,{op:"add",path:this.path,value:h(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:C(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}}
1065,T={add:function(e,t,n){return p(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:E.move,copy:E.copy,test:E.test,_get:E._get};function k(e,t){if(""==t)return e;var n={op:"_get",path:t};return _(e,n),n.value}function _(e,t,n,r,i,a){if(void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===i&&(i=!0),void 0===a&&(a=0),n&&("function"==typeof n?n(t,0,e,t.path):w(t,0)),""===t.path){var o={newDocument:e};if("add"===t.op)return o.newDocument=t.value,o;if("replace"===t.op)return o.newDocument=t.value,o.removed=e,o;if("move"===t.op||"copy"===t.op)return o.newDocument=k(e,t.from),"move"===t.op&&(o.removed=e),o;else if("test"===t.op){if(o.test=C(e,t.value),!1===o.test)throw new b("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o.newDocument=e,o}else if("remove"===t.op)return o.removed=e,o.newDocument=null,o;else if("_get"===t.op)return t.value=e,o;else if(!n)return o;else throw new b("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e)}r||(e=h(e));var s=(t.path||"").split("/"),l=e,u=1,c=s.length,d=void 0,f=void 0,g=void 0;for(g="function"==typeof n?n:w;;){if((f=s[u])&&-1!=f.indexOf("~")&&(f=m(f)),i&&("__proto__"==f||"prototype"==f&&u>0&&"constructor"==s[u-1]))throw TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&void 0===d&&(void 0===l[f]?d=s.slice(0,u).join("/"):u==c-1&&(d=t.path),void 0!==d&&g(t,0,e,d)),u++,Array.isArray(l)){if("-"===f)f=l.length;else if(n&&!p(f))throw new b("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);else p(f)&&(f=~~f);if(u>=c){if(n&&"add"===t.op&&f>l.length)throw new b("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var o=T[t.op].call(t,l,f,e);if(!1===o.test)throw new b("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}}else if(u>=c){var o=E[t.op].call(t,l,f,e);if(!1===o.test)throw new b("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return o}if(l=l[f],n&&u<c&&(!l||"object"!=typeof l))throw new b("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}function A(e,t,n,r,i){if(void 0===r&&(r=!0),void 0===i&&(i=!0),n&&!Array.isArray(t))throw new b("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=h(e));for(var a=Array(t.length),o=0,s=t.length;o<s;o++)a[o]=_(e,t[o],n,!0,i,o),e=a[o].newDocument;return a.newDocument=e,a}function x(e,t,n){var r=_(e,t);if(!1===r.test)throw new b("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function w(e,t,n,r){if("object"!=typeof e||null===e||Array.isArray(e))throw new b("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(E[e.op]){if("string"!=typeof e.path)throw new b("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);else if(0!==e.path.indexOf("/")&&e.path.length>0)throw new b('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);else if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new b("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);else if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new b("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);else if(("add"===e.op||"replace"===e.op||"test"===e.op)&&function e(t){if(void 0===t)return!0;if(t){if(Array.isArray(t)){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return!0}else if("object"==typeof t){for(var i=d(t),a=i.length,o=0;o<a;o++)if(e(t[i[o]]))return!0}}return!1}(e.value))throw new b("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);else if(n){if("add"==e.op){var i=e.path.split("/").length,a=r.split("/").length;if(i!==a+1&&i!==a)throw new b("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new b("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var o=S([{op:"_get",path:e.from,value:void 0}],n);if(o&&"OPERATION_PATH_UNRESOLVABLE"===o.name)throw new b("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new b("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function S(e,t,n){try{if(!Array.isArray(e))throw new b("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)A(h(t),h(e),n||!0);else{n=n||w;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(e){if(e instanceof b)return e;throw e}}function C(e,t){if(e===t)return!0;
1065if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,r,i,a=Array.isArray(e),o=Array.isArray(t);if(a&&o){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!C(e[n],t[n]))return!1;return!0}if(a!=o)return!1;var s=Object.keys(e);if((r=s.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!t.hasOwnProperty(s[n]))return!1;for(n=r;0!=n--;)if(!C(e[i=s[n]],t[i]))return!1;return!0}return e!=e&&t!=t}var I=new WeakMap,N=function(e){this.observers=new Map,this.obj=e},O=function(e,t){this.callback=e,this.observer=t};function R(e,t){t.unobserve()}function D(e,t){var n=I.get(e);if(n){var r,i=n.observers.get(t);r=i&&i.observer}else n=new N(e),I.set(e,n);if(r)return r;if(r={},n.value=h(e),t){r.callback=t,r.next=null;var a=function(){L(r)},o=function(){clearTimeout(r.next),r.next=setTimeout(a)};"undefined"!=typeof window&&(window.addEventListener("mouseup",o),window.addEventListener("keyup",o),window.addEventListener("mousedown",o),window.addEventListener("keydown",o),window.addEventListener("change",o))}return r.patches=[],r.object=e,r.unobserve=function(){var e,t;L(r),clearTimeout(r.next),e=n,t=r,e.observers.delete(t.callback),"undefined"!=typeof window&&(window.removeEventListener("mouseup",o),window.removeEventListener("keyup",o),window.removeEventListener("mousedown",o),window.removeEventListener("keydown",o),window.removeEventListener("change",o))},n.observers.set(t,new O(t,r)),r}function L(e,t){void 0===t&&(t=!1);var n=I.get(e.object);P(n.value,e.object,e.patches,"",t),e.patches.length&&A(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function P(e,t,n,r,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var a=d(t),o=d(e),s=!1,l=o.length-1;l>=0;l--){var u=o[l],p=e[u];if(c(t,u)&&(void 0!==t[u]||void 0===p||!1!==Array.isArray(t))){var m=t[u];"object"==typeof p&&null!=p&&"object"==typeof m&&null!=m&&Array.isArray(p)===Array.isArray(m)?P(p,m,n,r+"/"+f(u),i):p!==m&&(i&&n.push({op:"test",path:r+"/"+f(u),value:h(p)}),n.push({op:"replace",path:r+"/"+f(u),value:h(m)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+f(u),value:h(p)}),n.push({op:"remove",path:r+"/"+f(u)}),s=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(s||a.length!=o.length)for(var l=0;l<a.length;l++){var u=a[l];c(e,u)||void 0===t[u]||n.push({op:"add",path:r+"/"+f(u),value:h(t[u])})}}}function M(e,t,n){void 0===n&&(n=!1);var r=[];return P(e,t,r,"",n),r}let F=Object.assign({},i,a,{JsonPatchError:v,deepClone:h,escapePathComponent:f,unescapePathComponent:m});var B=n(85755),j=n(47211),U=n(40712),H=n(78242),$=n(78842),z=n(45037),G=n(31536),Y=n(37305),q=n(64354),V=n(29396),W=n(20981),K=n(89577),Z=n(39097);function X(e,t){return(0,Z.T)(t)?(0,q.Z)(e,t,1):(0,q.Z)(e,1)}var Q=n(81933),J=n(96948),ee=n(28400),et=n(91436);n(42764);var en=n(63704),er=n(43279),ei=n(77133),ea=n(29279);function eo(e){return" \r\n	".indexOf(e)>=0}function es(e){for(var t,n,r,i=["topLevel"],a=0,o=function(e){return i.push(e)},s=function(e){return i[i.length-1]=e},l=function(e){null==t&&(t=a,n=i.length,r=e)},u=function(e){e===r&&(t=void 0,n=void 0,r=void 0)},c=function(){return i.pop()},d=function(){return a--},h=function(e){if("0"<=e&&e<="9")return void o("number");switch(e){case'"':o("string");return;case"-":o("numberNeedsDigit");return;case"t":o("true");return;case"f":o("false");return;case"n":o("null");return;case"[":o("arrayNeedsValue");return;case"{":o("objectNeedsKey");return}},p=e.length;a<p;a++){var f=e[a];switch(i[i.length-1]){case"topLevel":h(f);break;case"string":switch(f){case'"':c();break;case"\\":l("stringEscape"),o("stringEscaped")}break;case"stringEscaped":"u"===f?o("stringUnicode"):(u("stringEscape"),c());break;case"stringUnicode":a-e.lastIndexOf("u",a)==4&&(u("stringEscape"),c());break;case"number":"."===f?s("numberNeedsDigit"):"e"===f||"E"===f?s("numberNeedsExponent"):(f<"0"||f>"9")&&(d(),c());break;case"numberNeedsDigit":s("number");break;case"numberNeedsExponent":s("+"===f||"-"===f?"numberNeedsDigit":"number");break;case"true":case"false":case"null":(f<"a"||f>"z")&&(d(),c());break;case"arrayNeedsValue":"]"===f?c():eo(f)||(u("collectionItem"),s("arrayNeedsComma"),h(f));break;case"arrayNeedsComma":"]"===f?c():","===f&&(l("collectionItem"),s("arrayNeedsValue"));break;case"objectNeedsKey":"}"===f?c():'"'===f&&(l("collectionItem"),s("objectNeedsColon"),o("string"));break;case"objectNeedsColon":":"===f&&s("objectNeedsValue");break;case"objectNeedsValue":eo(f)||(u("collectionItem"),s("objectNeedsComma"),h(f));break;case"objectNeedsComma":"}"===f?c():","===f&&(l("collectionItem"),s("objectNeedsKey"))}}null!=n&&(i.length=n);for(var m=[null!=t?e.slice(0,t):e],g=function(t){return m.push(t.slice(e.length-e.lastIndexOf(t[0])))},v=i.length-1;v>=0;
1065v--)switch(i[v]){case"string":m.push('"');break;case"numberNeedsDigit":case"numberNeedsExponent":m.push("0");break;case"true":g("true");break;case"false":g("false");break;case"null":g("null");break;case"arrayNeedsValue":case"arrayNeedsComma":m.push("]");break;case"objectNeedsKey":case"objectNeedsColon":case"objectNeedsValue":case"objectNeedsComma":m.push("}")}return m.join("")}function el(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(15&n)<<28,t=(112&n)>>4,(128&n)==0)return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(127&r)<<n,(128&r)==0)return this.assertBounds(),[e,t]}throw Error("invalid varint")}function eu(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=i>>>7!=0||0!=t,o=(a?128|i:i)&255;if(n.push(o),!a)return}let r=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(n.push((i?128|r:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=r>>>7!=0,a=(i?128|r:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}function ec(e){let t="-"===e[0];t&&(e=e.slice(1));let n=0,r=0;function i(t,i){let a=Number(e.slice(t,i));r*=1e6,(n=1e6*n+a)>=0x100000000&&(r+=n/0x100000000|0,n%=0x100000000)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),t?ep(n,r):eh(n,r)}function ed(e,t){if({lo:e,hi:t}={lo:e>>>0,hi:t>>>0},t<=2097151)return String(0x100000000*t+e);let n=0xffffff&e,r=(e>>>24|t<<8)&0xffffff,i=t>>16&65535,a=n+6777216*r+6710656*i,o=r+8147497*i,s=2*i;return a>=1e7&&(o+=Math.floor(a/1e7),a%=1e7),o>=1e7&&(s+=Math.floor(o/1e7),o%=1e7),s.toString()+ef(o)+ef(a)}function eh(e,t){return{lo:0|e,hi:0|t}}function ep(e,t){return t=~t,e?e=~e+1:t+=1,eh(e,t)}let ef=e=>{let t=String(e);return"0000000".slice(t.length)+t};function em(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(127&e|128),e>>=7;t.push(1)}}function eg(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}var ev=n(87358);let eb=function(){let e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&(globalThis.Deno||"object"!=typeof ev||"object"!=typeof ev.env||"1"!==ev.env.BUF_BIGINT_DISABLE)){let t=BigInt("-9223372036854775808"),n=BigInt("9223372036854775807"),r=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){let r="bigint"==typeof e?e:BigInt(e);if(r>n||r<t)throw Error(`invalid int64: ${e}`);return r},uParse(e){let t="bigint"==typeof e?e:BigInt(e);if(t>i||t<r)throw Error(`invalid uint64: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)),uDec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0))}}return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),ey(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),eE(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),ey(e),ec(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),eE(e),ec(e)),dec:(e,t)=>(function(e,t){let n=eh(e,t),r=0x80000000&n.hi;r&&(n=ep(n.lo,n.hi));let i=ed(n.lo,n.hi);return r?"-"+i:i})(e,t),uDec:(e,t)=>ed(e,t)}}();function ey(e){if(!/^-?[0-9]+$/.test(e))throw Error("invalid int64: "+e)}function eE(e){if(!/^[0-9]+$/.test(e))throw Error("invalid uint64: "+e)}let eT=Symbol.for("@bufbuild/protobuf/text-encoding");function ek(){if(void 0==globalThis[eT]){let e,t=new globalThis.TextEncoder,n=new globalThis.TextDecoder;globalThis[eT]={encodeUtf8:e=>t.encode(e),decodeUtf8:(t,r)=>r?(void 0===e&&(e=new globalThis.TextDecoder("utf-8",{fatal:!0})),e.decode(t)):n.decode(t),checkUtf8(e){try{return encodeURIComponent(e),!0}catch(e){return!1}}}}return globalThis[eT]}!function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"}(r||(r={}));class e_{constructor(e=ek().encodeUtf8){this.encodeUtf8=e,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(ew(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return ex(e),em(e,this.buf),this}bool(e){return this.buf.push(+!!e),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.encodeUtf8(e);return this.uint32(t.byteLength),this.raw(t)}float(e){var t=e;if("string"==typeof t){let e=t;if(Number.isNaN(t=Number(t))&&"NaN"!==e)throw Error("invalid float32: "+e)}else if("number"!=typeof t)throw Error("invalid float32: "+typeof t);
1065if(Number.isFinite(t)&&(t>34028234663852886e22||t<-34028234663852886e22))throw Error("invalid float32: "+t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,e,!0),this.raw(n)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){ew(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){ex(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return ex(e),em(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=eb.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),n=new DataView(t.buffer),r=eb.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=eb.enc(e);return eu(t.lo,t.hi,this.buf),this}sint64(e){let t=eb.enc(e),n=t.hi>>31;return eu(t.lo<<1^n,(t.hi<<1|t.lo>>>31)^n,this.buf),this}uint64(e){let t=eb.uEnc(e);return eu(t.lo,t.hi,this.buf),this}}class eA{constructor(e,t=ek().decodeUtf8){this.decodeUtf8=t,this.varint64=el,this.uint32=eg,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.pos,t=this.uint32(),n=this.pos-e;if(n>5||5==n&&this.buf[this.pos-1]>15)throw Error("illegal tag: varint overflows uint32");let r=t>>>3,i=7&t;if(r<=0||i>5)throw Error("illegal tag: field no "+r+" wire type "+i);return[r,i]}skip(e,t){let n=this.pos;switch(e){case r.Varint:for(;128&this.buf[this.pos++];);break;case r.Bit64:this.pos+=4;case r.Bit32:this.pos+=4;break;case r.LengthDelimited:let i=this.uint32();this.pos+=i;break;case r.StartGroup:for(;;){let[e,n]=this.tag();if(n===r.EndGroup){if(void 0!==t&&e!==t)throw Error("invalid end group tag");break}this.skip(n,e)}break;default:throw Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return eb.dec(...this.varint64())}uint64(){return eb.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(1&e);return e=(e>>>1|(1&t)<<31)^n,t=t>>>1^n,eb.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return eb.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return eb.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(e){return this.decodeUtf8(this.bytes(),e)}}function ex(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>0x7fffffff||e<-0x80000000)throw Error("invalid int32: "+e)}function ew(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw Error("invalid uint32: "+typeof e);if(!Number.isInteger(e)||e>0xffffffff||e<0)throw Error("invalid uint32: "+e)}let eS=function(e){return e[e.NULL_VALUE=0]="NULL_VALUE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function eC(){return{fields:{}}}let eI={encode:(e,t=new e_)=>(Object.entries(e.fields).forEach(([e,n])=>{void 0!==n&&eO.encode({key:e,value:n},t.uint32(10).fork()).join()}),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=eC();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:{if(10!==e)break;let t=eO.decode(n,n.uint32());void 0!==t.value&&(i.fields[t.key]=t.value);continue}}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>eI.fromPartial(e??{}),fromPartial(e){let t=eC();return t.fields=Object.entries(e.fields??{}).reduce((e,[t,n])=>(void 0!==n&&(e[t]=n),e),{}),t},wrap(e){let t=eC();if(void 0!==e)for(let n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){let t={};if(e.fields)for(let n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function eN(){return{key:"",value:void 0}}let eO={encode:(e,t=new e_)=>(""!==e.key&&t.uint32(10).string(e.key),void 0!==e.value&&eD.encode(eD.wrap(e.value),t.uint32(18).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=eN();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.key=n.string();continue;case 2:if(18!==e)break;i.value=eD.unwrap(eD.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;
1065n.skip(7&e)}return i},create:e=>eO.fromPartial(e??{}),fromPartial(e){let t=eN();return t.key=e.key??"",t.value=e.value??void 0,t}};function eR(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}let eD={encode:(e,t=new e_)=>(void 0!==e.nullValue&&t.uint32(8).int32(e.nullValue),void 0!==e.numberValue&&t.uint32(17).double(e.numberValue),void 0!==e.stringValue&&t.uint32(26).string(e.stringValue),void 0!==e.boolValue&&t.uint32(32).bool(e.boolValue),void 0!==e.structValue&&eI.encode(eI.wrap(e.structValue),t.uint32(42).fork()).join(),void 0!==e.listValue&&eP.encode(eP.wrap(e.listValue),t.uint32(50).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=eR();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(8!==e)break;i.nullValue=n.int32();continue;case 2:if(17!==e)break;i.numberValue=n.double();continue;case 3:if(26!==e)break;i.stringValue=n.string();continue;case 4:if(32!==e)break;i.boolValue=n.bool();continue;case 5:if(42!==e)break;i.structValue=eI.unwrap(eI.decode(n,n.uint32()));continue;case 6:if(50!==e)break;i.listValue=eP.unwrap(eP.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>eD.fromPartial(e??{}),fromPartial(e){let t=eR();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=eR();if(null===e)t.nullValue=eS.NULL_VALUE;else if("boolean"==typeof e)t.boolValue=e;else if("number"==typeof e)t.numberValue=e;else if("string"==typeof e)t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if("object"==typeof e)t.structValue=e;else if(void 0!==e)throw new globalThis.Error("Unsupported any value type: "+typeof e);return t},unwrap(e){if(void 0!==e.stringValue)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;else if(e?.nullValue!==void 0)return null}};function eL(){return{values:[]}}let eP={encode(e,t=new e_){for(let n of e.values)eD.encode(eD.wrap(n),t.uint32(10).fork()).join();return t},decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=eL();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.values.push(eD.unwrap(eD.decode(n,n.uint32())));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>eP.fromPartial(e??{}),fromPartial(e){let t=eL();return t.values=e.values?.map(e=>e)||[],t},wrap(e){let t=eL();return t.values=e??[],t},unwrap:e=>e?.hasOwnProperty("values")&&globalThis.Array.isArray(e.values)?e.values:e},eM=function(e){return e[e.ADD=0]="ADD",e[e.REMOVE=1]="REMOVE",e[e.REPLACE=2]="REPLACE",e[e.MOVE=3]="MOVE",e[e.COPY=4]="COPY",e[e.TEST=5]="TEST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function eF(){return{op:0,path:"",from:void 0,value:void 0}}let eB={encode:(e,t=new e_)=>(0!==e.op&&t.uint32(8).int32(e.op),""!==e.path&&t.uint32(18).string(e.path),void 0!==e.from&&t.uint32(26).string(e.from),void 0!==e.value&&eD.encode(eD.wrap(e.value),t.uint32(34).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=eF();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(8!==e)break;i.op=n.int32();continue;case 2:if(18!==e)break;i.path=n.string();continue;case 3:if(26!==e)break;i.from=n.string();continue;case 4:if(34!==e)break;i.value=eD.unwrap(eD.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>eB.fromPartial(e??{}),fromPartial(e){let t=eF();return t.op=e.op??0,t.path=e.path??"",t.from=e.from??void 0,t.value=e.value??void 0,t}};function ej(){return{id:"",type:"",function:void 0}}let eU={encode:(e,t=new e_)=>(""!==e.id&&t.uint32(10).string(e.id),""!==e.type&&t.uint32(18).string(e.type),void 0!==e.function&&e$.encode(e.function,t.uint32(26).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=ej();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.id=n.string();continue;case 2:if(18!==e)break;i.type=n.string();continue;case 3:if(26!==e)break;i.function=e$.decode(n,n.uint32());continue}if((7&e)==4||0===e)break;
1065n.skip(7&e)}return i},create:e=>eU.fromPartial(e??{}),fromPartial(e){let t=ej();return t.id=e.id??"",t.type=e.type??"",t.function=void 0!==e.function&&null!==e.function?e$.fromPartial(e.function):void 0,t}};function eH(){return{name:"",arguments:""}}let e$={encode:(e,t=new e_)=>(""!==e.name&&t.uint32(10).string(e.name),""!==e.arguments&&t.uint32(18).string(e.arguments),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=eH();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.name=n.string();continue;case 2:if(18!==e)break;i.arguments=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>e$.fromPartial(e??{}),fromPartial(e){let t=eH();return t.name=e.name??"",t.arguments=e.arguments??"",t}};function ez(){return{value:"",mimeType:""}}let eG={encode:(e,t=new e_)=>(""!==e.value&&t.uint32(10).string(e.value),""!==e.mimeType&&t.uint32(18).string(e.mimeType),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=ez();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.value=n.string();continue;case 2:if(18!==e)break;i.mimeType=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>eG.fromPartial(e??{}),fromPartial(e){let t=ez();return t.value=e.value??"",t.mimeType=e.mimeType??"",t}};function eY(){return{value:"",mimeType:void 0}}let eq={encode:(e,t=new e_)=>(""!==e.value&&t.uint32(10).string(e.value),void 0!==e.mimeType&&t.uint32(18).string(e.mimeType),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=eY();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.value=n.string();continue;case 2:if(18!==e)break;i.mimeType=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>eq.fromPartial(e??{}),fromPartial(e){let t=eY();return t.value=e.value??"",t.mimeType=e.mimeType??void 0,t}};function eV(){return{data:void 0,url:void 0}}let eW={encode:(e,t=new e_)=>(void 0!==e.data&&eG.encode(e.data,t.uint32(10).fork()).join(),void 0!==e.url&&eq.encode(e.url,t.uint32(18).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=eV();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.data=eG.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.url=eq.decode(n,n.uint32());continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>eW.fromPartial(e??{}),fromPartial(e){let t=eV();return t.data=void 0!==e.data&&null!==e.data?eG.fromPartial(e.data):void 0,t.url=void 0!==e.url&&null!==e.url?eq.fromPartial(e.url):void 0,t}},eK={encode:(e,t=new e_)=>(""!==e.text&&t.uint32(10).string(e.text),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i={text:""};for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.text=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>eK.fromPartial(e??{}),fromPartial(e){let t={text:""};return t.text=e.text??"",t}};function eZ(){return{source:void 0,metadata:void 0}}let eX={encode:(e,t=new e_)=>(void 0!==e.source&&eW.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&eD.encode(eD.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=eZ();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=eW.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.metadata=eD.unwrap(eD.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>eX.fromPartial(e??{}),fromPartial(e){let t=eZ();return t.source=void 0!==e.source&&null!==e.source?eW.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function eQ(){return{source:void 0,metadata:void 0}}let eJ={encode:(e,t=new e_)=>(void 0!==e.source&&eW.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&eD.encode(eD.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=eQ();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=eW.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.metadata=eD.unwrap(eD.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;
1065n.skip(7&e)}return i},create:e=>eJ.fromPartial(e??{}),fromPartial(e){let t=eQ();return t.source=void 0!==e.source&&null!==e.source?eW.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function e0(){return{source:void 0,metadata:void 0}}let e1={encode:(e,t=new e_)=>(void 0!==e.source&&eW.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&eD.encode(eD.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=e0();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=eW.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.metadata=eD.unwrap(eD.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>e1.fromPartial(e??{}),fromPartial(e){let t=e0();return t.source=void 0!==e.source&&null!==e.source?eW.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function e2(){return{source:void 0,metadata:void 0}}let e3={encode:(e,t=new e_)=>(void 0!==e.source&&eW.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&eD.encode(eD.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=e2();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=eW.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.metadata=eD.unwrap(eD.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>e3.fromPartial(e??{}),fromPartial(e){let t=e2();return t.source=void 0!==e.source&&null!==e.source?eW.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function e4(){return{text:void 0,image:void 0,audio:void 0,video:void 0,document:void 0}}let e9={encode:(e,t=new e_)=>(void 0!==e.text&&eK.encode(e.text,t.uint32(10).fork()).join(),void 0!==e.image&&eX.encode(e.image,t.uint32(18).fork()).join(),void 0!==e.audio&&eJ.encode(e.audio,t.uint32(26).fork()).join(),void 0!==e.video&&e1.encode(e.video,t.uint32(34).fork()).join(),void 0!==e.document&&e3.encode(e.document,t.uint32(42).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=e4();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.text=eK.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.image=eX.decode(n,n.uint32());continue;case 3:if(26!==e)break;i.audio=eJ.decode(n,n.uint32());continue;case 4:if(34!==e)break;i.video=e1.decode(n,n.uint32());continue;case 5:if(42!==e)break;i.document=e3.decode(n,n.uint32());continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>e9.fromPartial(e??{}),fromPartial(e){let t=e4();return t.text=void 0!==e.text&&null!==e.text?eK.fromPartial(e.text):void 0,t.image=void 0!==e.image&&null!==e.image?eX.fromPartial(e.image):void 0,t.audio=void 0!==e.audio&&null!==e.audio?eJ.fromPartial(e.audio):void 0,t.video=void 0!==e.video&&null!==e.video?e1.fromPartial(e.video):void 0,t.document=void 0!==e.document&&null!==e.document?e3.fromPartial(e.document):void 0,t}};function e5(){return{id:"",role:"",content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0,contentParts:[]}}let e8={encode(e,t=new e_){for(let n of(""!==e.id&&t.uint32(10).string(e.id),""!==e.role&&t.uint32(18).string(e.role),void 0!==e.content&&t.uint32(26).string(e.content),void 0!==e.name&&t.uint32(34).string(e.name),e.toolCalls))eU.encode(n,t.uint32(42).fork()).join();for(let n of(void 0!==e.toolCallId&&t.uint32(50).string(e.toolCallId),void 0!==e.error&&t.uint32(58).string(e.error),e.contentParts))e9.encode(n,t.uint32(66).fork()).join();return t},decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=e5();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.id=n.string();continue;case 2:if(18!==e)break;i.role=n.string();continue;case 3:if(26!==e)break;i.content=n.string();continue;case 4:if(34!==e)break;i.name=n.string();continue;case 5:if(42!==e)break;i.toolCalls.push(eU.decode(n,n.uint32()));continue;case 6:if(50!==e)break;i.toolCallId=n.string();continue;case 7:if(58!==e)break;i.error=n.string();continue;case 8:if(66!==e)break;i.contentParts.push(e9.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;
1065n.skip(7&e)}return i},create:e=>e8.fromPartial(e??{}),fromPartial(e){let t=e5();return t.id=e.id??"",t.role=e.role??"",t.content=e.content??void 0,t.name=e.name??void 0,t.toolCalls=e.toolCalls?.map(e=>eU.fromPartial(e))||[],t.toolCallId=e.toolCallId??void 0,t.error=e.error??void 0,t.contentParts=e.contentParts?.map(e=>e9.fromPartial(e))||[],t}};function e6(){return{id:"",reason:"",message:void 0,toolCallId:void 0,responseSchema:void 0,expiresAt:void 0,metadata:void 0}}let e7={encode:(e,t=new e_)=>(""!==e.id&&t.uint32(10).string(e.id),""!==e.reason&&t.uint32(18).string(e.reason),void 0!==e.message&&t.uint32(26).string(e.message),void 0!==e.toolCallId&&t.uint32(34).string(e.toolCallId),void 0!==e.responseSchema&&eD.encode(eD.wrap(e.responseSchema),t.uint32(42).fork()).join(),void 0!==e.expiresAt&&t.uint32(50).string(e.expiresAt),void 0!==e.metadata&&eD.encode(eD.wrap(e.metadata),t.uint32(58).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=e6();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.id=n.string();continue;case 2:if(18!==e)break;i.reason=n.string();continue;case 3:if(26!==e)break;i.message=n.string();continue;case 4:if(34!==e)break;i.toolCallId=n.string();continue;case 5:if(42!==e)break;i.responseSchema=eD.unwrap(eD.decode(n,n.uint32()));continue;case 6:if(50!==e)break;i.expiresAt=n.string();continue;case 7:if(58!==e)break;i.metadata=eD.unwrap(eD.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>e7.fromPartial(e??{}),fromPartial(e){let t=e6();return t.id=e.id??"",t.reason=e.reason??"",t.message=e.message??void 0,t.toolCallId=e.toolCallId??void 0,t.responseSchema=e.responseSchema??void 0,t.expiresAt=e.expiresAt??void 0,t.metadata=e.metadata??void 0,t}},te=function(e){return e[e.TEXT_MESSAGE_START=0]="TEXT_MESSAGE_START",e[e.TEXT_MESSAGE_CONTENT=1]="TEXT_MESSAGE_CONTENT",e[e.TEXT_MESSAGE_END=2]="TEXT_MESSAGE_END",e[e.TOOL_CALL_START=3]="TOOL_CALL_START",e[e.TOOL_CALL_ARGS=4]="TOOL_CALL_ARGS",e[e.TOOL_CALL_END=5]="TOOL_CALL_END",e[e.STATE_SNAPSHOT=6]="STATE_SNAPSHOT",e[e.STATE_DELTA=7]="STATE_DELTA",e[e.MESSAGES_SNAPSHOT=8]="MESSAGES_SNAPSHOT",e[e.RAW=9]="RAW",e[e.CUSTOM=10]="CUSTOM",e[e.RUN_STARTED=11]="RUN_STARTED",e[e.RUN_FINISHED=12]="RUN_FINISHED",e[e.RUN_ERROR=13]="RUN_ERROR",e[e.STEP_STARTED=14]="STEP_STARTED",e[e.STEP_FINISHED=15]="STEP_FINISHED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function tt(){return{type:0,timestamp:void 0,rawEvent:void 0}}let tn={encode:(e,t=new e_)=>(0!==e.type&&t.uint32(8).int32(e.type),void 0!==e.timestamp&&t.uint32(16).int64(e.timestamp),void 0!==e.rawEvent&&eD.encode(eD.wrap(e.rawEvent),t.uint32(26).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tt();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(8!==e)break;i.type=n.int32();continue;case 2:if(16!==e)break;i.timestamp=function(e){let t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(t<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return t}(n.int64());continue;case 3:if(26!==e)break;i.rawEvent=eD.unwrap(eD.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tn.fromPartial(e??{}),fromPartial(e){let t=tt();return t.type=e.type??0,t.timestamp=e.timestamp??void 0,t.rawEvent=e.rawEvent??void 0,t}};function tr(){return{baseEvent:void 0,messageId:"",role:void 0,name:void 0}}let ti={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.messageId&&t.uint32(18).string(e.messageId),void 0!==e.role&&t.uint32(26).string(e.role),void 0!==e.name&&t.uint32(34).string(e.name),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tr();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.messageId=n.string();continue;case 3:if(26!==e)break;i.role=n.string();continue;case 4:if(34!==e)break;i.name=n.string();continue}if((7&e)==4||0===e)break;
1065n.skip(7&e)}return i},create:e=>ti.fromPartial(e??{}),fromPartial(e){let t=tr();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??"",t.role=e.role??void 0,t.name=e.name??void 0,t}};function ta(){return{baseEvent:void 0,messageId:"",delta:""}}let to={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.messageId&&t.uint32(18).string(e.messageId),""!==e.delta&&t.uint32(26).string(e.delta),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=ta();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.messageId=n.string();continue;case 3:if(26!==e)break;i.delta=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>to.fromPartial(e??{}),fromPartial(e){let t=ta();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??"",t.delta=e.delta??"",t}};function ts(){return{baseEvent:void 0,messageId:""}}let tl={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.messageId&&t.uint32(18).string(e.messageId),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=ts();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.messageId=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tl.fromPartial(e??{}),fromPartial(e){let t=ts();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??"",t}};function tu(){return{baseEvent:void 0,toolCallId:"",toolCallName:"",parentMessageId:void 0}}let tc={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.toolCallId&&t.uint32(18).string(e.toolCallId),""!==e.toolCallName&&t.uint32(26).string(e.toolCallName),void 0!==e.parentMessageId&&t.uint32(34).string(e.parentMessageId),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tu();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.toolCallId=n.string();continue;case 3:if(26!==e)break;i.toolCallName=n.string();continue;case 4:if(34!==e)break;i.parentMessageId=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tc.fromPartial(e??{}),fromPartial(e){let t=tu();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??"",t.toolCallName=e.toolCallName??"",t.parentMessageId=e.parentMessageId??void 0,t}};function td(){return{baseEvent:void 0,toolCallId:"",delta:""}}let th={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.toolCallId&&t.uint32(18).string(e.toolCallId),""!==e.delta&&t.uint32(26).string(e.delta),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=td();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.toolCallId=n.string();continue;case 3:if(26!==e)break;i.delta=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>th.fromPartial(e??{}),fromPartial(e){let t=td();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??"",t.delta=e.delta??"",t}};function tp(){return{baseEvent:void 0,toolCallId:""}}let tf={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.toolCallId&&t.uint32(18).string(e.toolCallId),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tp();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.toolCallId=n.string();continue}if((7&e)==4||0===e)break;
1065n.skip(7&e)}return i},create:e=>tf.fromPartial(e??{}),fromPartial(e){let t=tp();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??"",t}};function tm(){return{baseEvent:void 0,snapshot:void 0}}let tg={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.snapshot&&eD.encode(eD.wrap(e.snapshot),t.uint32(18).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tm();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.snapshot=eD.unwrap(eD.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tg.fromPartial(e??{}),fromPartial(e){let t=tm();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.snapshot=e.snapshot??void 0,t}};function tv(){return{baseEvent:void 0,delta:[]}}let tb={encode(e,t=new e_){for(let n of(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),e.delta))eB.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tv();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.delta.push(eB.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tb.fromPartial(e??{}),fromPartial(e){let t=tv();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.delta=e.delta?.map(e=>eB.fromPartial(e))||[],t}};function ty(){return{baseEvent:void 0,messages:[]}}let tE={encode(e,t=new e_){for(let n of(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messages))e8.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=ty();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.messages.push(e8.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tE.fromPartial(e??{}),fromPartial(e){let t=ty();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.messages=e.messages?.map(e=>e8.fromPartial(e))||[],t}};function tT(){return{baseEvent:void 0,event:void 0,source:void 0}}let tk={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.event&&eD.encode(eD.wrap(e.event),t.uint32(18).fork()).join(),void 0!==e.source&&t.uint32(26).string(e.source),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tT();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.event=eD.unwrap(eD.decode(n,n.uint32()));continue;case 3:if(26!==e)break;i.source=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tk.fromPartial(e??{}),fromPartial(e){let t=tT();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.event=e.event??void 0,t.source=e.source??void 0,t}};function t_(){return{baseEvent:void 0,name:"",value:void 0}}let tA={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.name&&t.uint32(18).string(e.name),void 0!==e.value&&eD.encode(eD.wrap(e.value),t.uint32(26).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=t_();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.name=n.string();continue;case 3:if(26!==e)break;i.value=eD.unwrap(eD.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tA.fromPartial(e??{}),fromPartial(e){let t=t_();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.name=e.name??"",t.value=e.value??void 0,t}};function tx(){return{baseEvent:void 0,threadId:"",runId:""}}let tw={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.threadId&&t.uint32(18).string(e.threadId),""!==e.runId&&t.uint32(26).string(e.runId),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tx();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.threadId=n.string();continue;case 3:if(26!==e)break;
1065i.runId=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tw.fromPartial(e??{}),fromPartial(e){let t=tx();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??"",t.runId=e.runId??"",t}};function tS(){return{baseEvent:void 0,threadId:"",runId:"",result:void 0,outcome:"",interrupts:[]}}let tC={encode(e,t=new e_){for(let n of(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.threadId&&t.uint32(18).string(e.threadId),""!==e.runId&&t.uint32(26).string(e.runId),void 0!==e.result&&eD.encode(eD.wrap(e.result),t.uint32(34).fork()).join(),""!==e.outcome&&t.uint32(42).string(e.outcome),e.interrupts))e7.encode(n,t.uint32(50).fork()).join();return t},decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tS();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.threadId=n.string();continue;case 3:if(26!==e)break;i.runId=n.string();continue;case 4:if(34!==e)break;i.result=eD.unwrap(eD.decode(n,n.uint32()));continue;case 5:if(42!==e)break;i.outcome=n.string();continue;case 6:if(50!==e)break;i.interrupts.push(e7.decode(n,n.uint32()));continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tC.fromPartial(e??{}),fromPartial(e){let t=tS();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??"",t.runId=e.runId??"",t.result=e.result??void 0,t.outcome=e.outcome??"",t.interrupts=e.interrupts?.map(e=>e7.fromPartial(e))||[],t}};function tI(){return{baseEvent:void 0,code:void 0,message:""}}let tN={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.code&&t.uint32(18).string(e.code),""!==e.message&&t.uint32(26).string(e.message),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tI();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.code=n.string();continue;case 3:if(26!==e)break;i.message=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tN.fromPartial(e??{}),fromPartial(e){let t=tI();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.code=e.code??void 0,t.message=e.message??"",t}};function tO(){return{baseEvent:void 0,stepName:""}}let tR={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.stepName&&t.uint32(18).string(e.stepName),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tO();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.stepName=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tR.fromPartial(e??{}),fromPartial(e){let t=tO();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??"",t}};function tD(){return{baseEvent:void 0,stepName:""}}let tL={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.stepName&&t.uint32(18).string(e.stepName),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tD();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.stepName=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tL.fromPartial(e??{}),fromPartial(e){let t=tD();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??"",t}};function tP(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0,name:void 0}}let tM={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.messageId&&t.uint32(18).string(e.messageId),void 0!==e.role&&t.uint32(26).string(e.role),void 0!==e.delta&&t.uint32(34).string(e.delta),void 0!==e.name&&t.uint32(42).string(e.name),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tP();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.messageId=n.string();continue;case 3:if(26!==e)break;i.role=n.string();continue;case 4:if(34!==e)break;i.delta=n.string();continue;case 5:if(42!==e)break;i.name=n.string();continue}if((7&e)==4||0===e)break;
1065n.skip(7&e)}return i},create:e=>tM.fromPartial(e??{}),fromPartial(e){let t=tP();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??void 0,t.role=e.role??void 0,t.delta=e.delta??void 0,t.name=e.name??void 0,t}};function tF(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0}}let tB={encode:(e,t=new e_)=>(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.toolCallId&&t.uint32(18).string(e.toolCallId),void 0!==e.toolCallName&&t.uint32(26).string(e.toolCallName),void 0!==e.parentMessageId&&t.uint32(34).string(e.parentMessageId),void 0!==e.delta&&t.uint32(42).string(e.delta),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tF();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=tn.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.toolCallId=n.string();continue;case 3:if(26!==e)break;i.toolCallName=n.string();continue;case 4:if(34!==e)break;i.parentMessageId=n.string();continue;case 5:if(42!==e)break;i.delta=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tB.fromPartial(e??{}),fromPartial(e){let t=tF();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??void 0,t.toolCallName=e.toolCallName??void 0,t.parentMessageId=e.parentMessageId??void 0,t.delta=e.delta??void 0,t}};function tj(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0}}let tU={encode:(e,t=new e_)=>(void 0!==e.textMessageStart&&ti.encode(e.textMessageStart,t.uint32(10).fork()).join(),void 0!==e.textMessageContent&&to.encode(e.textMessageContent,t.uint32(18).fork()).join(),void 0!==e.textMessageEnd&&tl.encode(e.textMessageEnd,t.uint32(26).fork()).join(),void 0!==e.toolCallStart&&tc.encode(e.toolCallStart,t.uint32(34).fork()).join(),void 0!==e.toolCallArgs&&th.encode(e.toolCallArgs,t.uint32(42).fork()).join(),void 0!==e.toolCallEnd&&tf.encode(e.toolCallEnd,t.uint32(50).fork()).join(),void 0!==e.stateSnapshot&&tg.encode(e.stateSnapshot,t.uint32(58).fork()).join(),void 0!==e.stateDelta&&tb.encode(e.stateDelta,t.uint32(66).fork()).join(),void 0!==e.messagesSnapshot&&tE.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),void 0!==e.raw&&tk.encode(e.raw,t.uint32(82).fork()).join(),void 0!==e.custom&&tA.encode(e.custom,t.uint32(90).fork()).join(),void 0!==e.runStarted&&tw.encode(e.runStarted,t.uint32(98).fork()).join(),void 0!==e.runFinished&&tC.encode(e.runFinished,t.uint32(106).fork()).join(),void 0!==e.runError&&tN.encode(e.runError,t.uint32(114).fork()).join(),void 0!==e.stepStarted&&tR.encode(e.stepStarted,t.uint32(122).fork()).join(),void 0!==e.stepFinished&&tL.encode(e.stepFinished,t.uint32(130).fork()).join(),void 0!==e.textMessageChunk&&tM.encode(e.textMessageChunk,t.uint32(138).fork()).join(),void 0!==e.toolCallChunk&&tB.encode(e.toolCallChunk,t.uint32(146).fork()).join(),t),decode(e,t){let n=e instanceof eA?e:new eA(e),r=void 0===t?n.len:n.pos+t,i=tj();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.textMessageStart=ti.decode(n,n.uint32());continue;case 2:if(18!==e)break;i.textMessageContent=to.decode(n,n.uint32());continue;case 3:if(26!==e)break;i.textMessageEnd=tl.decode(n,n.uint32());continue;case 4:if(34!==e)break;i.toolCallStart=tc.decode(n,n.uint32());continue;case 5:if(42!==e)break;i.toolCallArgs=th.decode(n,n.uint32());continue;case 6:if(50!==e)break;i.toolCallEnd=tf.decode(n,n.uint32());continue;case 7:if(58!==e)break;i.stateSnapshot=tg.decode(n,n.uint32());continue;case 8:if(66!==e)break;i.stateDelta=tb.decode(n,n.uint32());continue;case 9:if(74!==e)break;i.messagesSnapshot=tE.decode(n,n.uint32());continue;case 10:if(82!==e)break;i.raw=tk.decode(n,n.uint32());continue;case 11:if(90!==e)break;i.custom=tA.decode(n,n.uint32());continue;case 12:if(98!==e)break;i.runStarted=tw.decode(n,n.uint32());continue;case 13:if(106!==e)break;i.runFinished=tC.decode(n,n.uint32());continue;case 14:if(114!==e)break;i.runError=tN.decode(n,n.uint32());continue;case 15:if(122!==e)break;i.stepStarted=tR.decode(n,n.uint32());continue;case 16:if(130!==e)break;i.stepFinished=tL.decode(n,n.uint32());continue;case 17:if(138!==e)break;i.textMessageChunk=tM.decode(n,n.uint32());continue;case 18:if(146!==e)break;i.toolCallChunk=tB.decode(n,n.uint32());continue}if((7&e)==4||0===e)break;
1065n.skip(7&e)}return i},create:e=>tU.fromPartial(e??{}),fromPartial(e){let t=tj();return t.textMessageStart=void 0!==e.textMessageStart&&null!==e.textMessageStart?ti.fromPartial(e.textMessageStart):void 0,t.textMessageContent=void 0!==e.textMessageContent&&null!==e.textMessageContent?to.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=void 0!==e.textMessageEnd&&null!==e.textMessageEnd?tl.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=void 0!==e.toolCallStart&&null!==e.toolCallStart?tc.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=void 0!==e.toolCallArgs&&null!==e.toolCallArgs?th.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=void 0!==e.toolCallEnd&&null!==e.toolCallEnd?tf.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=void 0!==e.stateSnapshot&&null!==e.stateSnapshot?tg.fromPartial(e.stateSnapshot):void 0,t.stateDelta=void 0!==e.stateDelta&&null!==e.stateDelta?tb.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=void 0!==e.messagesSnapshot&&null!==e.messagesSnapshot?tE.fromPartial(e.messagesSnapshot):void 0,t.raw=void 0!==e.raw&&null!==e.raw?tk.fromPartial(e.raw):void 0,t.custom=void 0!==e.custom&&null!==e.custom?tA.fromPartial(e.custom):void 0,t.runStarted=void 0!==e.runStarted&&null!==e.runStarted?tw.fromPartial(e.runStarted):void 0,t.runFinished=void 0!==e.runFinished&&null!==e.runFinished?tC.fromPartial(e.runFinished):void 0,t.runError=void 0!==e.runError&&null!==e.runError?tN.fromPartial(e.runError):void 0,t.stepStarted=void 0!==e.stepStarted&&null!==e.stepStarted?tR.fromPartial(e.stepStarted):void 0,t.stepFinished=void 0!==e.stepFinished&&null!==e.stepFinished?tL.fromPartial(e.stepFinished):void 0,t.textMessageChunk=void 0!==e.textMessageChunk&&null!==e.textMessageChunk?tM.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=void 0!==e.toolCallChunk&&null!==e.toolCallChunk?tB.fromPartial(e.toolCallChunk):void 0,t}},tH=e=>{if(e&&"object"==typeof e){if(e.data)return{type:"data",value:e.data.value,mimeType:e.data.mimeType};if(e.url)return{type:"url",value:e.url.value,mimeType:e.url.mimeType}}},t$=e=>{if(e&&"object"==typeof e){if(e.text)return{type:"text",text:e.text.text};if(e.image)return{type:"image",source:tH(e.image.source),metadata:e.image.metadata};if(e.audio)return{type:"audio",source:tH(e.audio.source),metadata:e.audio.metadata};if(e.video)return{type:"video",source:tH(e.video.source),metadata:e.video.metadata};if(e.document)return{type:"document",source:tH(e.document.source),metadata:e.document.metadata}}},tz="application/vnd.ag-ui.event+proto";var tG=n(98734);let tY=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,tq=e=>{if("string"!=typeof e)throw TypeError("Invalid argument expected string");let t=e.match(tY);
1065if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},tV=e=>"*"===e||"x"===e||"X"===e,tW=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},tK=(e,t)=>{if(tV(e)||tV(t))return 0;let[n,r]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(tW(e),tW(t));return n>r?1:n<r?-1:0},tZ=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){let r=tK(e[n]||"0",t[n]||"0");if(0!==r)return r}return 0},tX=(e,t)=>{let n=tq(e),r=tq(t),i=n.pop(),a=r.pop(),o=tZ(n,r);return 0!==o?o:i&&a?tZ(i.split("."),a.split(".")):i||a?i?-1:1:0};var tQ=n(87358);let tJ=e=>{if("function"==typeof structuredClone)return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Array.isArray(e)?[...e]:{...e}}};function t0(){return(0,o.A)()}function t1(e){if(Object.freeze(e),"object"==typeof e&&e)for(let t of Object.values(e))"object"==typeof t&&t&&!Object.isFrozen(t)&&t1(t);return e}function t2(e,t,n){let r=0,i=[e,t],a=new WeakSet;for(;i.length>0;){let e=i.pop();if("string"==typeof e){if((r+=e.length)>n)return!0}else if("object"==typeof e&&e){if(a.has(e))continue;if(a.add(e),Array.isArray(e))for(let t=0;t<e.length;t++)i.push(e[t]);else{let t=Object.keys(e);for(let a=0;a<t.length;a++){let o=t[a];if((r+=o.length)>n)return!0;i.push(e[o])}}}}return!1}async function t3(e,t,n,r){let i="u">typeof tQ&&void 0!==tQ.env,a=i&&!!tQ.env.VITEST_WORKER_ID,o=i&&!!tQ.env.VITEST_WORKER_ID,s=o&&!t2(t,n,524288),l=s?tJ(t):t,u=s?tJ(n):n,c=!1,d=!1,h;for(let t of e)try{s&&(t1(l),t1(u));let e=await r(t,l,u);if(void 0===e)continue;let n=!1;if(void 0!==e.messages&&e.messages!==l&&(l=tJ(e.messages),c=!0,n=!0),void 0!==e.state&&e.state!==u&&(u=tJ(e.state),d=!0,n=!0),s&&n&&t2(l,u,524288)&&(s=!1),h=e.stopPropagation,!0===h)break}catch(e){if(o&&e instanceof TypeError){if(a)throw e;console.error("AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.",e)}else a||console.error("Subscriber error:",e);continue}return{...c?{messages:Object.isFrozen(l)?tJ(l):l}:{},...d?{state:Object.isFrozen(u)?tJ(u):u}:{},...void 0===h?{}:{stopPropagation:h}}}function t4(e){if(!e)return{enabled:!1,events:!1,lifecycle:!1,verbose:!1};if(!0===e)return{enabled:!0,events:!0,lifecycle:!0,verbose:!0};let t=e.events??!0,n=e.lifecycle??!0;return{enabled:t||n,events:t,lifecycle:n,verbose:e.verbose??!1}}function t9(e){return e instanceof t5?e:!0===e?new t5(t4(!0)):void 0}var t5=class{constructor(e){this.config=e}event(e,t,n,r){this.config.events&&(this.config.verbose?console.debug(`[${e}] ${t}`,"string"==typeof n?n:JSON.stringify(n)):console.debug(`[${e}] ${t}`,r??n))}lifecycle(e,t,n){this.config.lifecycle&&(n?console.debug(`[${e}] ${t}`,n):console.debug(`[${e}] ${t}`))}get eventsEnabled(){return this.config.events}get lifecycleEnabled(){return this.config.lifecycle}get enabled(){return this.config.enabled}};function t8(e){return e.enabled?new t5(e):void 0}let t6=(e,t,n,r,i)=>{var a;let o=t9(i),l=tJ(n.messages),u=tJ(e.state),c={},d=e=>{void 0!==e.messages&&(l=e.messages,c.messages=e.messages),void 0!==e.state&&(u=e.state,c.state=e.state)},h=()=>{let e=tJ(c);return c={},void 0!==e.messages||void 0!==e.state?(0,B.of)(e):j.w};return t.pipe(X(async t=>{let i=await t3(r,l,u,(r,i,a)=>r.onEvent?.({event:t,agent:n,input:e,messages:i,state:a}));if(d(i),!0===i.stopPropagation?o?.event("APPLY","Event dropped:",t,{type:t.type,reason:"stopPropagation by subscriber"}):o?.event("APPLY","Event applied:",t,{type:t.type,subscribers:r.length}),!0===i.stopPropagation)return h();switch(t.type){case s.Bx.TEXT_MESSAGE_START:{let i=await t3(r,l,u,(r,i,a)=>r.onTextMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(d(i),!0!==i.stopPropagation){let{messageId:e,role:n="assistant",name:r}=t;if(!l.find(t=>t.id===e)){let t={id:e,role:n,content:"",...void 0!==r&&{name:r}};l.push(t),d({messages:l})}}return h()}case s.Bx.TEXT_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,o=l.find(e=>e.id===i);if(!o)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${i}'`),h();let s=await t3(r,l,u,(r,i,a)=>r.onTextMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,textMessageBuffer:"string"==typeof o.content?o.content:""}));return d(s),!0!==s.stopPropagation&&(o.content=`${"string"==typeof o.content?o.content:""}${a}`,d({messages:l})),h()}case s.Bx.TEXT_MESSAGE_END:{let{messageId:i}=t,a=l.find(e=>e.id===i);return a?(d(await t3(r,l,u,(r,i,o)=>r.onTextMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,textMessageBuffer:"string"==typeof a.content?a.content:""}))),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:l,state:u,agent:n,input:e})}))):console.warn(`TEXT_MESSAGE_END: No message found with ID '${i}'`),h()}case s.Bx.TOOL_CALL_START:{let i=await t3(r,l,u,(r,i,a)=>r.onToolCallStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(d(i),!0!==i.stopPropagation){let{toolCallId:e,toolCallName:n,parentMessageId:r}=t,i=function(e,t,n){if(t){let r=e.find(e=>e.id===t);if(r?.role==="assistant")return r;r&&console.warn(`TOOL_CALL_START: parentMessageId '${t}' matches a '${r.role}' message, not assistant — falling back to toolCallId`);let i={id:r?n:t,role:"assistant",toolCalls:[]};return e.push(i),i}let r={id:n,role:"assistant",toolCalls:[]};return e.push(r),r}(l,r,e);i.toolCalls??=[],i.toolCalls.push({id:e,type:"function",function:{name:n,arguments:""}}),d({messages:l})}return h()}case s.Bx.TOOL_CALL_ARGS:{let{toolCallId:i,delta:a}=t,o=l.find(e=>e.toolCalls?.some(e=>e.id===i));if(!o)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${i}'`),h();let s=o.toolCalls?.find(e=>e.id===i);if(!s)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),h();let c=await t3(r,l,u,(r,i,a)=>{let o=s.function.arguments,l=s.function.name,u={};try{u=es(o)}catch{}return r.onToolCallArgsEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallBuffer:o,toolCallName:l,partialToolCallArgs:u})});return d(c),!0!==c.stopPropagation&&(s.function.arguments+=a,d({messages:l})),h()}case s.Bx.TOOL_CALL_END:{let{toolCallId:i}=t,a=l.find(e=>e.toolCalls?.some(e=>e.id===i));if(!a)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${i}'`),h();let o=a.toolCalls?.find(e=>e.id===i);return o?(d(await t3(r,l,u,(r,i,a)=>{let s=o.function.arguments,l=o.function.name,u={};try{u=JSON.parse(s)}catch{}return r.onToolCallEndEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallName:l,toolCallArgs:u})})),await Promise.all(r.map(t=>{t.onNewToolCall?.({toolCall:o,messages:l,state:u,agent:n,input:e})}))):console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),h()}case s.Bx.TOOL_CALL_RESULT:{let i=await t3(r,l,u,(r,i,a)=>r.onToolCallResultEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(d(i),!0!==i.stopPropagation){let{messageId:i,toolCallId:a,content:o,role:s}=t,c={id:i,toolCallId:a,role:s||"tool",content:o},h=l.findIndex(e=>"assistant"===e.role&&e.toolCalls?.some(e=>e.id===a));if(-1===h)l.push(c);else{let e=h+1;for(;e<l.length&&"tool"===l[e].role;)e++;l.splice(e,0,c)}await Promise.all(r.map(t=>{t.onNewMessage?.({message:c,messages:l,state:u,agent:n,input:e})})),d({messages:l})}return h()}case s.Bx.STATE_SNAPSHOT:{let i=await t3(r,l,u,(r,i,a)=>r.onStateSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(d(i),!0!==i.stopPropagation){let{snapshot:e}=t;d({state:u=e})}return h()}case s.Bx.STATE_DELTA:{let i=await t3(r,l,u,(r,i,a)=>r.onStateDeltaEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(d(i),!0!==i.stopPropagation){let{delta:e}=t;try{u=F.applyPatch(u,e,!0,!1).newDocument,d({state:u})}catch(n){let t=n instanceof Error?n.message:String(n);console.warn(`Failed to apply state patch:
1066Current state: ${JSON.stringify(u,null,2)}
1067Patch operations: ${JSON.stringify(e,null,2)}
1068Error: ${t}`)}}return h()}case s.Bx.MESSAGES_SNAPSHOT:{let i=await t3(r,l,u,(r,i,a)=>r.onMessagesSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(d(i),!0!==i.stopPropagation){let{messages:e}
1068=t,n=new Map(e.map(e=>[e.id,e])),r=e.some(e=>"reasoning"===e.role),i=e=>"activity"===e.role||"reasoning"===e.role&&!r,a=new Set((l=l.filter(e=>i(e)||n.has(e.id)).map(e=>i(e)?e:n.get(e.id))).map(e=>e.id));for(let t of e)a.has(t.id)||l.push(t);d({messages:l})}return h()}case s.Bx.ACTIVITY_SNAPSHOT:{let i=l.findIndex(e=>e.id===t.messageId),a=i>=0?l[i]:void 0,o=a?.role==="activity"?a:void 0,s=t.replace??!0,c=await t3(r,l,u,(r,i,s)=>r.onActivitySnapshotEvent?.({event:t,messages:i,state:s,agent:n,input:e,activityMessage:o,existingMessage:a}));if(d(c),!0!==c.stopPropagation){let a={id:t.messageId,role:"activity",activityType:t.activityType,content:tJ(t.content)},c;-1===i?(l.push(a),c=a):o?s&&(l[i]={...o,activityType:t.activityType,content:tJ(t.content)}):s&&(l[i]=a,c=a),d({messages:l}),c&&await Promise.all(r.map(t=>t.onNewMessage?.({message:c,messages:l,state:u,agent:n,input:e})))}return h()}case s.Bx.ACTIVITY_DELTA:{let i=l.findIndex(e=>e.id===t.messageId);if(-1===i)return h();let a=l[i];if("activity"!==a.role)return console.warn(`ACTIVITY_DELTA: Message '${t.messageId}' is not an activity message`),h();let o=await t3(r,l,u,(r,i,o)=>r.onActivityDeltaEvent?.({event:t,messages:i,state:o,agent:n,input:e,activityMessage:a}));if(d(o),!0!==o.stopPropagation)try{let e=tJ(a.content??{}),n=F.applyPatch(e,t.patch??[],!0,!1).newDocument;l[i]={...a,content:tJ(n),activityType:t.activityType},d({messages:l})}catch(n){let e=n instanceof Error?n.message:String(n);console.warn(`Failed to apply activity patch for '${t.messageId}': ${e}`)}return h()}case s.Bx.RAW:return d(await t3(r,l,u,(r,i,a)=>r.onRawEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),h();case s.Bx.CUSTOM:return d(await t3(r,l,u,(r,i,a)=>r.onCustomEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),h();case s.Bx.RUN_STARTED:{let i=await t3(r,l,u,(r,i,a)=>r.onRunStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(d(i),!0!==i.stopPropagation&&t.input?.messages){for(let e of t.input.messages)l.find(t=>t.id===e.id)||l.push(e);d({messages:l})}return h()}case s.Bx.RUN_FINISHED:{let i=t.outcome?.type==="interrupt"?{event:t,outcome:"interrupt",interrupts:t.outcome.interrupts}:{event:t,outcome:"success",result:t.result},a=await t3(r,l,u,(t,r,a)=>t.onRunFinishedEvent?.({...i,messages:r,state:a,agent:n,input:e}));return d(a),!0!==a.stopPropagation&&(n.pendingInterrupts="interrupt"===i.outcome?[...i.interrupts]:[]),h()}case s.Bx.RUN_ERROR:return d(await t3(r,l,u,(r,i,a)=>r.onRunErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),h();case s.Bx.STEP_STARTED:return d(await t3(r,l,u,(r,i,a)=>r.onStepStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),h();case s.Bx.STEP_FINISHED:return d(await t3(r,l,u,(r,i,a)=>r.onStepFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),h();case s.Bx.TEXT_MESSAGE_CHUNK:throw Error("TEXT_MESSAGE_CHUNK must be tranformed before being applied");case s.Bx.TOOL_CALL_CHUNK:throw Error("TOOL_CALL_CHUNK must be tranformed before being applied");case s.Bx.THINKING_START:case s.Bx.THINKING_END:case s.Bx.THINKING_TEXT_MESSAGE_START:case s.Bx.THINKING_TEXT_MESSAGE_CONTENT:case s.Bx.THINKING_TEXT_MESSAGE_END:return h();case s.Bx.REASONING_START:return d(await t3(r,l,u,(r,i,a)=>r.onReasoningStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),h();case s.Bx.REASONING_MESSAGE_START:{let i=await t3(r,l,u,(r,i,a)=>r.onReasoningMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(d(i),!0!==i.stopPropagation){let{messageId:e}=t;l.find(t=>t.id===e)||(l.push({id:e,role:"reasoning",content:""}),d({messages:l}))}return h()}case s.Bx.REASONING_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,o=l.find(e=>e.id===i);if(!o)return console.warn(`REASONING_MESSAGE_CONTENT: No message found with ID '${i}'`),h();let s=await t3(r,l,u,(r,i,a)=>r.onReasoningMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,reasoningMessageBuffer:"string"==typeof o.content?o.content:""}));return d(s),!0!==s.stopPropagation&&(o.content=`${"string"==typeof o.content?o.content:""}${a}`,d({messages:l})),h()}case s.Bx.REASONING_MESSAGE_END:{let{messageId:i}=t,a=l.find(e=>e.id===i);return a?(d(await t3(r,l,u,(r,i,o)=>r.onReasoningMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,reasoningMessageBuffer:"string"==typeof a.content?a.content:""}))),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:l,state:u,agent:n,input:e})}))):console.warn(`REASONING_MESSAGE_END: No message found with ID '${i}'`),h()}case s.Bx.REASONING_MESSAGE_CHUNK:throw Error("REASONING_MESSAGE_CHUNK must be transformed before being applied");case s.Bx.REASONING_END:return d(await t3(r,l,u,(r,i,a)=>r.onReasoningEndEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),h();
1068case s.Bx.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:a,encryptedValue:o}=t,s=await t3(r,l,u,(r,i,a)=>r.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(d(s),!0!==s.stopPropagation){let e=!1;if("tool-call"===i){for(let t of l)if("assistant"===t.role&&t.toolCalls){let n=t.toolCalls.find(e=>e.id===a);if(n){n.encryptedValue=o,e=!0;break}}}else{let t=l.find(e=>e.id===a);t?.role!=="activity"&&t&&(t.encryptedValue=o,e=!0)}e&&(c.messages=l)}return h()}}return t.type,h()}),(0,Q.U)(),r.length>0?(a={},(0,J.N)(function(e,t){var n=!1;e.subscribe((0,ee._)(t,function(e){n=!0,t.next(e)},function(){n||t.next(a),t.complete()}))})):e=>e)},t7=e=>t=>{let n=t9(e),r=new Map,i=new Map,a=!1,o=!1,l=!1,u=new Map,c=!1,d=!1,h=!1;return t.pipe((0,q.Z)(e=>{let t=e.type;if(n?.event("VERIFY","Event:",e,{type:e.type}),o)return(0,U.$)(()=>new s.$e(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(a&&t!==s.Bx.RUN_ERROR&&t!==s.Bx.RUN_STARTED)return(0,U.$)(()=>new s.$e(`Cannot send event type '${t}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(l){if(t===s.Bx.RUN_STARTED){if(h&&!a)return(0,U.$)(()=>new s.$e("Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run."));a&&(r.clear(),i.clear(),u.clear(),c=!1,d=!1,a=!1,o=!1,h=!0)}}else if(l=!0,t!==s.Bx.RUN_STARTED&&t!==s.Bx.RUN_ERROR)return(0,U.$)(()=>new s.$e("First event must be 'RUN_STARTED'"));switch(t){case s.Bx.TEXT_MESSAGE_START:{let t=e.messageId;return r.has(t)?(0,U.$)(()=>new s.$e(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${t}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`)):(r.set(t,!0),(0,B.of)(e))}case s.Bx.TEXT_MESSAGE_CONTENT:{let t=e.messageId;return r.has(t)?(0,B.of)(e):(0,U.$)(()=>new s.$e(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${t}'. Start a text message with 'TEXT_MESSAGE_START' first.`))}case s.Bx.TEXT_MESSAGE_END:{let t=e.messageId;return r.has(t)?(r.delete(t),(0,B.of)(e)):(0,U.$)(()=>new s.$e(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${t}'. A 'TEXT_MESSAGE_START' event must be sent first.`))}case s.Bx.TOOL_CALL_START:{let t=e.toolCallId;return i.has(t)?(0,U.$)(()=>new s.$e(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${t}' is already in progress. Complete it with 'TOOL_CALL_END' first.`)):(i.set(t,!0),(0,B.of)(e))}case s.Bx.TOOL_CALL_ARGS:{let t=e.toolCallId;return i.has(t)?(0,B.of)(e):(0,U.$)(()=>new s.$e(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${t}'. Start a tool call with 'TOOL_CALL_START' first.`))}case s.Bx.TOOL_CALL_END:{let t=e.toolCallId;return i.has(t)?(i.delete(t),(0,B.of)(e)):(0,U.$)(()=>new s.$e(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${t}'. A 'TOOL_CALL_START' event must be sent first.`))}case s.Bx.STEP_STARTED:{let t=e.stepName;return u.has(t)?(0,U.$)(()=>new s.$e(`Step "${t}" is already active for 'STEP_STARTED'`)):(u.set(t,!0),(0,B.of)(e))}case s.Bx.STEP_FINISHED:{let t=e.stepName;return u.has(t)?(u.delete(t),(0,B.of)(e)):(0,U.$)(()=>new s.$e(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}case s.Bx.RUN_STARTED:return h=!0,(0,B.of)(e);case s.Bx.RUN_FINISHED:if(u.size>0){let e=Array.from(u.keys()).join(", ");return(0,U.$)(()=>new s.$e(`Cannot send 'RUN_FINISHED' while steps are still active: ${e}`))}if(r.size>0){let e=Array.from(r.keys()).join(", ");return(0,U.$)(()=>new s.$e(`Cannot send 'RUN_FINISHED' while text messages are still active: ${e}`))}if(i.size>0){let e=Array.from(i.keys()).join(", ");return(0,U.$)(()=>new s.$e(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}return a=!0,(0,B.of)(e);case s.Bx.RUN_ERROR:return o=!0,(0,B.of)(e);case s.Bx.CUSTOM:return(0,B.of)(e);case s.Bx.THINKING_TEXT_MESSAGE_START:return c?d?(0,U.$)(()=>new s.$e("Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking message is already in progress. Complete it with 'THINKING_TEXT_MESSAGE_END' first.")):(d=!0,(0,B.of)(e)):(0,U.$)(()=>new s.$e("Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first."));case s.Bx.THINKING_TEXT_MESSAGE_CONTENT:return d?(0,B.of)(e):(0,U.$)(()=>new s.$e("Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first."));case s.Bx.THINKING_TEXT_MESSAGE_END:return d?(d=!1,(0,B.of)(e)):(0,U.$)(()=>new s.$e("Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first."));case s.Bx.THINKING_START:return c?(0,U.$)(()=>new s.$e("Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.")):(c=!0,(0,B.of)(e));case s.Bx.THINKING_END:return c?(c=!1,(0,B.of)(e)):(0,U.$)(()=>new s.$e("Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first."));default:return(0,B.of)(e)}}))},ne=function(e){return e.HEADERS="headers",e.DATA="data",e}({}),nt=e=>(0,H.v)(()=>(0,$.H)(e())).pipe((0,et.n)(e=>{if(!e.ok){let t=e.headers.get("content-type")||"";return(0,$.H)(e.text()).pipe((0,q.Z)(n=>{let r=n;if(t.includes("application/json"))try{r=JSON.parse(n)}catch{}let i=Error(`HTTP ${e.status}: ${"string"==typeof r?r:JSON.stringify(r)}`);return i.status=e.status,i.payload=r,(0,U.$)(()=>i)}))}let t={type:ne.HEADERS,status:e.status,headers:e.headers},n=e.body?.getReader();return n?new z.c(e=>(e.next(t),(async()=>{try{for(;;){let{done:t,value:r}=await n.read();if(t)break;let i={type:ne.DATA,data:r};e.next(i)}e.complete()}catch(t){e.error(t)}})(),()=>{n.cancel().catch(e=>{if(e?.name!=="AbortError")throw e})})):(0,U.$)(()=>Error("Failed to getReader() from response"))})),nn=(e,t)=>{let n=t9(t),r=new G.B,i=new Y.m,a=!1;return e.subscribe({next:e=>{if(i.next(e),e.type!==ne.HEADERS||a)a||r.error(Error("No headers event received before data events"));else{a=!0;let t=e.headers.get("content-type");n?.lifecycle("HTTP","Stream format detected:",{contentType:t,parser:t===tz?"protobuf":"sse"}),t===tz?(e=>{let t=new G.B,n=new Uint8Array;function r(){for(;n.length>=4;){let e=4+new DataView(n.buffer,n.byteOffset,4).getUint32(0,!1);if(n.length<e)break;try{let r=n.slice(4,e),i=function(e){let t=Object.values(tU.decode(e)).find(e=>void 0!==e);if(!t)throw Error("Invalid event");
1068if(t.type=te[t.baseEvent.type],t.timestamp=t.baseEvent.timestamp,t.rawEvent=t.baseEvent.rawEvent,delete t.baseEvent,t.type===s.Bx.MESSAGES_SNAPSHOT)for(let e of t.messages){if("user"===e.role&&Array.isArray(e.contentParts)){let t=e.contentParts.map(e=>t$(e)).filter(e=>void 0!==e);t.length>0&&(e.content=t)}Array.isArray(e.contentParts)&&0===e.contentParts.length&&(e.contentParts=void 0),e.toolCalls?.length===0&&(e.toolCalls=void 0)}if(t.type===s.Bx.RUN_FINISHED){let e="string"==typeof t.outcome&&""!==t.outcome?t.outcome:void 0,n=Array.isArray(t.interrupts)?t.interrupts:[];delete t.interrupts,"interrupt"===e?t.outcome={type:"interrupt",interrupts:n}:"success"===e?t.outcome={type:"success"}:delete t.outcome}if(t.type===s.Bx.STATE_DELTA)for(let e of t.delta)e.op=eM[e.op].toLowerCase(),Object.keys(e).forEach(t=>{void 0===e[t]&&delete e[t]});return Object.keys(t).forEach(e=>{void 0===t[e]&&delete t[e]}),s.rV.parse(t)}(r);t.next(i),n=n.slice(e)}catch(n){let e=n instanceof Error?n.message:String(n);t.error(Error(`Failed to decode protocol buffer message: ${e}`));return}}}return e.subscribe({next:e=>{if(e.type!==ne.HEADERS&&e.type===ne.DATA&&e.data){let t=new Uint8Array(n.length+e.data.length);t.set(n,0),t.set(e.data,n.length),n=t,r()}},error:e=>t.error(e),complete:()=>{if(n.length>0)try{r()}catch{console.warn("Incomplete or invalid protocol buffer data at stream end")}t.complete()}}),t.asObservable()})(i).subscribe({next:e=>r.next(e),error:e=>r.error(e),complete:()=>r.complete()}):((e,t)=>{let n=t9(t),r=new G.B,i=new TextDecoder("utf-8",{fatal:!1}),a="";function o(e){let t=e.split(`
1069`),i=[];for(let e of t)e.startsWith("data:")&&i.push(e.slice(5).replace(/^ /,""));if(i.length>0)try{let e=i.join(`
1070`),t=JSON.parse(e);n?.event("SSE","Event received:",t,{type:t.type}),r.next(t)}catch(e){r.error(e)}}return e.subscribe({next:e=>{if(e.type!==ne.HEADERS&&e.type===ne.DATA&&e.data){let t=i.decode(e.data,{stream:!0}),n=(a+=t).split(/\n\n/);for(let e of(a=n.pop()||"",n))o(e)}},error:e=>r.error(e),complete:()=>{a&&o(a+=i.decode()),r.complete()}}),r.asObservable()})(i,n).subscribe({next:e=>{try{let t=s.rV.parse(e);n?.event("HTTP","Event validated:",t,{type:t.type,valid:!0}),r.next(t)}catch(t){n?.event("HTTP","Event invalid:",{json:e,error:String(t)}),r.error(t)}},error:e=>{if(e?.name==="AbortError"){r.next({type:s.Bx.RUN_ERROR,message:e.message||"Request aborted",code:"abort",rawEvent:e}),r.complete();return}return r.error(e)},complete:()=>r.complete()})}},error:e=>{i.error(e),r.error(e)},complete:()=>{i.complete()}}),r.asObservable()},nr=tG.k5(["TextMessageStart","TextMessageContent","TextMessageEnd","ActionExecutionStart","ActionExecutionArgs","ActionExecutionEnd","ActionExecutionResult","AgentStateMessage","MetaEvent","RunStarted","RunFinished","RunError","NodeStarted","NodeFinished"]),ni=tG.k5(["LangGraphInterruptEvent","PredictState","Exit"]),na=tG.Ik({type:tG.eu(nr.enum.TextMessageStart),messageId:tG.Yj(),parentMessageId:tG.Yj().optional(),role:tG.Yj().optional()}),no=tG.Ik({type:tG.eu(nr.enum.TextMessageContent),messageId:tG.Yj(),content:tG.Yj()}),ns=tG.Ik({type:tG.eu(nr.enum.TextMessageEnd),messageId:tG.Yj()}),nl=tG.Ik({type:tG.eu(nr.enum.ActionExecutionStart),actionExecutionId:tG.Yj(),actionName:tG.Yj(),parentMessageId:tG.Yj().optional()}),nu=tG.Ik({type:tG.eu(nr.enum.ActionExecutionArgs),actionExecutionId:tG.Yj(),args:tG.Yj()}),nc=tG.Ik({type:tG.eu(nr.enum.ActionExecutionEnd),actionExecutionId:tG.Yj()}),nd=tG.Ik({type:tG.eu(nr.enum.ActionExecutionResult),actionName:tG.Yj(),actionExecutionId:tG.Yj(),result:tG.Yj()}),nh=tG.Ik({type:tG.eu(nr.enum.AgentStateMessage),threadId:tG.Yj(),agentName:tG.Yj(),nodeName:tG.Yj(),runId:tG.Yj(),active:tG.zM(),role:tG.Yj(),state:tG.Yj(),running:tG.zM()}),np=tG.Ik({type:tG.eu(nr.enum.MetaEvent),name:ni,value:tG.bz()}),nf=tG.Ik({type:tG.eu(nr.enum.RunError),message:tG.Yj(),code:tG.Yj().optional()});tG.gM("type",[na,no,ns,nl,nu,nc,nd,nh,np,nf]),tG.Ik({id:tG.Yj(),role:tG.Yj(),content:tG.Yj(),parentMessageId:tG.Yj().optional()}),tG.Ik({id:tG.Yj(),name:tG.Yj(),arguments:tG.bz(),parentMessageId:tG.Yj().optional()}),tG.Ik({id:tG.Yj(),result:tG.bz(),actionExecutionId:tG.Yj(),actionName:tG.Yj()});let nm=e=>{if("string"==typeof e)return e;if(!Array.isArray(e))return;let t=e.filter(e=>"text"===e.type).map(e=>e.text).filter(e=>e.length>0);if(0!==t.length)return t.join(`
1071`)},ng=e=>t=>{let n=t9(e),r,i,a,o,l=()=>"text"===o?[(()=>{if(!r||"text"!==o)throw Error("No text message to close");let e={type:s.Bx.TEXT_MESSAGE_END,messageId:r.messageId};return o=void 0,r=void 0,n?.event("TRANSFORM","TEXT_MESSAGE_END",e,{messageId:e.messageId}),e})()]:"tool"===o?[(()=>{if(!i||"tool"!==o)throw Error("No tool call to close");let e={type:s.Bx.TOOL_CALL_END,toolCallId:i.toolCallId};return o=void 0,i=void 0,n?.event("TRANSFORM","TOOL_CALL_END",e,{toolCallId:e.toolCallId}),e})()]:"reasoning"===o?[(()=>{if(!a||"reasoning"!==o)throw Error("No reasoning message to close");let e={type:s.Bx.REASONING_MESSAGE_END,messageId:a.messageId};return o=void 0,a=void 0,n?.event("TRANSFORM","REASONING_MESSAGE_END",e,{messageId:e.messageId}),e})()]:[];return t.pipe((0,q.Z)(e=>{switch(e.type){case s.Bx.TEXT_MESSAGE_START:case s.Bx.TEXT_MESSAGE_CONTENT:case s.Bx.TEXT_MESSAGE_END:case s.Bx.TOOL_CALL_START:case s.Bx.TOOL_CALL_ARGS:case s.Bx.TOOL_CALL_END:case s.Bx.TOOL_CALL_RESULT:case s.Bx.STATE_SNAPSHOT:case s.Bx.STATE_DELTA:case s.Bx.MESSAGES_SNAPSHOT:case s.Bx.CUSTOM:case s.Bx.RUN_STARTED:case s.Bx.RUN_FINISHED:case s.Bx.RUN_ERROR:case s.Bx.STEP_STARTED:case s.Bx.STEP_FINISHED:case s.Bx.THINKING_START:case s.Bx.THINKING_END:case s.Bx.THINKING_TEXT_MESSAGE_START:case s.Bx.THINKING_TEXT_MESSAGE_CONTENT:case s.Bx.THINKING_TEXT_MESSAGE_END:case s.Bx.REASONING_START:case s.Bx.REASONING_MESSAGE_START:case s.Bx.REASONING_MESSAGE_CONTENT:case s.Bx.REASONING_MESSAGE_END:case s.Bx.REASONING_END:return[...l(),e];
1071case s.Bx.RAW:case s.Bx.ACTIVITY_SNAPSHOT:case s.Bx.ACTIVITY_DELTA:case s.Bx.REASONING_ENCRYPTED_VALUE:return[e];case s.Bx.TEXT_MESSAGE_CHUNK:let t=[];if(("text"!==o||void 0!==e.messageId&&e.messageId!==r?.messageId)&&t.push(...l()),"text"!==o){if(void 0===e.messageId)throw Error("First TEXT_MESSAGE_CHUNK must have a messageId");r={messageId:e.messageId,name:e.name},o="text";let i={type:s.Bx.TEXT_MESSAGE_START,messageId:e.messageId,role:e.role||"assistant",...void 0!==e.name&&{name:e.name}};t.push(i),n?.event("TRANSFORM","TEXT_MESSAGE_START",i,{messageId:e.messageId})}if(void 0!==e.delta){let i={type:s.Bx.TEXT_MESSAGE_CONTENT,messageId:r.messageId,delta:e.delta};t.push(i),n?.event("TRANSFORM","TEXT_MESSAGE_CONTENT",i,{messageId:r.messageId})}return t;case s.Bx.TOOL_CALL_CHUNK:let u=[];if(("tool"!==o||void 0!==e.toolCallId&&e.toolCallId!==i?.toolCallId)&&u.push(...l()),"tool"!==o){if(void 0===e.toolCallId)throw Error("First TOOL_CALL_CHUNK must have a toolCallId");if(void 0===e.toolCallName)throw Error("First TOOL_CALL_CHUNK must have a toolCallName");i={toolCallId:e.toolCallId,toolCallName:e.toolCallName,parentMessageId:e.parentMessageId},o="tool";let t={type:s.Bx.TOOL_CALL_START,toolCallId:e.toolCallId,toolCallName:e.toolCallName,parentMessageId:e.parentMessageId};u.push(t),n?.event("TRANSFORM","TOOL_CALL_START",t,{toolCallId:e.toolCallId,toolCallName:e.toolCallName})}if(void 0!==e.delta){let t={type:s.Bx.TOOL_CALL_ARGS,toolCallId:i.toolCallId,delta:e.delta};u.push(t),n?.event("TRANSFORM","TOOL_CALL_ARGS",t,{toolCallId:i.toolCallId})}return u;case s.Bx.REASONING_MESSAGE_CHUNK:let c=[];if(("reasoning"!==o||e.messageId&&e.messageId!==a?.messageId)&&c.push(...l()),"reasoning"!==o){if(void 0===e.messageId)throw Error("First REASONING_MESSAGE_CHUNK must have a messageId");a={messageId:e.messageId},o="reasoning";let t={type:s.Bx.REASONING_MESSAGE_START,messageId:e.messageId};c.push(t),n?.event("TRANSFORM","REASONING_MESSAGE_START",t,{messageId:e.messageId})}if(void 0!==e.delta){let t={type:s.Bx.REASONING_MESSAGE_CONTENT,messageId:a.messageId,delta:e.delta};c.push(t),n?.event("TRANSFORM","REASONING_MESSAGE_CONTENT",t,{messageId:a.messageId})}return c}return e.type,[]}),(0,V.j)(()=>{l()}))};function nv(e,t=new Date){return void 0!==e.expiresAt&&new Date(e.expiresAt)<=t}function nb(e,t){let n=new Set(e.map(e=>e.id)),r=new Set(Object.keys(t)),i=[...n].filter(e=>!r.has(e));if(i.length>0)throw Error(`buildResumeArray: missing responses for open interrupts: ${i.join(", ")}`);let a=[...r].filter(e=>!n.has(e));if(a.length>0)throw Error(`buildResumeArray: responses reference unknown interrupt ids: ${a.join(", ")}`);return e.map(e=>{let n=t[e.id];if("resolved"===n.status){let t={interruptId:e.id,status:"resolved"};return void 0!==n.payload&&(t.payload=n.payload),t}return{interruptId:e.id,status:"cancelled"}})}var ny=class{runNext(e,t){return t.run(e).pipe(ng(!1))}runNextWithState(e,t){let n=tJ(e.messages||[]),r=tJ(e.state||{}),i=new Y.m;return t6(e,i,t,[]).subscribe(e=>{void 0!==e.messages&&(n=e.messages),void 0!==e.state&&(r=e.state)}),this.runNext(e,t).pipe(X(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:tJ(n),state:tJ(r)})))}},nE=class extends ny{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function nT(e){let t=e.content;if(Array.isArray(t)){let n=t.filter(e=>"object"==typeof e&&!!e&&"type"in e&&"text"===e.type&&"string"==typeof e.text).map(e=>e.text).join("");return{...e,content:n}}return"string"==typeof t?e:{...e,content:""}}var nk=class extends ny{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(nT)};return this.runNext(i,t)}};let n_="THINKING_START",nA="THINKING_END",nx="THINKING_TEXT_MESSAGE_START",nw="THINKING_TEXT_MESSAGE_CONTENT",nS="THINKING_TEXT_MESSAGE_END";var nC=class extends ny{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warnAboutTransformation(e,t){"u">typeof tQ&&void 0!==tQ.env&&tQ.env.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is converting ${e} to ${t}. To remove this warning, upgrade your AG-UI integration package (e.g. @ag-ui/langgraph). To surpress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in y
1071our .env file.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.runNext(e,t).pipe((0,en.T)(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case n_:{this.currentReasoningId=t0();let{title:t,...n}=e;return this.warnAboutTransformation(n_,s.Bx.REASONING_START),{...n,type:s.Bx.REASONING_START,messageId:this.currentReasoningId}}case nx:return this.currentMessageId=t0(),this.warnAboutTransformation(nx,s.Bx.REASONING_MESSAGE_START),{...e,type:s.Bx.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:"assistant"};case nw:{let{delta:t,...n}=e;return this.warnAboutTransformation(nw,s.Bx.REASONING_MESSAGE_CONTENT),{...n,type:s.Bx.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??t0(),delta:t}}case nS:{let t=this.currentMessageId??t0();return this.warnAboutTransformation(nS,s.Bx.REASONING_MESSAGE_END),{...e,type:s.Bx.REASONING_MESSAGE_END,messageId:t}}case nA:{let t=this.currentReasoningId??t0();return this.warnAboutTransformation(nA,s.Bx.REASONING_END),{...e,type:s.Bx.REASONING_END,messageId:t}}default:return e}}};function nI(e){let t=e.content;if(!Array.isArray(t))return e;let n=t.map(e=>{var t;let n;return"object"==typeof e&&e&&"type"in e&&"binary"===e.type&&"mimeType"in e&&"string"==typeof e.mimeType?(n=(t=e.mimeType).startsWith("image/")?"image":t.startsWith("audio/")?"audio":t.startsWith("video/")?"video":"document",e.data?{type:n,source:{type:"data",value:e.data,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e.url?{type:n,source:{type:"url",value:e.url,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e):e});return{...e,content:n}}var nN=class extends ny{run(e,t){let n={...e,messages:e.messages.map(nI)};return this.runNext(n,t)}},nO=class{get maxVersion(){return"0.0.57"}get debug(){return this._debug}set debug(e){this._debug=t4(e),this._debugLogger=t8(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){"boolean"==typeof e?this._debugLogger=e?t8(t4(!0)):void 0:this._debugLogger=e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.agentId=e,this.description=t??"",this.threadId=n??(0,o.A)(),this.messages=tJ(r??[]),this.state=tJ(i??{}),this._debug=t4(a),this._debugLogger=t8(this._debug),0>=tX(this.maxVersion,"0.0.39")&&this.middlewares.unshift(new nk),0>=tX(this.maxVersion,"0.0.45")&&this.middlewares.unshift(new nC),0>=tX(this.maxVersion,"0.0.47")&&this.middlewares.unshift(new nN)}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(e=>"function"==typeof e?new nE(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{let n;this.isRunning=!0,this.agentId=this.agentId??(0,o.A)();let r=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle("LIFECYCLE","Run started:",{agentId:this.agentId,threadId:this.threadId});let i,a=new Set(this.messages.map(e=>e.id)),s=[{onRunFinishedEvent:e=>{"success"===e.outcome&&(i=e.result)}},...this.subscribers,t??{}];
1071await this.onInitialize(r,s),this.activeRunDetach$=new G.B,this.activeRunCompletionPromise=new Promise(e=>{n=e}),await (0,W.s)((0,K.F)(()=>0===this.middlewares.length?this.run(r):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(r),ng(this.debugLogger),t7(this.debugLogger),e=>e.pipe((0,er.Q)(this.activeRunDetach$)),e=>this.apply(r,e,s),e=>this.processApplyEvents(r,e,s),(0,ei.W)(e=>(this.debugLogger?.lifecycle("LIFECYCLE","Run errored:",{agentId:this.agentId,error:e instanceof Error?e.message:String(e)}),this.isRunning=!1,this.onError(r,e,s))),(0,V.j)(()=>{this.debugLogger?.lifecycle("LIFECYCLE","Run finished:",{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(r,s),n?.(),n=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))((0,B.of)(null)));let l=tJ(this.messages).filter(e=>!a.has(e.id));return{result:i,newMessages:l}}finally{this.isRunning=!1}}connect(e){throw new s.Qk}async connectAgent(e,t){try{let n;this.isRunning=!0,this.agentId=this.agentId??(0,o.A)();let r=this.prepareRunAgentInput(e),i,a=new Set(this.messages.map(e=>e.id)),l=[{onRunFinishedEvent:e=>{"success"===e.outcome&&(i=e.result)}},...this.subscribers,t??{}];await this.onInitialize(r,l),this.activeRunDetach$=new G.B,this.activeRunCompletionPromise=new Promise(e=>{n=e}),await (0,W.s)((0,K.F)(()=>(0,H.v)(()=>this.connect(r)),ng(this.debugLogger),t7(this.debugLogger),e=>e.pipe((0,er.Q)(this.activeRunDetach$)),e=>this.apply(r,e,l),e=>this.processApplyEvents(r,e,l),(0,ei.W)(e=>(this.isRunning=!1,e instanceof s.Qk?j.w:this.onError(r,e,l))),(0,V.j)(()=>{this.isRunning=!1,this.onFinalize(r,l),n?.(),n=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))((0,B.of)(null)),{defaultValue:void 0});let u=tJ(this.messages).filter(e=>!a.has(e.id));return{result:i,newMessages:u}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){if(!this.activeRunDetach$)return;let e=this.activeRunCompletionPromise??Promise.resolve();this.activeRunDetach$.next(),this.activeRunDetach$?.complete(),await e}apply(e,t,n){return t6(e,t,this,n,this.debugLogger)}
1071processApplyEvents(e,t,n){return t.pipe((0,ea.M)(t=>{t.messages&&(this.messages=t.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state&&(this.state=t.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){let t=tJ(this.messages).filter(e=>"activity"!==e.role);return{threadId:this.threadId,runId:e?.runId||(0,o.A)(),tools:tJ(e?.tools??[]),context:tJ(e?.context??[]),forwardedProps:tJ(e?.forwardedProps??{}),state:tJ(this.state),messages:t,...e?.resume===void 0?{}:{resume:tJ(e.resume)}}}async onInitialize(e,t){if(this.pendingInterrupts.length>0){let t=new Set((e.resume??[]).map(e=>e.interruptId)),n=this.pendingInterrupts.map(e=>e.id).filter(e=>!t.has(e));if(n.length>0)throw new s.$e(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(", ")}`);for(let e of this.pendingInterrupts)if(nv(e))throw new s.$e(`Interrupt ${e.id} expired at ${e.expiresAt}`)}let n=await t3(t,this.messages,this.state,(t,n,r)=>t.onRunInitialized?.({messages:n,state:r,agent:this,input:e}));(void 0!==n.messages||void 0!==n.state)&&(n.messages&&(this.messages=n.messages,e.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),n.state&&(this.state=n.state,e.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}onError(e,t,n){return(0,$.H)(t3(n,this.messages,this.state,(n,r,i)=>n.onRunFailed?.({error:t,messages:r,state:i,agent:this,input:e}))).pipe((0,en.T)(r=>{if((void 0!==r.messages||void 0!==r.state)&&(void 0!==r.messages&&(this.messages=r.messages,n.forEac
1071h(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),void 0!==r.state&&(this.state=r.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))),!0!==r.stopPropagation){let e=String(t);if("AbortError"!==t.name&&"Fetch is aborted"!==t.message&&"signal is aborted without reason"!==t.message&&"component unmounted"!==t.message&&"component unmounted"!==e)throw console.error("Agent execution failed:",t),t}return{}}))}async onFinalize(e,t){let n=await t3(t,this.messages,this.state,(t,n,r)=>t.onRunFinalized?.({messages:n,state:r,agent:this,input:e}));(void 0!==n.messages||void 0!==n.state)&&(void 0!==n.messages&&(this.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),void 0!==n.state&&(this.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=tJ(this.messages),e.state=tJ(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e.pendingInterrupts=tJ(this.pendingInterrupts),e}addMessage(e){this.messages.push(e),(async()=>{for(let t of this.subscribers)await t.onNewMessage?.({message:e,messages:this.messages,state:this.state,agent:this});if("assistant"===e.role&&e.toolCalls)for(let t of e.toolCalls)for(let e of this.subscribers)await e.onNewToolCall?.({toolCall:t,messages:this.messages,state:this.state,agent:this});for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}addMessages(e){this.messages.push(...e),(async()=>{for(let t of e){for(let e of this.subscribers)await e.onNewMessage?.({message:t,messages:this.messages,state:this.state,agent:this});if("assistant"===t.role&&t.toolCalls)for(let e of t.toolCalls)for(let t of this.subscribers)await t.onNewToolCall?.({toolCall:e,messages:this.messages,state:this.state,agent:this})}for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setMessages(e){this.messages=tJ(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=tJ(e),(async()=>{for(let e of this.subscribers)await e.onStateChanged?.({messages:this.messages,state:this.state,agent:this})})()}legacy_to_be_removed_runAgentBridged(e){let t,n,r;this.agentId=this.agentId??(0,o.A)();let i=this.prepareRunAgentInput(e);return(0===this.middlewares.length?this.run(i):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(i)).pipe(ng(this.debugLogger),t7(this.debugLogger),(t=this.threadId,n=i.runId,r=this.agentId,e=>{let i={},a=!0,o=!0,l="",u=null,c=null,d=[],h={},p=e=>{"object"==typeof e&&e&&("messages"in e&&delete e.messages,i=e)};return e.pipe((0,q.Z)(e=>{switch(e.type){case s.Bx.TEXT_MESSAGE_START:return[{type:nr.enum.TextMessageStart,messageId:e.messageId,role:e.role}];case s.Bx.TEXT_MESSAGE_CONTENT:return[{type:nr.enum.TextMessageContent,messageId:e.messageId,content:e.delta}];case s.Bx.TEXT_MESSAGE_END:return[{type:nr.enum.TextMessageEnd,messageId:e.messageId}];case s.Bx.TOOL_CALL_START:return d.push({id:e.toolCallId,type:"function",function:{name:e.toolCallName,arguments:""}}),o=!0,h[e.toolCallId]=e.toolCallName,[{type:nr.enum.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}];case s.Bx.TOOL_CALL_ARGS:{let s=d.find(t=>t.id===e.toolCallId);if(!s)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${e.toolCallId}'`),[];s.function.arguments+=e.delta;let u=!1;if(c){let e=c.find(e=>e.tool==s.function.name);if(e)try{let t=JSON.parse(es(s.function.arguments));e.tool_argument&&e.tool_argument in t?(p({...i,[e.state_key]:t[e.tool_argument]}
1071),u=!0):e.tool_argument||(p({...i,[e.state_key]:t}),u=!0)}catch{}}return[{type:nr.enum.ActionExecutionArgs,actionExecutionId:e.toolCallId,args:e.delta},...u?[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:a,role:"assistant",state:JSON.stringify(i),active:o}]:[]]}case s.Bx.TOOL_CALL_END:return[{type:nr.enum.ActionExecutionEnd,actionExecutionId:e.toolCallId}];case s.Bx.TOOL_CALL_RESULT:return[{type:nr.enum.ActionExecutionResult,actionExecutionId:e.toolCallId,result:e.content,actionName:h[e.toolCallId]||"unknown"}];case s.Bx.RAW:return[];case s.Bx.CUSTOM:switch(e.name){case"Exit":a=!1;break;case"PredictState":c=e.value}return[{type:nr.enum.MetaEvent,name:e.name,value:e.value}];case s.Bx.STATE_SNAPSHOT:return p(e.snapshot),[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:a,role:"assistant",state:JSON.stringify(i),active:o}];case s.Bx.STATE_DELTA:{let s=F.applyPatch(i,e.delta,!0,!1);return s?(p(s.newDocument),[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:a,role:"assistant",state:JSON.stringify(i),active:o}]):[]}case s.Bx.MESSAGES_SNAPSHOT:return u=e.messages,[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:a,role:"assistant",state:JSON.stringify({...i,...u?{messages:u}:{}}),active:!0}];case s.Bx.RUN_STARTED:return[];case s.Bx.RUN_FINISHED:return u&&(i.messages=u),0===Object.keys(i).length?[]:[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:a,role:"assistant",state:JSON.stringify({...i,...u?{messages:function(e){let t=[];for(let n of e)if("assistant"===n.role||"user"===n.role||"system"===n.role){let e=nm(n.content);if(e){let r={id:n.id,role:n.role,content:e};t.push(r)}if("assistant"===n.role&&n.toolCalls&&n.toolCalls.length>0)for(let e of n.toolCalls){let r={id:e.id,name:e.function.name,arguments:JSON.parse(e.function.arguments),parentMessageId:n.id};t.push(r)}}else if("tool"===n.role){let r="unknown";for(let t of e)if("assistant"===t.role&&t.toolCalls?.length){for(let e of t.toolCalls)if(e.id===n.toolCallId){r=e.function.name;break}}let i={id:n.id,result:n.content,actionExecutionId:n.toolCallId,actionName:r};t.push(i)}return t}(u)}:{}}),active:!1}];case s.Bx.RUN_ERROR:return[{type:nr.enum.RunError,message:e.message,code:e.code}];case s.Bx.STEP_STARTED:return l=e.stepName,d=[],c=null,[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:a,role:"assistant",state:JSON.stringify(i),active:!0}];case s.Bx.STEP_FINISHED:return d=[],c=null,[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:a,role:"assistant",state:JSON.stringify(i),active:!1}];default:return[]}}))}),e=>e.pipe((0,en.T)(e=>(this.debugLogger?.event("LEGACY","Event:",e,{type:e.type}),e))))}},nR=class extends nO{requestInit(e){return{method:"POST",headers:{...this.headers,"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(e),signal:this.abortController.signal}}runAgent(e,t){return this.abortController=e?.abortController??new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}constructor(e){super(e),this.abortController=new AbortController,this.url=e.url,this.headers=tJ(e.headers??{}),this.fetch=e.fetch??((e,t)=>fetch(e,t))}run(e){return nn(nt(()=>this.fetch(this.url,this.requestInit(e))),this.debugLogger)}clone(){let e=super.clone();e.url=this.url,e.headers=tJ(this.headers??{}),e.fetch=this.fetch;let t=new AbortController,n=this.abortController.signal;return n.aborted&&t.abort(n.reason),e.abortController=t,e}}},45907:(e,t,n)=>{n.d(t,{x:()=>a});var r=n(69899),i=n(39097);function a(e){return(0,i.T)(null==e?void 0:e[r.l])}},46072:(e,t,n)=>{n.d(t,{S:()=>a});var r=n(96948),i=n(28400);function a(e,t){var n;return(0,r.N)((n=arguments.length>=2,function(r,a){var o=n,s=t,l=0;r.subscribe((0,i._)(a,function(t){var n=l++;s=o?e(s,t,n):(o=!0,t),a.next(s)},void 0))}))}},46074:(e,t,n)=>{n.d(t,{Te:()=>y});var r=n(12115),i=n(47650);function a(e,t,n){let r,i=n.initialDeps??[],a=!0;function o(){var o,s,l;let u,c;n.key&&(null==(o=n.debug)?void 0:o.call(n))&&(u=Date.now());let d=e();if(!(d.length!==i.length||d.some((e,t)=>i[t]!==e)))return r;if(i=d,n.key&&(null==(s=n.debug)?void 0:s.call(n))&&(c=Date.now()),r=t(...d),n.key&&(null==(l=n.debug)?void 0:l.call(n))){let e=Math.round((Date.now()-u)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
1072            font-size: .6rem;
1073            font-weight: bold;
1074            color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return(null==n?void 0:n.onChange)&&!(a&&n.skipInitialOnChange)&&n.onChange(r),a=!1,r}return o.updateDeps=e=>{i=e},o}function o(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let s=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},l=e=>e,u=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},c=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(s(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(s(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},d={passive:!0},h="undefined"==typeof window||"onscrollend"in window,p=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,a=e.options.useScrollendEvent&&h?()=>void 0:((e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}})(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:s}=e.options;i=o?n.scrollLeft*(s&&-1||1):n.scrollTop,a(),t(i,r)},s=o(!0),l=o(!1);n.addEventListener("scroll",s,d);let u=e.options.useScrollendEvent&&h;return u&&n.addEventListener("scrollend",l,d),()=>{n.removeEventListener("scroll",s),u&&n.removeEventListener("scrollend",l)}},f=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]}
1074,m=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;null==(a=null==(i=r.scrollElement)?void 0:i.scrollTo)||a.call(i,{[r.options.horizontal?"left":"top"]:e+t,behavior:n})};class g{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e,t,n;return(null==(n=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:n.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected)return void this.observer.unobserve(t);this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:l,rangeExtractor:u,onChange:()=>{},measureElement:f,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=a(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(null==a||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>
1074e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=a(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,a,o)=>(void 0!==this.prevLanes&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=a(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o},s)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let u=this.measurementsCache.slice(0,l),c=Array(a).fill(void 0);for(let e=0;e<l;e++){let t=u[e];t&&(c[t.lane]=e)}for(let i=l;i<e;i++){let e,a,l=r(i),d=this.laneAssignments.get(i),h="estimate"===o||s.has(l);if(void 0!==d&&this.options.lanes>1){let r=c[e=d],i=void 0!==r?u[r]:void 0;a=i?i.end+this.options.gap:t+n}else{let r=1===this.options.lanes?u[i-1]:this.getFurthestMeasurement(u,i);a=r?r.end+this.options.gap:t+n,e=r?r.lane:i%this.options.lanes,this.options.lanes>1&&h&&this.laneAssignments.set(i,e)}let p=s.get(l),f="number"==typeof p?p:this.options.estimateSize(i),m=a+f;u[i]={index:i,start:a,size:f,end:m,key:l,lane:e},c[e]=i}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=a(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:i};let a=v(0,i,t=>e[t].start,n),o=a;if(1===r)for(;o<i&&e[o].end<n+t;)o++;else if(r>1){let s=Array(r).fill(0);for(;o<i&&s.some(e=>e<n+t);){let t=e[o];s[t.lane]=t.end,o++}let l=Array(r).fill(n+t);for(;a>=0&&l.some(e=>e>=n);){let t=e[a];l[t.lane]=t.start,a--}a=Math.max(0,a-a%r),o=Math.min(i,o+(r-1-o%r))}return{startIndex:a,endIndex:o}}({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}
1074),this.getVirtualIndexes=a(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>null===r||null===i?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let n=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==n&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,n-t),i=Math.min(this.options.count-1,n+t);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;let r=this.measurementsCache[e];if(!r)return;let i=t-(this.itemSizeCache.get(r.key)??r.size);0!==i&&((null==(n=this.scrollState)?void 0:n.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(r,i,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,t)),this.notify(!1))},this.getVirtualItems=a(()=>
1074[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return o(t[v(0,t.length-1,e=>o(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();return"auto"===t&&(t=e>=i+r?"end":"start"),"center"===t?e+=(n-r)/2:"end"===t&&(e-=r),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if("auto"===t)if(i.end>=r+n-this.options.scrollPaddingEnd)t="end";else{if(!(i.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a="end"===t?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:n="auto"}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:n="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var e;let t,n=this.getMeasurements();if(0===n.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=n[n.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),r=n.length-1;for(;r>=0&&e.some(e=>null===e);){let t=n[r];null===e[t.lane]&&(e[t.lane]=t.end),r--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&1.01>Math.abs(t-this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.scrollState=null;return}}else this.scrollState.stableFrames=0,n&&(this.scrollState.lastTargetOffset=t,this.scrollState.behavior="auto",this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}let v=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else{if(!(a>r))return i;t=i-1}}return e>0?e-1:0},b="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function y(e){return function({useFlushSync:e=!0,...t}){let n=r.useReducer(()=>({}),{})[1],a={...t,onChange:(r,a)=>{var o;e&&a?(0,i.flushSync)(n):n(),null==(o=t.onChange)||o.call(t,r,a)}},[o]=r.useState(()=>new g(a));return o.setOptions(a),b(()=>o._didMount(),[]),b(()=>o._willUpdate()),o}({observeElementRect:c,observeElementOffset:p,scrollToFn:m,...e})}},47211:(e,t,n)=>{n.d(t,{w:()=>r});var r=new(n(45037)).c(function(e){return e.complete()})},47520:(e,t,n)=>{n.d(t,{Kq:()=>G,UC:()=>W,ZL:()=>V,bL:()=>Y,i3:()=>K,l9:()=>q});var r=n(12115),i=n(92556),a=n(94446),o=n(3468),s=n(44831),l=n(68946),u=n(66093),c=n(75433),d=n(76842),h=n(97602),p=n(32467),f=n(23558),m=n(861),g=n(95155),[v,b]=(0,o.A)("Tooltip",[u.Bk]),y=(0,u.Bk)(),E="TooltipProvider",T="tooltip.open",[k,_]=v(E),A=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:i=300,disableHoverableContent:a=!1,children:o}=e,s=r.useRef(!0),l=r.useRef(!1),u=r.useRef(0);return r.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,g.jsx)(k,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:r.useCallback(()=>{i<=0||(window.clearTimeout(u.current),s.current=!1)},[i]),onClose:r.useCallback(()=>{i<=0||(window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,i))},[i]),isPointerInTransitRef:l,onPointerInTransitChange:r.useCallback(e=>{l.current=e},[]),disableHoverableContent:a,children:o})};A.displayName=E;var x="Tooltip",[w,S]=v(x),C=e=>{let{__scopeTooltip:t,children:n,open:i,defaultOpen:a,onOpenChange:o,disableHoverableContent:s,delayDuration:c}=e,d=_(x,e.__scopeTooltip),h=y(t),[p,m]=r.useState(null),v=(0,l.B)(),b=r.useRef(0),E=null!=s?s:d.disableHoverableContent,k=null!=c?c:d.delayDuration,A=r.useRef(!1),[S,C]=(0,f.i)({prop:i,defaultProp:null!=a&&a,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(T))):d.onClose(),null==o||o(e)},caller:x}),I=r.useMemo(()=>S?A.current?"delayed-open":"instant-open":"closed",[S]),N=r.useCallback(()=>{window.clearTimeout(b.current),b.current=0,A.current=!1,C(!0)},[C]),O=r.useCallback(()=>{window.clearTimeout(b.current),b.current=0,C(!1)},[C]),R=r.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{A.current=!0,C(!0),b.current=0},k)},[k,C]);return r.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),(0,g.jsx)(u.bL,{...h,children:(0,g.jsx)(w,{scope:t,contentId:v,open:S,stateAttribute:I,trigger:p,onTriggerChange:m,onTriggerEnter:r.useCallback(()=>{d.isOpenDelayedRef.current?R():N()},[d.isOpenDelayedRef,R,N]),onTriggerLeave:r.useCallback(()=>{E?O():(window.clearTimeout(b.current),b.current=0)},[O,E]),onOpen:N,onClose:O,disableHoverableContent:E,children:n})})};C.displayName=x;var I="TooltipTrigger",N=r.forwardRef((e,t)=>
1074{let{__scopeTooltip:n,...o}=e,s=S(I,n),l=_(I,n),c=y(n),d=r.useRef(null),p=(0,a.s)(t,d,s.onTriggerChange),f=r.useRef(!1),m=r.useRef(!1),v=r.useCallback(()=>f.current=!1,[]);return r.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),(0,g.jsx)(u.Mz,{asChild:!0,...c,children:(0,g.jsx)(h.sG.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:p,onPointerMove:(0,i.mK)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(m.current||l.isPointerInTransitRef.current||(s.onTriggerEnter(),m.current=!0))}),onPointerLeave:(0,i.mK)(e.onPointerLeave,()=>{s.onTriggerLeave(),m.current=!1}),onPointerDown:(0,i.mK)(e.onPointerDown,()=>{s.open&&s.onClose(),f.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:(0,i.mK)(e.onFocus,()=>{f.current||s.onOpen()}),onBlur:(0,i.mK)(e.onBlur,s.onClose),onClick:(0,i.mK)(e.onClick,s.onClose)})})});N.displayName=I;var O="TooltipPortal",[R,D]=v(O,{forceMount:void 0}),L=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=S(O,t);return(0,g.jsx)(R,{scope:t,forceMount:n,children:(0,g.jsx)(d.C,{present:n||a.open,children:(0,g.jsx)(c.Z,{asChild:!0,container:i,children:r})})})};L.displayName=O;var P="TooltipContent",M=r.forwardRef((e,t)=>{let n=D(P,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=S(P,e.__scopeTooltip);return(0,g.jsx)(d.C,{present:r||o.open,children:o.disableHoverableContent?(0,g.jsx)(H,{side:i,...a,ref:t}):(0,g.jsx)(F,{side:i,...a,ref:t})})}),F=r.forwardRef((e,t)=>{let n=S(P,e.__scopeTooltip),i=_(P,e.__scopeTooltip),o=r.useRef(null),s=(0,a.s)(t,o),[l,u]=r.useState(null),{trigger:c,onClose:d}=n,h=o.current,{onPointerInTransitChange:p}=i,f=r.useCallback(()=>{u(null),p(!1)},[p]),m=r.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw Error("unreachable")}}(r,n.getBoundingClientRect());u(function(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}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)}([...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,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,i),...function(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect())])),p(!0)},[p]);return r.useEffect(()=>()=>f(),[f]),r.useEffect(()=>{if(c&&h){let e=e=>m(e,h),t=e=>m(e,c);return c.addEventListener("pointerleave",e),h.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),h.removeEventListener("pointerleave",t)}}},[c,h,m,f]),r.useEffect(()=>{if(l){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==h?void 0:h.contains(t)),i=!function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],l=o.x,u=o.y,c=s.x,d=s.y;u>r!=d>r&&n<(c-l)*(r-u)/(d-u)+l&&(i=!i)}return i}(n,l);r?f():i&&(f(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,h,l,d,f]),(0,g.jsx)(H,{...e,ref:s})}),[B,j]=v(x,{isInside:!1}),U=(0,p.Dc)("TooltipContent"),H=r.forwardRef((e,t)=>{let{__scopeTooltip:n,children:i,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:l,...c}=e,d=S(P,n),h=y(n),{onClose:p}=d;return r.useEffect(()=>(document.addEventListener(T,p),()=>document.removeEventListener(T,p)),[p]),r.useEffect(()=>{if(d.trigger){let e=e=>{e.target instanceof Node&&e.target.contains(d.trigger)&&p()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,p]),(0,g.jsx)(s.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:(0,g.jsxs)(u.UC,{"data-state":d.stateAttribute,...h,...c,ref:t,style:{...c.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:[(0,g.jsx)(U,{children:i}),(0,g.jsx)(B,{scope:n,isInside:!0,children:(0,g.jsx)(m.bL,{id:d.contentId,role:"tooltip",children:a||i})})]})})});M.displayName=P;var $="TooltipArrow",z=r.forwardRef((e,t)=>
1074{let{__scopeTooltip:n,...r}=e,i=y(n);return j($,n).isInside?null:(0,g.jsx)(u.i3,{...i,...r,ref:t})});z.displayName=$;var G=A,Y=C,q=N,V=L,W=M,K=z},47948:(e,t,n)=>{n.d(t,{G:()=>r});var r=(0,n(10899).L)(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}})},48204:(e,t,n)=>{n.d(t,{$e:()=>D,Bx:()=>K,Qk:()=>L,rV:()=>eL});var r=n(98734),i=n(44193);let a=r.Ik({name:r.Yj(),arguments:r.Yj()}),o=r.Ik({id:r.Yj(),type:r.eu("function"),function:a,encryptedValue:r.Yj().optional()}),s=r.Ik({id:r.Yj(),role:r.Yj(),content:r.Yj().optional(),name:r.Yj().optional(),encryptedValue:r.Yj().optional()}),l=r.Ik({type:r.eu("text"),text:r.Yj()}),u=r.Ik({type:r.eu("data"),value:r.Yj(),mimeType:r.Yj()}),c=r.Ik({type:r.eu("url"),value:r.Yj(),mimeType:r.Yj().optional()}),d=r.gM("type",[u,c]),h=r.Ik({type:r.eu("image"),source:d,metadata:r.L5().optional()}),p=r.Ik({type:r.eu("audio"),source:d,metadata:r.L5().optional()}),f=r.Ik({type:r.eu("video"),source:d,metadata:r.L5().optional()}),m=r.Ik({type:r.eu("document"),source:d,metadata:r.L5().optional()}),g=r.Ik({type:r.eu("binary"),mimeType:r.Yj(),id:r.Yj().optional(),url:r.Yj().optional(),data:r.Yj().optional(),filename:r.Yj().optional()}),v=(e,t)=>{e.id||e.url||e.data||t.addIssue({code:i.eq.custom,message:"BinaryInputContent requires at least one of id, url, or data.",path:["id"]})};g.superRefine((e,t)=>{v(e,t)});let b=r.gM("type",[l,h,p,f,m,g]).superRefine((e,t)=>{"binary"===e.type&&v(e,t)}),y=s.extend({role:r.eu("developer"),content:r.Yj()}),E=s.extend({role:r.eu("system"),content:r.Yj()}),T=s.extend({role:r.eu("assistant"),content:r.Yj().optional(),toolCalls:r.YO(o).optional()}),k=s.extend({role:r.eu("user"),content:r.KC([r.Yj(),r.YO(b)])}),_=r.Ik({id:r.Yj(),content:r.Yj(),role:r.eu("tool"),toolCallId:r.Yj(),error:r.Yj().optional(),encryptedValue:r.Yj().optional()}),A=r.Ik({id:r.Yj(),role:r.eu("activity"),activityType:r.Yj(),content:r.g1(r.bz())}),x=r.Ik({id:r.Yj(),role:r.eu("reasoning"),content:r.Yj(),encryptedValue:r.Yj().optional()}),w=r.gM("role",[y,E,T,k,_,A,x]);r.KC([r.eu("developer"),r.eu("system"),r.eu("assistant"),r.eu("user"),r.eu("tool"),r.eu("activity"),r.eu("reasoning")]);let S=r.Ik({description:r.Yj(),value:r.Yj()}),C=r.Ik({name:r.Yj(),description:r.Yj(),parameters:r.bz(),metadata:r.g1(r.bz()).optional()}),I=r.Ik({id:r.Yj(),reason:r.Yj(),message:r.Yj().optional(),toolCallId:r.Yj().optional(),responseSchema:r.g1(r.bz()).optional(),expiresAt:r.Yj().optional(),metadata:r.g1(r.bz()).optional()}),N=r.Ik({interruptId:r.Yj(),status:r.k5(["resolved","cancelled"]),payload:r.bz().optional()}),O=r.Ik({threadId:r.Yj(),runId:r.Yj(),parentRunId:r.Yj().optional(),state:r.bz(),messages:r.YO(w),tools:r.YO(C),context:r.YO(S),forwardedProps:r.bz(),resume:r.YO(N).optional()}),R=r.bz();var D=class extends Error{constructor(e){super(e)}},L=class extends D{constructor(){super("Connect not implemented. This method is not supported by the current agent.")}};let P=r.Ik({name:r.Yj(),description:r.Yj().optional()}),M=r.Ik({name:r.Yj().optional(),type:r.Yj().optional(),description:r.Yj().optional(),version:r.Yj().optional(),provider:r.Yj().optional(),documentationUrl:r.Yj().optional(),metadata:r.g1(r.L5()).optional()}),F=r.Ik({streaming:r.zM().optional(),websocket:r.zM().optional(),httpBinary:r.zM().optional(),pushNotifications:r.zM().optional(),resumable:r.zM().optional()}),B=r.Ik({supported:r.zM().optional(),items:r.YO(C).optional(),parallelCalls:r.zM().optional(),clientProvided:r.zM().optional()}),j=r.Ik({structuredOutput:r.zM().optional(),supportedMimeTypes:r.YO(r.Yj()).optional()}),U=r.Ik({snapshots:r.zM().optional(),deltas:r.zM().optional(),memory:r.zM().optional(),persistentState:r.zM().optional()}),H=r.Ik({supported:r.zM().optional(),delegation:r.zM().optional(),handoffs:r.zM().optional(),subAgents:r.YO(P).optional()}),$=r.Ik({supported:r.zM().optional(),streaming:r.zM().optional(),encrypted:r.zM().optional()}),z=r.Ik({image:r.zM().optional(),audio:r.zM().optional(),video:r.zM().optional(),pdf:r.zM().optional(),file:r.zM().optional()}),G=r.Ik({image:r.zM().optional(),audio:r.zM().optional()}),Y=r.Ik({input:z.optional(),output:G.optional()}),q=r.Ik({codeExecution:r.zM().optional(),sandboxed:r.zM().optional(),maxIterations:r.ai().optional(),maxExecutionTime:r.ai().optional()}),V=r.Ik({supported:r.zM().optional(),approvals:r.zM().optional(),interventions:r.zM().optional(),feedback:r.zM().optional(),interrupts:r.zM().optional(),approveWithEdits:r.zM().optional()});r.Ik({identity:M.optional(),transport:F.optional(),tools:B.optional(),output:j.optional(),state:U.optional(),multiAgent:H.optional(),reasoning:$.optional(),multimodal:Y.optional(),execution:q.optional(),humanInTheLoop:V.optional(),custom:r.g1(r.L5()).optional()});let W=r.KC([r.eu("developer"),r.eu("system"),r.eu("assistant"),r.eu("user")]),K=function(e){return e.TEXT_MESSAGE_START="TEXT_MESSAGE_START",e.TEXT_MESSAGE_CONTENT="TEXT_MESSAGE_CONTENT",e.TEXT_MESSAGE_END="TEXT_MESSAGE_END",e.TEXT_MESSAGE_CHUNK="TEXT_MESSAGE_CHUNK",e.TOOL_CALL_START="TOOL_CALL_START",e.TOOL_CALL_ARGS="TOOL_CALL_ARGS",e.TOOL_CALL_END="TOOL_CALL_END",e.TOOL_CALL_CHUNK="TOOL_CALL_CHUNK",e.TOOL_CALL_RESULT="TOOL_CALL_RESULT",e.THINKING_START="THINKING_START",e.THINKING_END="THINKING_END",e.THINKING_TEXT_MESSAGE_START="THINKING_TEXT_MESSAGE_START",e.THINKING_TEXT_MESSAGE_CONTENT="THINKING_TEXT_MESSAGE_CONTENT",e.THINKING_TEXT_MESSAGE_END="THINKING_TEXT_MESSAGE_END",e.STATE_SNAPSHOT="STATE_
1074SNAPSHOT",e.STATE_DELTA="STATE_DELTA",e.MESSAGES_SNAPSHOT="MESSAGES_SNAPSHOT",e.ACTIVITY_SNAPSHOT="ACTIVITY_SNAPSHOT",e.ACTIVITY_DELTA="ACTIVITY_DELTA",e.RAW="RAW",e.CUSTOM="CUSTOM",e.RUN_STARTED="RUN_STARTED",e.RUN_FINISHED="RUN_FINISHED",e.RUN_ERROR="RUN_ERROR",e.STEP_STARTED="STEP_STARTED",e.STEP_FINISHED="STEP_FINISHED",e.REASONING_START="REASONING_START",e.REASONING_MESSAGE_START="REASONING_MESSAGE_START",e.REASONING_MESSAGE_CONTENT="REASONING_MESSAGE_CONTENT",e.REASONING_MESSAGE_END="REASONING_MESSAGE_END",e.REASONING_MESSAGE_CHUNK="REASONING_MESSAGE_CHUNK",e.REASONING_END="REASONING_END",e.REASONING_ENCRYPTED_VALUE="REASONING_ENCRYPTED_VALUE",e}({}),Z=r.Ik({type:r.fc(K),timestamp:r.ai().optional(),rawEvent:r.bz().optional()}).passthrough(),X=Z.extend({type:r.eu(K.TEXT_MESSAGE_START),messageId:r.Yj(),role:W.default("assistant"),name:r.Yj().optional()}),Q=Z.extend({type:r.eu(K.TEXT_MESSAGE_CONTENT),messageId:r.Yj(),delta:r.Yj()}),J=Z.extend({type:r.eu(K.TEXT_MESSAGE_END),messageId:r.Yj()}),ee=Z.extend({type:r.eu(K.TEXT_MESSAGE_CHUNK),messageId:r.Yj().optional(),role:W.optional(),delta:r.Yj().optional(),name:r.Yj().optional()}),et=Z.extend({type:r.eu(K.THINKING_TEXT_MESSAGE_START)}),en=Q.omit({messageId:!0,type:!0}).extend({type:r.eu(K.THINKING_TEXT_MESSAGE_CONTENT)}),er=Z.extend({type:r.eu(K.THINKING_TEXT_MESSAGE_END)}),ei=Z.extend({type:r.eu(K.TOOL_CALL_START),toolCallId:r.Yj(),toolCallName:r.Yj(),parentMessageId:r.Yj().optional()}),ea=Z.extend({type:r.eu(K.TOOL_CALL_ARGS),toolCallId:r.Yj(),delta:r.Yj()}),eo=Z.extend({type:r.eu(K.TOOL_CALL_END),toolCallId:r.Yj()}),es=Z.extend({messageId:r.Yj(),type:r.eu(K.TOOL_CALL_RESULT),toolCallId:r.Yj(),content:r.Yj(),role:r.eu("tool").optional()}),el=Z.extend({type:r.eu(K.TOOL_CALL_CHUNK),toolCallId:r.Yj().optional(),toolCallName:r.Yj().optional(),parentMessageId:r.Yj().optional(),delta:r.Yj().optional()}),eu=Z.extend({type:r.eu(K.THINKING_START),title:r.Yj().optional()}),ec=Z.extend({type:r.eu(K.THINKING_END)}),ed=Z.extend({type:r.eu(K.STATE_SNAPSHOT),snapshot:R}),eh=Z.extend({type:r.eu(K.STATE_DELTA),delta:r.YO(r.bz())}),ep=Z.extend({type:r.eu(K.MESSAGES_SNAPSHOT),messages:r.YO(w)}),ef=Z.extend({type:r.eu(K.ACTIVITY_SNAPSHOT),messageId:r.Yj(),activityType:r.Yj(),content:r.g1(r.bz()),replace:r.zM().optional().default(!0)}),em=Z.extend({type:r.eu(K.ACTIVITY_DELTA),messageId:r.Yj(),activityType:r.Yj(),patch:r.YO(r.bz())}),eg=Z.extend({type:r.eu(K.RAW),event:r.bz(),source:r.Yj().optional()}),ev=Z.extend({type:r.eu(K.CUSTOM),name:r.Yj(),value:r.bz()}),eb=Z.extend({type:r.eu(K.RUN_STARTED),threadId:r.Yj(),runId:r.Yj(),parentRunId:r.Yj().optional(),input:O.optional()}),ey=r.Ik({type:r.eu("success")}).strict(),eE=r.Ik({type:r.eu("interrupt"),interrupts:r.YO(I).min(1)}).strict(),eT=r.gM("type",[ey,eE]),ek=Z.extend({type:r.eu(K.RUN_FINISHED),threadId:r.Yj(),runId:r.Yj(),result:r.bz().optional(),outcome:eT.nullable().optional().transform(e=>e??void 0)}),e_=Z.extend({type:r.eu(K.RUN_ERROR),message:r.Yj(),code:r.Yj().optional()}),eA=Z.extend({type:r.eu(K.STEP_STARTED),stepName:r.Yj()}),ex=Z.extend({type:r.eu(K.STEP_FINISHED),stepName:r.Yj()}),ew=r.KC([r.eu("tool-call"),r.eu("message")]),eS=Z.extend({type:r.eu(K.REASONING_START),messageId:r.Yj()}),eC=Z.extend({type:r.eu(K.REASONING_MESSAGE_START),messageId:r.Yj(),role:r.eu("reasoning")}),eI=Z.extend({type:r.eu(K.REASONING_MESSAGE_CONTENT),messageId:r.Yj(),delta:r.Yj()}),eN=Z.extend({type:r.eu(K.REASONING_MESSAGE_END),messageId:r.Yj()}),eO=Z.extend({type:r.eu(K.REASONING_MESSAGE_CHUNK),messageId:r.Yj().optional(),delta:r.Yj().optional()}),eR=Z.extend({type:r.eu(K.REASONING_END),messageId:r.Yj()}),eD=Z.extend({type:r.eu(K.REASONING_ENCRYPTED_VALUE),subtype:ew,entityId:r.Yj(),encryptedValue:r.Yj()}),eL=r.gM("type",[X,Q,J,ee,eu,ec,et,en,er,ei,ea,eo,el,es,ed,eh,ep,ef,em,eg,ev,eb,ek,e_,eA,ex,eS,eC,eI,eN,eO,eR,eD])},48765:(e,t,n)=>{n.d(t,{k:()=>i});let r=[];for(let e=0;e<256;++e)r.push((e+256).toString(16).slice(1));function i(e,t=0){return(r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+"-"+r[e[t+4]]+r[e[t+5]]+"-"+r[e[t+6]]+r[e[t+7]]+"-"+r[e[t+8]]+r[e[t+9]]+"-"+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]).toLowerCase()}},49677:(e,t)=>
1074{Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){var u;return(void 0===t&&(t={}),!(u=e)||i.test(u)||n.test(u))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(o,l):e.replace(a,l)).replace(r,s))}},49914:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(67927),i=n(96948),a=n(28400);function o(){return(0,i.N)(function(e,t){e.subscribe((0,a._)(t,function(e){return(0,r.gV)(e,t)}))})}},49972:(e,t,n)=>{function r(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function i(e,t){var n=r(e,t,"get");return n.get?n.get.call(e):n.value}function a(e,t,n){var i=r(e,t,"set");if(i.set)i.set.call(e,n);else{if(!i.writable)throw TypeError("attempted to set read only private field");i.value=n}return n}n.d(t,{N:()=>h});var o,s=n(12115),l=n(3468),u=n(94446),c=n(32467),d=n(95155);function h(e){let t=e+"CollectionProvider",[n,r]=(0,l.A)(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=s.useRef(null),a=s.useRef(new Map).current;return(0,d.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let h=e+"CollectionSlot",p=(0,c.TL)(h),f=s.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=a(h,n),o=(0,u.s)(t,i.collectionRef);return(0,d.jsx)(p,{ref:o,children:r})});f.displayName=h;let m=e+"CollectionItemSlot",g="data-radix-collection-item",v=(0,c.TL)(m),b=s.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=s.useRef(null),l=(0,u.s)(t,o),c=a(m,n);return s.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,d.jsx)(v,{...{[g]:""},ref:l,children:r})});return b.displayName=m,[{Provider:o,Slot:f,ItemSlot:b},function(t){let n=a(e+"CollectionConsumer",t);return s.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(g,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},r]}var p=new WeakMap;function f(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=function(e,t){let n=e.length,r=m(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}(e,t);return -1===n?void 0:e[n]}function m(e){return e!=e||0===e?0:Math.trunc(e)}o=new WeakMap,class e extends Map{set(e,t){return p.get(this)&&(this.has(e)?i(this,o)[i(this,o).indexOf(e)]=e:i(this,o).push(e)),super.set(e,t),this}insert(e,t,n){let r,a=this.has(t),s=i(this,o).length,l=m(e),u=l>=0?l:s+l,c=u<0||u>=s?-1:u;if(c===this.size||a&&c===this.size-1||-1===c)return this.set(t,n),this;let d=this.size+ +!a;l<0&&u++;let h=[...i(this,o)],p=!1;for(let e=u;e<d;e++)if(u===e){let i=h[e];h[e]===t&&(i=h[e+1]),a&&this.delete(t),r=this.get(i),this.set(t,n)}else{p||h[e-1]!==t||(p=!0);let n=h[p?e:e-1],i=r;r=this.get(n),this.delete(n),this.set(n,i)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=i(this,o).indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=i(this,o).indexOf(e);return -1===r?this:this.insert(r,t,n)}after(e){let t=i(this,o).indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,n){let r=i(this,o).indexOf(e);return -1===r?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return a(this,o,[]),super.clear()}delete(e){let t=super.delete(e);return t&&i(this,o).splice(i(this,o).indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=f(i(this,o),e);if(void 0!==t)return this.get(t)}entryAt(e){let t=f(i(this,o),e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return i(this,o).indexOf(e)}keyAt(e){return f(i(this,o),e)}from(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}
1074}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return -1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,i]=t,a=0,o=null!=i?i:this.at(0);for(let e of this)o=0===a&&1===t.length?e:Reflect.apply(r,this,[o,e,a,this]),a++;return o}reduceRight(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,i]=t,a=null!=i?i:this.at(-1);for(let e=this.size-1;e>=0;e--){let n=this.at(e);a=e===this.size-1&&1===t.length?n:Reflect.apply(r,this,[a,n,e,this])}return a}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=[...this.entries()];return i.splice(...n),new e(i)}slice(t,n){let r=new e,i=this.size-1;if(void 0===t)return r;t<0&&(t+=this.size),void 0!==n&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}constructor(e){super(e),function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,o,{writable:!0,value:void 0}),a(this,o,[...super.keys()]),p.set(this,!0)}}},50129:(e,t,n)=>{n.d(t,{z:()=>h,B:()=>p});var r=n(12115);let i={damping:.7,stiffness:.05,mass:1.25},a=1e3/60,o=!1;function s(e,t){let n=(0,r.useCallback)(t=>(n.current=t,e(t)),t);return n}globalThis.document?.addEventListener("mousedown",()=>{o=!0}),globalThis.document?.addEventListener("mouseup",()=>{o=!1}),globalThis.document?.addEventListener("click",()=>{o=!1});let l=new Map;function u(...e){let t={...i},n=!1;for(let r of e){if("instant"===r){n=!0;continue}"object"==typeof r&&(n=!1,t.damping=r.damping??t.damping,t.stiffness=r.stiffness??t.stiffness,t.mass=r.mass??t.mass)}let r=JSON.stringify(t);return l.has(r)||l.set(r,Object.freeze(t)),n?"instant":l.get(r)}let c=(0,r.createContext)(null),d="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;function h({instance:e,children:t,resize:n,initial:i,mass:l,damping:h,stiffness:p,targetScrollTop:f,contextRef:m,...g}){let v=(0,r.useRef)(null),b=((e={})=>{let[t,n]=(0,r.useState)(!1),[i,l]=(0,r.useState)(!1!==e.initial),[c,d]=(0,r.useState)(!1),h=(0,r.useRef)(null);h.current=e;let p=(0,r.useCallback)(()=>{if(!o)return!1;let e=window.getSelection();if(!e||!e.rangeCount)return!1;let t=e.getRangeAt(0);return t.commonAncestorContainer.contains(T.current)||T.current?.contains(t.commonAncestorContainer)},[]),f=(0,r.useCallback)(e=>{g.isAtBottom=e,l(e)},[]),m=(0,r.useCallback)(e=>{g.escapedFromLock=e,n(e)},[]),g=(0,r.useMemo)(()=>{let n;return{escapedFromLock:t,isAtBottom:i,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return T.current?.scrollTop??0},set scrollTop(scrollTop){if(T.current){let{scrollBehavior:e}=getComputedStyle(T.current);"auto"!==e&&(T.current.style.scrollBehavior="auto"),T.current.scrollTop=scrollTop,g.ignoreScrollToTop=T.current.scrollTop,"auto"!==e&&(T.current.style.scrollBehavior=e)}},get targetScrollTop(){if(!T.current||!k.current)return 0;return T.current.scrollHeight-1-T.current.clientHeight},get calculatedTargetScrollTop(){if(!T.current||!k.current)return 0;let{targetScrollTop:t}=this;if(!e.targetScrollTop)return t;if(n?.targetScrollTop===t)return n.calculatedScrollTop;let r=Math.max(Math.min(e.targetScrollTop(t,{scrollElement:T.current,contentElement:k.current}),t),0);return n={targetScrollTop:t,calculatedScrollTop:r},requestAnimationFrame(()=>{n=void 0}),r},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=70}}},[]),v=(0,r.useCallback)((e={})=>{let t;"string"==typeof e&&(e={animation:e}),e.preserveScrollPosition||f(!0);let n=Date.now()+(Number(e.wait)||0),r=u(h.current,e.animation),{ignoreEscapes:i=!1}=e,o=g.calculatedTargetScrollTop;e.duration instanceof Promise?e.duration.finally(()=>{t=Date.now()}):t=n+(e.duration??0);let s=async()=>{let e=new Promise(requestAnimationFrame).then(()=>
1074{if(!g.isAtBottom)return g.animation=void 0,!1;let{scrollTop:l}=g,c=performance.now(),d=(c-(g.lastTick??c))/a;if(g.animation||(g.animation={behavior:r,promise:e,ignoreEscapes:i}),g.animation.behavior===r&&(g.lastTick=c),p()||n>Date.now())return s();if(l<Math.min(o,g.calculatedTargetScrollTop)){if(g.animation?.behavior===r){if("instant"===r)return g.scrollTop=g.calculatedTargetScrollTop,s();g.velocity=(r.damping*g.velocity+r.stiffness*g.scrollDifference)/r.mass,g.accumulated+=g.velocity*d,g.scrollTop+=g.accumulated,g.scrollTop!==l&&(g.accumulated=0)}return s()}return t>Date.now()?(o=g.calculatedTargetScrollTop,s()):(g.animation=void 0,g.scrollTop<g.calculatedTargetScrollTop)?v({animation:u(h.current,h.current.resize),ignoreEscapes:i,duration:Math.max(0,t-Date.now())||void 0}):g.isAtBottom});return e.then(e=>(requestAnimationFrame(()=>{g.animation||(g.lastTick=void 0,g.velocity=0)}),e))};return(!0!==e.wait&&(g.animation=void 0),g.animation?.behavior===r)?g.animation.promise:s()},[f,p,g]),b=(0,r.useCallback)(()=>{m(!0),f(!1)},[m,f]),y=(0,r.useCallback)(({target:e})=>{if(e!==T.current)return;let{scrollTop:t,ignoreScrollToTop:n}=g,{lastScrollTop:r=t}=g;g.lastScrollTop=t,g.ignoreScrollToTop=void 0,n&&n>t&&(r=n),d(g.isNearBottom),setTimeout(()=>{if(g.resizeDifference||t===n)return;if(p()){m(!0),f(!1);return}let e=t>r,i=t<r;if(g.animation?.ignoreEscapes){g.scrollTop=r;return}i&&(m(!0),f(!1)),e&&m(!1),!g.escapedFromLock&&g.isNearBottom&&f(!0)},1)},[m,f,p,g]),E=(0,r.useCallback)(({target:e,deltaY:t})=>{let n=e;for(;!["scroll","auto"].includes(getComputedStyle(n).overflow);){if(!n.parentElement)return;n=n.parentElement}n===T.current&&t<0&&T.current.scrollHeight>T.current.clientHeight&&!g.animation?.ignoreEscapes&&(m(!0),f(!1))},[m,f,g]),T=s(e=>{T.current?.removeEventListener("scroll",y),T.current?.removeEventListener("wheel",E),e?.addEventListener("scroll",y,{passive:!0}),e?.addEventListener("wheel",E,{passive:!0})},[]),k=s(e=>{let t;g.resizeObserver?.disconnect(),e&&(g.resizeObserver=new ResizeObserver(([e])=>{let{height:n}=e.contentRect,r=n-(t??n);if(g.resizeDifference=r,g.scrollTop>g.targetScrollTop&&(g.scrollTop=g.targetScrollTop),d(g.isNearBottom),r>=0){let e=u(h.current,t?h.current.resize:h.current.initial);v({animation:e,wait:!0,preserveScrollPosition:!0,duration:"instant"===e?void 0:350})}else g.isNearBottom&&(m(!1),f(!0));t=n,requestAnimationFrame(()=>{setTimeout(()=>{g.resizeDifference===r&&(g.resizeDifference=0)},1)})}),g.resizeObserver?.observe(e))},[]);return{contentRef:k,scrollRef:T,scrollToBottom:v,stopScroll:b,isAtBottom:i||c,isNearBottom:c,escapedFromLock:t,state:g}})({mass:l,damping:h,stiffness:p,resize:n,initial:i,targetScrollTop:r.useCallback((e,t)=>{let n=w?.targetScrollTop??f;return n?.(e,t)??e},[f])}),{scrollRef:y,contentRef:E,scrollToBottom:T,stopScroll:k,isAtBottom:_,escapedFromLock:A,state:x}=e??b,w=(0,r.useMemo)(()=>({scrollToBottom:T,stopScroll:k,scrollRef:y,isAtBottom:_,escapedFromLock:A,contentRef:E,state:x,get targetScrollTop(){return v.current},set targetScrollTop(targetScrollTop){v.current=targetScrollTop}}),[T,_,E,y,k,A,x]);return(0,r.useImperativeHandle)(m,()=>w,[w]),d(()=>{y.current&&"visible"===getComputedStyle(y.current).overflow&&(y.current.style.overflow="auto")},[]),r.createElement(c.Provider,{value:w},r.createElement("div",{...g},"function"==typeof t?t(w):t))}function p(){let e=(0,r.useContext)(c);if(!e)throw Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}(h||(h={})).Content=function({children:e,scrollClassName:t,...n}){let i=p();return r.createElement("div",{ref:i.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:t},r.createElement("div",{...n,ref:i.contentRef},"function"==typeof e?e(i):e))}},50729:(e,t,n)=>{n.d(t,{K:()=>i});var r=n(81933);function i(){return(0,r.U)(1)}},50933:(e,t,n)=>{n.d(t,{L:()=>r});function r(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},51532:(e,t,n)=>{n.d(t,{WF:()=>S,AH:()=>u,qy:()=>x.qy,s6:()=>x.s6,XX:()=>x.XX,iz:()=>l});let r=globalThis,i=r.ShadowRoot&&(void 0===r.ShadyCSS||r.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,a=Symbol(),o=new WeakMap;class s{constructor(e,t,n){if(this._$cssResult$=!0,n!==a)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(i&&void 0===e){let n=void 0!==t&&1===t.length;n&&(e=o.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&o.set(t,e))}return e}toString(){return this.cssText}}let l=e=>
1074new s("string"==typeof e?e:e+"",void 0,a),u=(e,...t)=>new s(1===e.length?e[0]:t.reduce((t,n,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+e[r+1],e[0]),e,a),c=i?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(let n of e.cssRules)t+=n.cssText;return l(t)})(e):e,{is:d,defineProperty:h,getOwnPropertyDescriptor:p,getOwnPropertyNames:f,getOwnPropertySymbols:m,getPrototypeOf:g}=Object,v=globalThis,b=v.trustedTypes,y=b?b.emptyScript:"",E=v.reactiveElementPolyfillSupport,T={toAttribute(e,t){switch(t){case Boolean:e=e?y:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=null!==e;break;case Number:n=null===e?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch(e){n=null}}return n}},k=(e,t)=>!d(e,t),_={attribute:!0,type:String,converter:T,reflect:!1,useDefault:!1,hasChanged:k};Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;class A extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=_){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(e,n,t);void 0!==r&&h(this.prototype,e,r)}}static getPropertyDescriptor(e,t,n){let{get:r,set:i}=p(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:r,set(t){let a=r?.call(this);i?.call(this,t),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??_}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let e=g(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let e=this.properties;for(let t of[...f(e),...m(e)])this.createProperty(t,e[t])}let e=this[Symbol.metadata];if(null!==e){let t=litPropertyMetadata.get(e);if(void 0!==t)for(let[e,n]of t)this.elementProperties.set(e,n)}for(let[e,t]of(this._$Eh=new Map,this.elementProperties)){let n=this._$Eu(e,t);void 0!==n&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e))for(let n of new Set(e.flat(1/0).reverse()))t.unshift(c(n));else void 0!==e&&t.push(c(e));return t}static _$Eu(e,t){let n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map;for(let t of this.constructor.elementProperties.keys())this.hasOwnProperty(t)&&(e.set(t,this[t]),delete this[t]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(i)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let n of t){let t=document.createElement("style"),i=r.litNonce;void 0!==i&&t.setAttribute("nonce",i),t.textContent=n.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,n);if(void 0!==r&&!0===n.reflect){let i=(void 0!==n.converter?.toAttribute?n.converter:T).toAttribute(t,n.type);this._$Em=e,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(e,t){let n=this.constructor,r=n._$Eh.get(e);if(void 0!==r&&this._$Em!==r){let e=n.getPropertyOptions(r),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:T;this._$Em=r;let a=i.fromAttribute(t,e.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(void 0!==e){let a=this.constructor;if(!1===r&&(i=this[e]),!(((n??=a.getPropertyOptions(e)).hasChanged??k)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,t,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:r,wrapped:i},a){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),!0!==i||void 0!==a)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),!0===r&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,n]of e){let{wrapped:e}=n,r=this[t];!0!==e||this._$AL.has(t)||void 0===r||this.C(t,void 0,n,r)}}let e=!1,t=this._$AL;try{(e=this.shouldUpdate(t))?(this.willUpdate(t),this._$EO?.forEach(e
1074=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}}A.elementStyles=[],A.shadowRootOptions={mode:"open"},A.elementProperties=new Map,A.finalized=new Map,E?.({ReactiveElement:A}),(v.reactiveElementVersions??=[]).push("2.1.2");var x=n(52321);let w=globalThis;class S extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,x.XX)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return x.c0}}S._$litElement$=!0,S.finalized=!0,w.litElementHydrateSupport?.({LitElement:S});let C=w.litElementPolyfillSupport;C?.({LitElement:S}),(w.litElementVersions??=[]).push("4.2.2")},51592:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e){return e?e.replace(l,""):""}e.exports=function(e,l){if("string"!=typeof e)throw TypeError("First argument must be a string");if(!e)return[];l=l||{};var c=1,d=1;function h(e){var t=e.match(n);t&&(c+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function p(){var e={line:c,column:d};return function(t){return t.position=new f(e),g(r),t}}function f(e){this.start=e,this.end={line:c,column:d},this.source=l.source}function m(t){var n=Error(l.source+":"+c+":"+d+": "+t);if(n.reason=t,n.filename=l.source,n.line=c,n.column=d,n.source=e,l.silent);else throw n}function g(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function v(e){var t;for(e=e||[];t=b();)!1!==t&&e.push(t);return e}function b(){var t=p();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;""!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return m("End of comment missing");var r=e.slice(2,n-2);return d+=2,h(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}f.prototype.content=e,g(r);var y,E=[];for(v(E);y=function(){var e=p(),n=g(i);if(n){if(b(),!g(a))return m("property missing ':'");var r=g(o),l=e({type:"declaration",property:u(n[0].replace(t,"")),value:r?u(r[0].replace(t,"")):""});return g(s),l}}();)!1!==y&&(E.push(y),v(E));return E}},52321:(e,t,n)=>{n.d(t,{XX:()=>z,c0:()=>w,ge:()=>H,qy:()=>x,s6:()=>S});let r=globalThis,i=e=>e,a=r.trustedTypes,o=a?a.createPolicy("lit-html",{createHTML:e=>e}):void 0,s="$lit$",l=`lit$${Math.random().toFixed(9).slice(2)}$`,u="?"+l,c=`<${u}>`,d=document,h=()=>d.createComment(""),p=e=>null===e||"object"!=typeof e&&"function"!=typeof e,f=Array.isArray,m=e=>f(e)||"function"==typeof e?.[Symbol.iterator],g="[ 	\n\f\r]",v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,b=/-->/g,y=/>/g,E=RegExp(`>|${g}(?:([^\\s"'>=/]+)(${g}*=${g}*(?:[^ 	
1075\f\r"'\`<>=]|("|')|))|$)`,"g"),T=/'/g,k=/"/g,_=/^(?:script|style|textarea|title)$/i,A=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),x=A(1),w=(A(2),A(3),Symbol.for("lit-noChange")),S=Symbol.for("lit-nothing"),C=new WeakMap,I=d.createTreeWalker(d,129);function N(e,t){if(!f(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==o?o.createHTML(t):t}let O=(e,t)=>{let n=e.length-1,r=[],i,a=2===t?"<svg>":3===t?"<math>":"",o=v;for(let t=0;t<n;t++){let n=e[t],u,d,h=-1,p=0;for(;p<n.length&&(o.lastIndex=p,null!==(d=o.exec(n)));)p=o.lastIndex,o===v?"!--"===d[1]?o=b:void 0!==d[1]?o=y:void 0!==d[2]?(_.test(d[2])&&(i=RegExp("</"+d[2],"g")),o=E):void 0!==d[3]&&(o=E):o===E?">"===d[0]?(o=i??v,h=-1):void 0===d[1]?h=-2:(h=o.lastIndex-d[2].length,u=d[1],o=void 0===d[3]?E:'"'===d[3]?k:T):o===k||o===T?o=E:o===b||o===y?o=v:(o=E,i=void 0);let f=o===E&&e[t+1].startsWith("/>")?" ":"";a+=o===v?n+c:h>=0?(r.push(u),n.slice(0,h)+s+n.slice(h)+l+f):n+l+(-2===h?t:f)}return[N(e,a+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),r]};class R{constructor({strings:e,_$litType$:t},n){let r;this.parts=[];let i=0,o=0,c=e.length-1,d=this.parts,[p,f]=O(e,t);if(this.el=R.createElement(p,n),I.currentNode=this.el.content,2===t||3===t){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(r=I.nextNode())&&d.length<c;){if(1===r.nodeType){if(r.hasAttributes())for(let e of r.getAttributeNames())if(e.endsWith(s)){let t=f[o++],n=r.getAttribute(e).split(l),a=/([.?@])?(.*)/.exec(t);d.push({type:1,index:i,name:a[2],strings:n,ctor:"."===a[1]?F:"?"===a[1]?B:"@"===a[1]?j:M}),r.removeAttribute(e)}else e.startsWith(l)&&(d.push({type:6,index:i}),r.removeAttribute(e));if(_.test(r.tagName)){let e=r.textContent.split(l),t=e.length-1;if(t>0){r.textContent=a?a.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],h()),I.nextNode(),d.push({type:2,index:++i});r.append(e[t],h())}}}else if(8===r.nodeType)if(r.data===u)d.push({type:2,index:i});else{let e=-1;for(;-1!==(e=r.data.indexOf(l,e+1));)d.push({type:7,index:i}),e+=l.length-1}i++}}static createElement(e,t){let n=d.createElement("template");return n.innerHTML=e,n}}function D(e,t,n=e,r){if(t===w)return t;let i=void 0!==r?n._$Co?.[r]:n._$Cl,a=p(t)?void 0:t._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),void 0===a?i=void 0:(i=new a(e))._$AT(e,n,r),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(t=
1075D(e,i._$AS(e,t.values),i,r)),t}class L{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,r=(e?.creationScope??d).importNode(t,!0);I.currentNode=r;let i=I.nextNode(),a=0,o=0,s=n[0];for(;void 0!==s;){if(a===s.index){let t;2===s.type?t=new P(i,i.nextSibling,this,e):1===s.type?t=new s.ctor(i,s.name,s.strings,this,e):6===s.type&&(t=new U(i,this,e)),this._$AV.push(t),s=n[++o]}a!==s?.index&&(i=I.nextNode(),a++)}return I.currentNode=d,r}p(e){let t=0;for(let n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class P{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){p(e=D(this,e,t))?e===S||null==e||""===e?(this._$AH!==S&&this._$AR(),this._$AH=S):e!==this._$AH&&e!==w&&this._(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):m(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==S&&p(this._$AH)?this._$AA.nextSibling.data=e:this.T(d.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,r="number"==typeof n?this._$AC(e):(void 0===n.el&&(n.el=R.createElement(N(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(t);else{let e=new L(r,this),n=e.u(this.options);e.p(t),this.T(n),this._$AH=e}}_$AC(e){let t=C.get(e.strings);return void 0===t&&C.set(e.strings,t=new R(e)),t}k(e){f(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,n,r=0;for(let i of e)r===t.length?t.push(n=new P(this.O(h()),this.O(h()),this,this.options)):n=t[r],n._$AI(i),r++;r<t.length&&(this._$AR(n&&n._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let t=i(e).nextSibling;i(e).remove(),e=t}}setConnected(e){void 0===this._$AM&&(this._$Cv=e,this._$AP?.(e))}}class M{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=S,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=S}_$AI(e,t=this,n,r){let i=this.strings,a=!1;if(void 0===i)(a=!p(e=D(this,e,t,0))||e!==this._$AH&&e!==w)&&(this._$AH=e);else{let r,o,s=e;for(e=i[0],r=0;r<i.length-1;r++)(o=D(this,s[n+r],t,r))===w&&(o=this._$AH[r]),a||=!p(o)||o!==this._$AH[r],o===S?e=S:e!==S&&(e+=(o??"")+i[r+1]),this._$AH[r]=o}a&&!r&&this.j(e)}j(e){e===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class F extends M{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===S?void 0:e}}class B extends M{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==S)}}class j extends M{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}
1075_$AI(e,t=this){if((e=D(this,e,t,0)??S)===w)return;let n=this._$AH,r=e===S&&n!==S||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==S&&(n===S||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class U{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){D(this,e)}}let H={M:s,P:l,A:u,C:1,L:O,R:L,D:m,V:D,I:P,H:M,N:B,U:j,B:F,F:U},$=r.litHtmlPolyfillSupport;$?.(R,P),(r.litHtmlVersions??=[]).push("3.3.3");let z=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(void 0===i){let e=n?.renderBefore??null;r._$litPart$=i=new P(t.insertBefore(h(),e),e,void 0,n??{})}return i._$AI(e),i}},52371:(e,t,n)=>{function r(e){let t=[],n=String(e||""),r=n.indexOf(","),i=0,a=!1;for(;!a;){-1===r&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(",",i)}return t}function i(e,t){let n=t||{};return(""===e[e.length-1]?[...e,""]:e).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}n.d(t,{A:()=>i,q:()=>r})},53915:(e,t,n)=>{n.d(t,{t3:()=>h,zE:()=>c,N4:()=>d});var r=n(33859);function i(e,t){return e<<t|e>>>32-t}let a=function(e){let t=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],n=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0],r=new Uint8Array(e.length+1);r.set(e),r[e.length]=128;let a=Math.ceil(((e=r).length/4+2)/16),o=Array(a);for(let t=0;t<a;++t){let n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[64*t+4*r]<<24|e[64*t+4*r+1]<<16|e[64*t+4*r+2]<<8|e[64*t+4*r+3];o[t]=n}o[a-1][14]=(e.length-1)*8/0x100000000,o[a-1][14]=Math.floor(o[a-1][14]),o[a-1][15]=(e.length-1)*8|0;for(let e=0;e<a;++e){let r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=o[e][t];for(let e=16;e<80;++e)r[e]=i(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let a=n[0],s=n[1],l=n[2],u=n[3],c=n[4];for(let e=0;e<80;++e){let n=Math.floor(e/20),o=i(a,5)+function(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}(n,s,l,u)+c+t[n]+r[e]>>>0;c=u,u=l,l=i(s,30)>>>0,s=a,a=o}n[0]=n[0]+a>>>0,n[1]=n[1]+s>>>0,n[2]=n[2]+l>>>0,n[3]=n[3]+u>>>0,n[4]=n[4]+c>>>0}return Uint8Array.of(n[0]>>24,n[0]>>16,n[0]>>8,n[0],n[1]>>24,n[1]>>16,n[1]>>8,n[1],n[2]>>24,n[2]>>16,n[2]>>8,n[2],n[3]>
1075>24,n[3]>>16,n[3]>>8,n[3],n[4]>>24,n[4]>>16,n[4]>>8,n[4])},o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,s=function(e){let t;if(!("string"==typeof e&&o.test(e)))throw TypeError("Invalid UUID");return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,255&t,(t=parseInt(e.slice(9,13),16))>>>8,255&t,(t=parseInt(e.slice(14,18),16))>>>8,255&t,(t=parseInt(e.slice(19,23),16))>>>8,255&t,(t=parseInt(e.slice(24,36),16))/0x10000000000&255,t/0x100000000&255,t>>>24&255,t>>>16&255,t>>>8&255,255&t)};var l=n(48765);function u(e,t,n,r){var i=t,o=r;let u="string"==typeof e?function(e){let t=new Uint8Array((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}(e):e,c="string"==typeof i?s(i):i;if("string"==typeof i&&(i=s(i)),i?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let d=new Uint8Array(16+u.length);if(d.set(c),d.set(u,c.length),(d=a(d))[6]=15&d[6]|80,d[8]=63&d[8]|128,n){if((o=o||0)<0||o+16>n.length)throw RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let e=0;e<16;++e)n[o+e]=d[e];return n}return(0,l.k)(d)}function c(){return"ck-"+(0,r.A)()}function d(){return(0,r.A)()}function h(e,t){let n="e4b01160-ff74-4c6e-9b27-d53cd930fe8e",r=t?u(t,n):n;return u("string"==typeof e?e:JSON.stringify(function e(t){if("function"==typeof t)return t.toString();if(Array.isArray(t))return t.map(e);if(null!==t&&"object"==typeof t){let n={};for(let r of Object.keys(t))n[r]=e(t[r]);return n}return t}(e)),r)}u.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",u.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8"},54185:function(e,t,n){var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(79024)),i=n(49677);function a(e,t){var n={};return e&&"string"==typeof e&&(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,e.exports=a},55180:(e,t,n)=>{n.d(t,{m:()=>a});var r=n(29846),i=n(14192);function a(e){i.f.setTimeout(function(){var t=r.$.onUnhandledError;if(t)t(e);else throw e})}},56522:(e,t,n)=>{n.d(t,{IN:()=>a,dc:()=>o,_Z:()=>s,VG:()=>l});var r=n(95502);let i=[],a=!0,o=!1,s="skip";function l(e,t,n,l){let u;"function"==typeof t&&"function"!=typeof n?(l=n,n=t):u=t;let c=(0,r.C)(u),d=l?-1:1;(function e(r,u,h){let p=r&&"object"==typeof r?r:{};if("string"==typeof p.type){let e="string"==typeof p.tagName?p.tagName:"string"==typeof p.name?p.name:void 0;Object.defineProperty(f,"name",{value:"node ("+r.type+(e?"<"+e+">":"")+")"})}return f;function f(){var p;let f,m,g,v=i;if((!t||c(r,u,h[h.length-1]||void 0))&&(v=Array.isArray(p=n(r,h))?p:"number"==typeof p?[a,p]:null==p?i:[p])[0]===o)return v;if("children"in r&&r.children&&r.children&&v[0]!==s)for(m=(l?r.children.length:-1)+d,g=h.concat(r);m>-1&&m<r.children.length;){if((f=e(r.children[m],m,g)())[0]===o)return f;m="number"==typeof f[1]?f[1]:m+d}return v}})(e,void 0,[])()}},59043:(e,t,n)=>{n.d(t,{yQ:()=>b});var r=e=>"function"==typeof e?e:function(){return e},i="undefined"!=typeof window?window:null,a=("undefined"!=typeof self?self:null)||i||globalThis,o={connecting:0,open:1,closing:2,closed:3},s={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},l={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},u={longpoll:"longpoll",websocket:"websocket"},c={complete:4},d="base64url.bearer.phx.",h=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(e){this.timeout=e,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}
1075matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter(t=>t.status===e).forEach(e=>e.callback(t))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},p=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},f=class{constructor(e,t,n){this.state=s.closed,this.topic=e,this.params=r(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new h(this,l.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new p(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=s.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=s.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=s.closed,this.socket.remove(this)}),this.onError(e=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=s.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new h(this,l.leave,r({}),this.timeout).send(),this.state=s.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(l.reply,(e,t)=>{this.trigger(this.replyEventName(t),e)})}join(e=this.timeout){if(!this.joinedOnce)return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush;throw Error("tried to join multiple times. 'join' can only be called a single time per channel instance")}onClose(e){this.on(l.close,e)}onError(e){return this.on(l.error,t=>e(t))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter(n=>n.event!==e||void 0!==t&&t!==n.ref)}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new h(this,e,function(){return t},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=s.leaving;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(l.close,"leave")},n=new h(this,l.leave,r({}),e);return n.receive("ok",()=>t()).receive("timeout",()=>t()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}
1075isMember(e,t,n,r){return this.topic===e&&(!r||r===this.joinRef()||(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),!1))}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=s.joining,this.joinPush.resend(e))}trigger(e,t,n,r){let i=this.onMessage(e,t,n,r);if(t&&!i)throw Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=this.bindings.filter(t=>t.event===e);for(let e=0;e<a.length;e++)a[e].callback(i,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===s.closed}isErrored(){return this.state===s.errored}isJoined(){return this.state===s.joined}isJoining(){return this.state===s.joining}isLeaving(){return this.state===s.leaving}},m=class{static request(e,t,n,r,i,o,s){if(a.XDomainRequest){let n=new a.XDomainRequest;return this.xdomainRequest(n,e,t,r,i,o,s)}if(a.XMLHttpRequest){let l=new a.XMLHttpRequest;return this.xhrRequest(l,e,t,n,r,i,o,s)}if(a.fetch&&a.AbortController)return this.fetchRequest(e,t,n,r,i,o,s);throw Error("No suitable XMLHttpRequest implementation found")}static fetchRequest(e,t,n,r,i,o,s){let l={method:e,headers:n,body:r},u=null;return i&&(u=new AbortController,setTimeout(()=>u.abort(),i),l.signal=u.signal),a.fetch(t,l).then(e=>e.text()).then(e=>this.parseJSON(e)).then(e=>s&&s(e)).catch(e=>{"AbortError"===e.name&&o?o():s&&s(null)}),u}static xdomainRequest(e,t,n,r,i,a,o){return e.timeout=i,e.open(t,n),e.onload=()=>{let t=this.parseJSON(e.responseText);o&&o(t)},a&&(e.ontimeout=a),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,i,a,o,s){for(let[i,o]of(e.open(t,n,!0),e.timeout=a,Object.entries(r)))e.setRequestHeader(i,o);return e.onerror=()=>s&&s(null),e.onreadystatechange=()=>{e.readyState===c.complete&&s&&s(this.parseJSON(e.responseText))},o&&(e.ontimeout=o),e.send(i),e}static parseJSON(e){if(!e||""===e)return null;try{return JSON.parse(e)}catch{return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=t?`${t}[${r}]`:r,a=e[r];"object"==typeof a?n.push(this.serialize(a,i)):n.push(encodeURIComponent(i)+"="+encodeURIComponent(a))}return n.join("&")}static appendParams(e,t){if(0===Object.keys(t).length)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},g=class{constructor(e,t){t&&2===t.length&&t[1].startsWith(d)&&(this.authToken=atob(t[1].slice(d.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=o.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(RegExp("(.*)/"+u.websocket),"$1/"+u.longpoll)}endpointURL(){return m.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=o.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===o.open||this.readyState===o.connecting}poll(){let e={Accept:"application/json"};this.authToken&&(e["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",e,null,()=>this.ontimeout(),e=>{if(e){var{status:t,token:n,messages:r}=e;if(410===t&&null!==this.token){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=n}else t=0;switch(t){case 200:r.forEach(e=>{setTimeout(()=>this.onmessage({data:e}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=o.open,this.onopen({}),this.poll();break;
1075case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw Error(`unhandled poll status ${t}`)}})}send(e){"string"!=typeof e&&(e=(e=>{let t="",n=new Uint8Array(e),r=n.byteLength;for(let e=0;e<r;e++)t+=String.fromCharCode(n[e]);return btoa(t)})(e)),this.currentBatch?this.currentBatch.push(e):this.awaitingBatchAck?this.batchBuffer.push(e):(this.currentBatch=[e],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(e,t=0){this.awaitingBatchAck=!0;let n=t+100,r=e.slice(t,n);this.ajax("POST",{"Content-Type":"application/x-ndjson"},r.join("\n"),()=>this.onerror("timeout"),t=>{t&&200===t.status?n<e.length?this.batchSend(e,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1:(this.awaitingBatchAck=!1,this.onerror(t&&t.status),this.closeAndRetry(1011,"internal server error",!1))})}close(e,t,n){for(let e of this.reqs)e.abort();this.readyState=o.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,"undefined"!=typeof CloseEvent?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r,i){let a,o=()=>{this.reqs.delete(a),r()};a=m.request(e,this.endpointURL(),t,n,this.timeout,o,e=>{this.reqs.delete(a),this.isActive()&&i(e)}),this.reqs.add(a)}},v={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){return e.payload.constructor===ArrayBuffer?t(this.binaryEncode(e)):t(JSON.stringify([e.join_ref,e.ref,e.topic,e.event,e.payload]))},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,i,a,o]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:a,payload:o})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:i,payload:a}=e,o=new TextEncoder,s=o.encode(t),l=o.encode(n),u=o.encode(i),c=o.encode(r);this.assertFieldSize(s.byteLength,"join_ref"),this.assertFieldSize(l.byteLength,"ref"),this.assertFieldSize(u.byteLength,"topic"),this.assertFieldSize(c.byteLength,"event");let d=this.META_LENGTH+s.byteLength+l.byteLength+u.byteLength+c.byteLength,h=new ArrayBuffer(this.HEADER_LENGTH+d),p=new Uint8Array(h),f=new DataView(h),m=0;f.setUint8(m++,this.KINDS.push),f.setUint8(m++,s.byteLength),f.setUint8(m++,l.byteLength),f.setUint8(m++,u.byteLength),f.setUint8(m++,c.byteLength),p.set(s,m),m+=s.byteLength,p.set(l,m),m+=l.byteLength,p.set(u,m),m+=u.byteLength,p.set(c,m),m+=c.byteLength;var g=new Uint8Array(h.byteLength+a.byteLength);return g.set(p,0),g.set(new Uint8Array(a),h.byteLength),g.buffer},assertFieldSize(e,t){if(e>255)throw Error(`unable to convert ${t} to binary: must be less than or equal to 255 bytes, but is ${e} bytes`)},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}},decodePush(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=this.HEADER_LENGTH+this.META_LENGTH-1,s=n.decode(e.slice(o,o+r));o+=r;let l=n.decode(e.slice(o,o+i));o+=i;let u=n.decode(e.slice(o,o+a));return o+=a,{join_ref:s,ref:null,topic:l,event:u,payload:e.slice(o,e.byteLength)}},decodeReply(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=t.getUint8(3),o=t.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,u=n.decode(e.slice(s,s+r));s+=r;let c=n.decode(e.slice(s,s+i));s+=i;let d=n.decode(e.slice(s,s+a));s+=a;let h=n.decode(e.slice(s,s+o));s+=o;let p=e.slice(s,e.byteLength);return{join_ref:u,ref:c,topic:d,event:l.reply,payload:{status:h,response:p}}},decodeBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),a=this.HEADER_LENGTH+2,o=n.decode(e.slice(a,a+r));a+=r;let s=n.decode(e.slice(a,a+i));return a+=i,{join_ref:null,ref:null,topic:o,event:s,payload:e.slice(a,e.byteLength)}}},b=class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=t.timeout||1e4,this.transport=t.transport||a.WebSocket||g,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||a&&a.sessionStorage,this.establishedConnections=0,this.defaultEncoder=v.encode.bind(v),this.defaultDecoder=v.decode.bind(v),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.transport!==g?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;i&&i.addEventListener&&(i.addEventListener("pagehide",e=>{this.conn&&(this.disconnect(),n=this.connectClock)}),i.addEventListener("pageshow",e=>{n===this.connectClock&&(n=null,this.connect())}),i.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState?this.pageHidden=!0:(this.pageHidden=!1,this.isConnected()||this.closeWasClean||this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,!this.logger&&t.debug&&(this.logger=(e,t,n)=>{console.log(`${e}: ${t}`,n)}),this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=r(t.params||{}),this.endPoint=`${e}/${u.websocket}`,this.vsn=t.vsn||"2.0.0",this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new p(()=>
1075{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(()=>this.connect())},this.reconnectAfterMs),this.authToken=t.authToken}getLongPollTransport(){return g}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=m.appendParams(m.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,e&&e()},t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=r(e)),(!this.conn||this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==g?this.connectWithF
1075allback(g,this.longPollFallbackMs):this.transportConnect())}log(e,t,n){this.logger&&this.logger(e,t,n)}hasLogger(){return null!==this.logger}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage(i=>{i.ref===t&&(this.off([r]),e(Date.now()-n))});return!0}transportName(e){return e===g?"LongPoll":e.name}transportConnect(){let e;this.connectClock++,this.closeWasClean=!1,this.authToken&&(e=["phoenix",`${d}${btoa(this.authToken).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),e),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(e){return this.sessionStore&&this.sessionStore.getItem(e)}storeSession(e,t){this.sessionStore&&this.sessionStore.setItem(e,t)}connectWithFallback(e,t=2500){let n,r;clearTimeout(this.fallbackTimer);let i=!1,a=!0,o=this.transportName(e),s=t=>{this.log("transport",`falling back to ${o}...`,t),this.off([n,r]),a=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${o}`))return s("memorized");this.fallbackTimer=setTimeout(s,t),r=this.onError(e=>{this.log("transport","error",e),a&&!i&&(clearTimeout(this.fallbackTimer),s(e))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(i=!0,!a){let t=this.transportName(e);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t}`,"true"),this.log("transport",`established ${t} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,t),this.ping(e=>{this.log("transport","connected to primary after",e),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transportName(this.transport)} connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,e])=>e())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),1e3,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();let r=this.conn;this.waitForBufferDone(r,()=>{t?r.close(t,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),e&&e()})})}waitForBufferDone(e,t,n=1){if(5===n||!e.bufferedAmount)return void t();setTimeout(()=>{this.waitForBufferDone(e,t,n+1)},150*n)}waitForSocketClosed(e,t,n=1){if(5===n||e.readyState===o.closed)return void t();setTimeout(()=>{this.waitForSocketClosed(e,t,n+1)},150*n)}onConnClose(e){this.conn&&(this.conn.onclose=()=>{});let t=e&&e.code;this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),this.clearHeartbeats(),this.closeWasClean||1e3===t||this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,t])=>t(e))}onConnError(e){this.hasLogger()&&this.log("transport","error",e);let t=this.transport,n=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,r])=>{r(e,t,n)}),(t===this.transport||n>0)&&this.triggerChanError()}
1075triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(l.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case o.connecting:return"connecting";case o.open:return"open";case o.closing:return"closing";default:return"closed"}}isConnected(){return"open"===this.connectionState()}remove(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter(t=>t!==e)}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter(([t])=>-1===e.indexOf(t))}channel(e,t={}){let n=new f(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;this.log("push",`${t} ${n} (${a}, ${i})`,r)}this.isConnected()?this.encode(e,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(e,e=>this.conn.send(e)))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){(!this.pendingHeartbeatRef||this.isConnected())&&(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,e=>{let{topic:t,event:n,payload:r,ref:i,join_ref:a}=e;i&&i===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${t} ${n} ${i&&"("+i+")"||""}`,r);for(let e=0;e<this.channels.length;e++){let o=this.channels[e];o.isMember(t,n,r,a)&&o.trigger(n,r,i,a)}for(let t=0;t<this.stateChangeCallbacks.message.length;t++){let[,n]=this.stateChangeCallbacks.message[t];n(e)}})}leaveOpenTopic(e){let t=this.channels.find(t=>t.topic===e&&(t.isJoined()||t.isJoining()));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}}},59292:(e,t,n)=>{function r(e){let t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function i(e){return e.join(" ").trim()}n.d(t,{A:()=>i,q:()=>r})},59325:(e,t,n)=>{n.d(t,{$:()=>u});var r=n(71450),i=n(96948),a=n(50729),o=n(95868),s=n(78842);function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(0,o.lI)(e);return(0,i.N)(function(t,i){(0,a.K)()((0,s.H)((0,r.fX)([t],(0,r.zs)(e)),n)).subscribe(i)})}function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return l.apply(void 0,(0,r.fX)([],(0,r.zs)(e)))}},60488:(e,t,n)=>{n.d(t,{s:()=>r});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},61270:(e,t,n)=>{n.d(t,{x:()=>o});var r=n(50729),i=n(95868),a=n(78842);function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,r.K)()((0,a.H)(e,(0,i.lI)(e)))}},61968:(e,t,n)=>{function r(e){if("object"!=typeof e||null===e||Array.isArray(e))return!1;try{let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}catch{return!1}}function i(e){if("string"!=typeof e)return;let t=e.trim();return t.length>0?t:void 0}function a(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function o(e){if(!r(e)||1!==e.schemaVersion)return;let t=function(e){if(!r(e))return;let t=i(e.organizationName),n=i(e.projectName);if(void 0!==t&&void 0!==n)return{organizationName:t,projectName:n}}(e.identity),n=function(e){if(!r(e))return;let t=i(e.code),n=i(e.label);if(void 0!==t&&void 0!==n)return{code:t,label:n}}(e.plan),o=function(e){if(r(e))switch(e.state){case"valid":case"none":case"expired":case"unknown":return{state:e.state};default:return}}(e.license),s=function(e){if(!r(e))return;let t=function(e){switch(e){case"manage_plan":case"renew":case"enable_intelligence":return e;default:return}}(e.kind),n=function(e){let t,n=i(e);if(void 0===n||n.includes("?")||n.includes("#"))return;let r=n.indexOf("://");if(r<1)return;let a=n.slice(r+3),o=a.indexOf("/");if((-1===o?a:a.slice(0,o)).includes("@"))return;try{t=new URL(n)}catch{return}if(0===t.hostname.length||t.username||t.password)return;if("https:"===t.protocol)return n;let s="localhost"===t.hostname||"127.0.0.1"===t.hostname||"[::1]"===t.hostname;if("http:"===t.protocol&&s)return n}(e.url);if(void 0!==t&&void 0!==n)return{kind:t,url:n}}(e.action),l=function(e){if(!r(e))return;let t=function(e){if(r(e)){if("finite"===e.kind){if("number"!=typeof e.value||!Number.isSafeInteger(e.value)||e.value<1)return;return{kind:"finite",value:e.value}}if("unlimited"===e.kind)return{kind:"unlimited"};if("unknown"===e.kind)return{kind:"unknown"}}}(e.limit),n=e.used;
1075if(!a(n)||void 0===t)return;let i=function(e,t){try{let n=Object.getOwnPropertyDescriptor(e,t);return void 0!==n&&"value"in n?n.value:void 0}catch{return}}(e,"expiringSoonCount"),o=a(i)?i:void 0;return{used:n,limit:t,...void 0===o?{}:{expiringSoonCount:o}}}(e.usage);return{schemaVersion:1,...void 0===t?{}:{identity:t},...void 0===n?{}:{plan:n},...void 0===o?{}:{license:o},...void 0===s?{}:{action:s},...void 0===l?{}:{usage:l}}}n.d(t,{f:()=>o})},62432:(e,t,n)=>{n.d(t,{j1:()=>T,km:()=>y,h9:()=>v,Ru:()=>g,w7:()=>h,L7:()=>E,Cj:()=>b,D1:()=>c,tS:()=>k,AI:()=>u});let r=/\r\n|[\n\r]/g;function i(e,t){let n=0,i=1;for(let a of e.body.matchAll(r)){if("number"==typeof a.index||function(e,t){if(!e)throw Error("Unexpected invariant triggered.")}(!1),a.index>=t)break;n=a.index+a[0].length,i+=1}return{line:i,column:t+1-n}}function a(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,a=e.locationOffset.line-1,s=t.line+a,l=1===t.line?n:0,u=t.column+l,c=`${e.name}:${s}:${u}
1076`,d=r.split(/\r\n|[\n\r]/g),h=d[i];if(h.length>120){let e=Math.floor(u/80),t=[];for(let e=0;e<h.length;e+=80)t.push(h.slice(e,e+80));return c+o([[`${s} |`,t[0]],...t.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(u%80)],["|",t[e+1]]])}return c+o([[`${s-1} |`,d[i-1]],[`${s} |`,h],["|","^".padStart(u)],[`${s+1} |`,d[i+1]]])}function o(e){let t=e.filter(([e,t])=>void 0!==t),n=Math.max(...t.map(([e])=>e.length));return t.map(([e,t])=>e.padStart(n)+(t?" "+t:"")).join("\n")}class s extends Error{constructor(e,...t){var n,r,a;let{nodes:o,source:u,positions:c,path:d,originalError:h,extensions:p}=function(e){let t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=d?d:void 0,this.originalError=null!=h?h:void 0,this.nodes=l(Array.isArray(o)?o:o?[o]:void 0);let f=l(null==(n=this.nodes)?void 0:n.map(e=>e.loc).filter(e=>null!=e));this.source=null!=u?u:null==f||null==(r=f[0])?void 0:r.source,this.positions=null!=c?c:null==f?void 0:f.map(e=>e.start),this.locations=c&&u?c.map(e=>i(u,e)):null==f?void 0:f.map(e=>i(e.source,e.start));let m=!function(e){return"object"==typeof e&&null!==e}(null==h?void 0:h.extensions)||null==h?void 0:h.extensions;this.extensions=null!=(a=null!=p?p:m)?a:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=h&&h.stack?Object.defineProperty(this,"stack",{value:h.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,s):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(let n of this.nodes){var t;n.loc&&(e+="\n\n"+a((t=n.loc).source,i(t.source,t.start)))}else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+a(this.source,t);return e}toJSON(){let e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function l(e){return void 0===e||0===e.length?void 0:e}let u=function(e){return e.CRITICAL="critical",e.WARNING="warning",e.INFO="info",e}({}),c=function(e){return e.BANNER="banner",e.TOAST="toast",e.SILENT="silent",e.DEV_ONLY="dev_only",e}({}),d={COPILOT_ERROR:"CopilotError",COPILOT_API_DISCOVERY_ERROR:"CopilotApiDiscoveryError",COPILOT_REMOTE_ENDPOINT_DISCOVERY_ERROR:"CopilotKitRemoteEndpointDiscoveryError",COPILOT_KIT_AGENT_DISCOVERY_ERROR:"CopilotKitAgentDiscoveryError",COPILOT_KIT_LOW_LEVEL_ERROR:"CopilotKitLowLevelError",CONFIGURATION_ERROR:"ConfigurationError",MISSING_PUBLIC_API_KEY_ERROR:"MissingPublicApiKeyError",UPGRADE_REQUIRED_ERROR:"UpgradeRequiredError"};d.CONFIGURATION_ERROR,d.MISSING_PUBLIC_API_KEY_ERROR,d.UPGRADE_REQUIRED_ERROR,d.COPILOT_API_DISCOVERY_ERROR,d.COPILOT_REMOTE_ENDPOINT_DISCOVERY_ERROR,d.COPILOT_KIT_AGENT_DISCOVERY_ERROR;
1076let h=function(e){return e.NETWORK_ERROR="NETWORK_ERROR",e.NOT_FOUND="NOT_FOUND",e.AGENT_NOT_FOUND="AGENT_NOT_FOUND",e.API_NOT_FOUND="API_NOT_FOUND",e.REMOTE_ENDPOINT_NOT_FOUND="REMOTE_ENDPOINT_NOT_FOUND",e.AUTHENTICATION_ERROR="AUTHENTICATION_ERROR",e.MISUSE="MISUSE",e.UNKNOWN="UNKNOWN",e.VERSION_MISMATCH="VERSION_MISMATCH",e.CONFIGURATION_ERROR="CONFIGURATION_ERROR",e.MISSING_PUBLIC_API_KEY_ERROR="MISSING_PUBLIC_API_KEY_ERROR",e.UPGRADE_REQUIRED_ERROR="UPGRADE_REQUIRED_ERROR",e}({}),p="https://docs.copilotkit.ai",f=e=>`See more: [${e}](${e})`,m={[h.NETWORK_ERROR]:{statusCode:503,troubleshootingUrl:`${p}/troubleshooting/common-issues#network-errors-api-not-found`,visibility:c.BANNER,severity:u.CRITICAL},[h.NOT_FOUND]:{statusCode:404,troubleshootingUrl:`${p}/troubleshooting/common-issues#network-errors-api-not-found`,visibility:c.BANNER,severity:u.CRITICAL},[h.AGENT_NOT_FOUND]:{statusCode:500,troubleshootingUrl:`${p}/langgraph-python/coagent-troubleshooting/common-coagent-issues#i-am-getting-agent-not-found-error`,visibility:c.BANNER,severity:u.CRITICAL},[h.API_NOT_FOUND]:{statusCode:404,troubleshootingUrl:`${p}/troubleshooting/common-issues#network-errors-api-not-found`,visibility:c.BANNER,severity:u.CRITICAL},[h.REMOTE_ENDPOINT_NOT_FOUND]:{statusCode:404,troubleshootingUrl:`${p}/troubleshooting/common-issues#remote-endpoint-not-found-error`,visibility:c.BANNER,severity:u.CRITICAL},[h.AUTHENTICATION_ERROR]:{statusCode:401,troubleshootingUrl:`${p}/troubleshooting/common-issues`,visibility:c.BANNER,severity:u.CRITICAL},[h.MISUSE]:{statusCode:400,troubleshootingUrl:null,visibility:c.DEV_ONLY,severity:u.WARNING},[h.UNKNOWN]:{statusCode:500,visibility:c.TOAST,severity:u.CRITICAL},[h.CONFIGURATION_ERROR]:{statusCode:400,troubleshootingUrl:null,severity:u.WARNING,visibility:c.BANNER},[h.MISSING_PUBLIC_API_KEY_ERROR]:{statusCode:400,troubleshootingUrl:null,severity:u.CRITICAL,visibility:c.BANNER},[h.UPGRADE_REQUIRED_ERROR]:{statusCode:402,troubleshootingUrl:null,severity:u.WARNING,visibility:c.BANNER},[h.VERSION_MISMATCH]:{statusCode:400,troubleshootingUrl:null,visibility:c.DEV_ONLY,severity:u.INFO}};var g=class extends s{constructor({message:e="Unknown error occurred",code:t,severity:n,visibility:r}){let i=d.COPILOT_ERROR,a=m[t],{statusCode:o}=a,s=r??a.visibility??c.TOAST,l=n??("severity"in a?a.severity:void 0);super(e,{extensions:{name:i,statusCode:o,code:t,visibility:s,severity:l,troubleshootingUrl:"troubleshootingUrl"in a?a.troubleshootingUrl:null,originalError:{message:e,stack:Error().stack}}}),this.code=t,this.name=i,this.statusCode=o,this.severity=l,this.visibility=s}},v=class extends g{constructor(e={}){let t=e.url??"",n="";t?.includes("/info")?n="when fetching CopilotKit info":t.includes("/actions/execute")?n="when attempting to execute actions.":t.includes("/agents/state")?n="when attempting to get agent state.":t.includes("/agents/execute")&&(n="when attempting to execute agent(s).");let r=e.message??(e.url?`Failed to find CopilotKit API endpoint at url ${e.url} ${n}`:"Failed to find CopilotKit API endpoint."),i=e.code??h.API_NOT_FOUND;super({message:`${r}.
1077
1078${f(m[i].troubleshootingUrl)}`,code:i}),this.name=d.COPILOT_API_DISCOVERY_ERROR}},b=class extends v{constructor(e){super({message:e?.message??(e?.url?`Failed to find or contact remote endpoint at url ${e.url}`:"Failed to find or contact remote endpoint"),code:h.REMOTE_ENDPOINT_NOT_FOUND}),this.name=d.COPILOT_REMOTE_ENDPOINT_DISCOVERY_ERROR}},y=class extends g{constructor(e){let t,{agentName:n,availableAgents:r}=e,i=h.AGENT_NOT_FOUND,a=f(m[i].troubleshootingUrl);if(r.length){let e=r.map(e=>e.name).join(", ");t=n?`Agent '${n}' was not found. Available agents are: ${e}. Please verify the agent name in your configuration and ensure it matches one of the available agents.
1079
1080${a}`:`The requested agent was not found. Available agents are: ${e}. Please verify the agent name in your configuration and ensure it matches one of the available agents.
1081
1082${a}`}else t=`${n?`Agent '${n}'`:"The requested agent"} was not found. Please set up at least one agent before proceeding. ${a}`;super({message:t,code:i}),this.name=d.COPILOT_KIT_AGENT_DISCOVERY_ERROR}},E=class extends g{constructor({error:e,url:t,message:n}
1082){let r=h.NETWORK_ERROR;super({message:n??_({errorCode:e.code,url:t}),code:r}),this.name=d.COPILOT_KIT_LOW_LEVEL_ERROR}},T=class extends g{constructor(e){super({message:e,code:h.CONFIGURATION_ERROR}),this.name=d.CONFIGURATION_ERROR,this.severity=u.WARNING}},k=class extends T{constructor(e){super(e),this.name=d.MISSING_PUBLIC_API_KEY_ERROR,this.severity=u.CRITICAL}};let _=({errorCode:e,url:t})=>{let n=m[h.NETWORK_ERROR].troubleshootingUrl,r=(e=`Failed to fetch from url ${t}.`)=>`${e}.
1083
1084Possible reasons:
1085- -The server may have an error preventing it from returning a response (Check the server logs for more info).
1086- -The server might be down or unreachable
1087- -There might be a network issue (e.g., DNS failure, connection timeout) 
1088- -The URL might be incorrect
1089- -The server is not running on the specified port
1090
1091${f(n)}`;if(t.includes("/info"))return r(`Failed to fetch CopilotKit agents/action information from url ${t}.`);if(t.includes("/actions/execute"))return r(`Fetch call to ${t} to execute actions failed.`);if(t.includes("/agents/state"))return r(`Fetch call to ${t} to get agent state failed.`);if(t.includes("/agents/execute"))return r(`Fetch call to ${t} to execute agent(s) failed.`);switch(e){case"ECONNREFUSED":return`Connection to ${t} was refused. Ensure the server is running and accessible.
1092
1093${f(n)}`;case"ENOTFOUND":return`The server on ${t} could not be found. Check the URL or your network configuration.
1094
1095${f(m[h.NOT_FOUND].troubleshootingUrl)}`;case"ETIMEDOUT":return`The connection to ${t} timed out. The server might be overloaded or taking too long to respond.
1096
1097${f(n)}`;default:return}}},62473:(e,t,n)=>{n.d(t,{w:()=>o});var r=n(96948),i=n(28400),a=n(34793);function o(){return(0,r.N)(function(e,t){e.subscribe((0,i._)(t,a.l))})}},63704:(e,t,n)=>{n.d(t,{T:()=>a});var r=n(96948),i=n(28400);function a(e,t){return(0,r.N)(function(n,r){var a=0;n.subscribe((0,i._)(r,function(n){r.next(e.call(t,n,a++))}))})}},63758:(e,t,n)=>{function r(){}function i(){}n.d(t,{HB:()=>i,ok:()=>r})},64354:(e,t,n)=>{n.d(t,{Z:()=>function e(t,n,l){return(void 0===l&&(l=1/0),(0,s.T)(n))?e(function(e,a){return(0,r.T)(function(t,r){return n(e,t,a,r)})((0,i.Tg)(t(e,a)))},l):("number"==typeof n&&(l=n),(0,a.N)(function(e,n){var r,a,s,u,c,d,h,p,f;return r=l,s=[],u=0,c=0,d=!1,h=function(){!d||s.length||u||n.complete()},p=function(e){return u<r?f(e):s.push(e)},f=function(e){u++;var l=!1;(0,i.Tg)(t(e,c++)).subscribe((0,o._)(n,function(e){a?p(e):n.next(e)},function(){l=!0},void 0,function(){if(l)try{for(u--;s.length&&u<r;)!function(){var e=s.shift();f(e)}();h()}catch(e){n.error(e)}}))},e.subscribe((0,o._)(n,p,function(){d=!0,h()})),function(){}}))}});var r=n(63704),i=n(8286),a=n(96948),o=(n(20437),n(28400)),s=n(39097)},65333:(e,t,n)=>{n.d(t,{E:()=>c});var r=n(71450),i=n(96948),a=n(28400),o=n(8286),s=n(77163),l=n(34793),u=n(95868);function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(0,u.ms)(e);return(0,i.N)(function(t,i){for(var u=e.length,c=Array(u),d=e.map(function(){return!1}),h=!1,p=function(t){(0,o.Tg)(e[t]).subscribe((0,a._)(i,function(e){c[t]=e,!h&&!d[t]&&(d[t]=!0,(h=d.every(s.D))&&(d=null))},l.l))},f=0;f<u;f++)p(f);t.subscribe((0,a._)(i,function(e){if(h){var t=(0,r.fX)([e],(0,r.zs)(c));i.next(n?n.apply(void 0,(0,r.fX)([],(0,r.zs)(t))):t)}}))})}},66093:(e,t,n)=>{let r;n.d(t,{Mz:()=>eK,i3:()=>eX,UC:()=>eZ,bL:()=>eW,Bk:()=>eR});var i=n(12115);let a=["top","right","bottom","left"],o=Math.min,s=Math.max,l=Math.round,u=Math.floor,c=e=>({x:e,y:e}),d={left:"right",right:"left",bottom:"top",top:"bottom"};function h(e,t){return"function"==typeof e?e(t):e}function p(e){return e.split("-")[0]}function f(e){return e.split("-")[1]}function m(e){return"x"===e?"y":"x"}function g(e){return"y"===e?"height":"width"}function v(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function b(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let y=["left","right"],E=["right","left"],T=["top","bottom"],k=["bottom","top"];function _(e){let t=p(e);return d[t]+e.slice(t.length)}function A(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function x(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function w(e,t,n){let r,{reference:i,floating:a}=e,o=v(t),s=m(v(t)),l=g(s),u=p(t),c="y"===o,d=i.x+i.width/2-a.width/2,h=i.y+i.height/2-a.height/2,b=i[l]/2-a[l]/2;switch(u){case"top":r={x:d,y:i.y-a.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:h};break;case"left":r={x:i.x-a.width,y:h};break;default:r={x:i.x,y:i.y}}switch(f(t)){case"start":r[s]-=b*(n&&c?-1:1);break;case"end":r[s]+=b*(n&&c?-1:1)}return r}async function S(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=h(t,e),m=A(f),g=s[p?"floating"===d?"reference":"floating":d],v=x(await a.getClippingRect
vendor: 1,244 bytes, line 1097
1097({element:null==(n=await (null==a.isElement?void 0:a.isElement(g)))||n?g:g.contextElement||await (null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),b="floating"===d?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,y=await (null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),E=await (null==a.isElement?void 0:a.isElement(y))&&await (null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},T=x(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:y,strategy:l}):b);return{top:(v.top-T.top+m.top)/E.y,bottom:(T.bottom-v.bottom+m.bottom)/E.y,left:(v.left-T.left+m.left)/E.x,right:(T.right-v.right+m.right)/E.x}}let C=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:S},l=await (null==o.isRTL?void 0:o.isRTL(t)),u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=w(u,r,l),h=r,p=0,f={};for(let n=0;n<a.length;n++){let m=a[n];if(!m)continue;let{name:g,fn:v}=m,{x:b,y:y,data:E,reset:T}=await v({x:c,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:f,re
1097cts:u,platform:s,elements:{reference:e,floating:t}});c=null!=b?b:c,d=null!=y?y:d,f[g]={...f[g],...E},T&&p<50&&(p++,"object"==typeof T&&(T.placement&&(h=T.placement),T.rects&&(u=!0===T.rects?await o.getElementRects({reference:e,floating:t,strategy:i}):T.rects),{x:c,y:d}=w(u,h,l)),n=-1)}return{x:c,y:d,placement:h,strategy:i,middlewareData:f}};function I(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function N(e){return a.some(t=>e[t]>=0)}let O=new Set(["left","top"]);async function R(e,t){let{placement:n,platform:r,elements:i}=e,a=await (null==r.isRTL?void 0:r.isRTL(i.floating)),o=p(n),s=f(n),l="y"===v(n),u=O.has(o)?-1:1,c=a&&l?-1:1,d=h(t,e),{mainAxis:m,crossAxis:g,alignmentAxis:b}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof b&&(g="end"===s?-1*b:b),l?{x:g*c,y:m*u}:{x:m*u,y:g*c}}function D(){return"undefined"!=typeof window}function L(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function P(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function M(e){var t;return null==(t=(F(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function F(e){return!!D()&&(e instanceof Node||e instanceof P(e).Node)}function B(e){return!!D()&&(e instanceof Element||e instanceof P(e).Element)}function j(e){return!!D()&&(e instanceof HTMLElement||e instanceof P(e).HTMLElement)}function U(e){return!!D()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof P(e).ShadowRoot)}function H(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=K(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==i&&"contents"!==i}function $(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let z=/transform|translate|scale|rotate|perspective|filter/,G=/paint|layout|strict|content/,Y=e=>!!e&&"none"!==e;function q(e){let t=B(e)?K(e):e;return Y(t.transform)||Y(t.translate)||Y(t.scale)||Y(t.rotate)||Y(t.perspective)||!V()&&(Y(t.backdropFilter)||Y(t.filter))||z.test(t.willChange||"")||G.test(t.contain||"")}function V(){return null==r&&(r="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r}function W(e){return/^(html|body|#document)$/.test(L(e))}function K(e){return P(e).getComputedStyle(e)}function Z(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function X(e){if("html"===L(e))return e;let t=e.assignedSlot||e.parentNode||U(e)&&e.host||M(e);return U(t)?t.host:t}function Q(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=X(t);return W(n)?t.ownerDocument?t.ownerDocument.body:t.body:j(n)&&H(n)?n:e(n)}(e),a=i===(null==(r=e.ownerDocument)?void 0:r.body),o=P(i);if(!a)return t.concat(i,Q(i,[],n));{let e=J(o);return t.concat(o,o.visualViewport||[],H(i)?i:[],e&&n?Q(e):[])}}function J(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ee(e){let t=K(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=j(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=l(n)!==a||l(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function et(e){return B(e)?e:e.contextElement}function en(e){let t=et(e);if(!j(t))return c(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ee(t),o=(a?l(n.width):n.width)/r,s=(a?l(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}let er=c(0);function ei(e){let t=P(e);return V()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:er}function ea(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let a=e.getBoundingClientRect(),o=et(e),s=c(1);t&&(r?B(r)&&(s=en(r)):s=en(e));let l=(void 0===(i=n)&&(i=!1),r&&(!i||r===P(o))&&i)?ei(o):c(0),u=(a.left+l.x)/s.x,d=(a.top+l.y)/s.y,h=a.width/s.x,p=a.height/s.y;if(o){let e=P(o),t=r&&B(r)?P(r):r,n=e,i=J(n);for(;i&&r&&t!==n;){let e=en(i),t=i.getBoundingClientRect(),r=K(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.to
1097p+(i.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,d*=e.y,h*=e.x,p*=e.y,u+=a,d+=o,i=J(n=P(i))}}return x({width:h,height:p,x:u,y:d})}function eo(e,t){let n=Z(e).scrollLeft;return t?t.left+n:ea(M(e)).left+n}function es(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-eo(e,n),y:n.top+t.scrollTop}}function el(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=P(e),r=M(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;let e=V();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,l=i.offsetTop)}let u=eo(r);if(u<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else u<=25&&(a+=u);return{width:a,height:o,x:s,y:l}}(e,n);else if("document"===t)r=function(e){let t=M(e),n=Z(e),r=e.ownerDocument.body,i=s(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=s(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+eo(e),l=-n.scrollTop;return"rtl"===K(r).direction&&(o+=s(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:l}}(M(e));else if(B(t))r=function(e,t){let n=ea(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=j(e)?en(e):c(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y;return{width:o,height:s,x:i*a.x,y:r*a.y}}(t,n);else{let n=ei(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return x(r)}function eu(e){return"static"===K(e).position}function ec(e,t){if(!j(e)||"fixed"===K(e).position)return null;if(t)return t(e);let n=e.offsetParent;return M(e)===n&&(n=n.ownerDocument.body),n}function ed(e,t){var n;let r=P(e);if($(e))return r;if(!j(e)){let t=X(e);for(;t&&!W(t);){if(B(t)&&!eu(t))return t;t=X(t)}return r}let i=ec(e,t);for(;i&&(n=i,/^(table|td|th)$/.test(L(n)))&&eu(i);)i=ec(i,t);return i&&W(i)&&eu(i)&&!q(i)?r:i||function(e){let t=X(e);for(;j(t)&&!W(t);){if(q(t))return t;if($(t))break;t=X(t)}return null}(e)||r}let eh=async function(e){let t=this.getOffsetParent||ed,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=j(t),i=M(t),a="fixed"===n,o=ea(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=c(0);if(r||!r&&!a)if(("body"!==L(t)||H(i))&&(s=Z(t)),r){let e=ea(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=eo(i));a&&!r&&i&&(l.x=eo(i));let u=!i||r||a?c(0):es(i,s);return{x:o.left+s.scrollLeft-l.x-u.x,y:o.top+s.scrollTop-l.y-u.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},ep={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a="fixed"===i,o=M(r),s=!!t&&$(t.floating);if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},u=c(1),d=c(0),h=j(r);if((h||!h&&!a)&&(("body"!==L(r)||H(o))&&(l=Z(r)),h)){let e=ea(r);u=en(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let p=!o||h||a?c(0):es(o,l);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}},getDocumentElement:M,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[..."clippingAncestors"===n?$(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=Q(e,[],!1).filter(e=>B(e)&&"body"!==L(e)),i=null,a="fixed"===K(e).position,o=a?X(e):e;for(;B(o)&&!W(o);){let t=K(o),n=q(o);n||"fixed"!==t.position||(i=null),(a?n||i:!(!n&&"static"===t.position&&i&&("absolute"===i.position||"fixed"===i.position)||H(o)&&!n&&function e(t,n){let r=X(t);return!(r===n||!B(r)||W(r))&&("fixed"===K(r).position||e(r,n))}(e,o)))?i=t:r=r.filter(e=>e!==o),o=X(o)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=el(t,a[0],i),u=l.top,c=l.right,d=l.bottom,h=l.left;for(let e=1;e<a.length;e++){let n=el(t,a[e],i);u=s(n.top,u),c=o(n.right,c),d=o(n.bottom,d),h=s(n.left,h)}return{width:c-h,height:d-u,x:h,y:u}},getOffsetParent:ed,getElementRects:eh,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=ee(e);return{width:t,height:n}},getScale:en,isElement:B,isRTL:function(e){return"rtl"===K(e).direction}};function ef(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let em=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:l,elements:u,middlewareData:c}=t,{element:d,padding:p=0}=h(e,t)||{};if(null==d)return{};let b=A(p),y={x:n,y:r},E=m(v(i)),T=g(E),k=await l.getDimensions(d),_="y"===E,x=_?"clientHeight":"clientWidth",w=a.reference[T]+a.reference[E]-y[E]-a.floating[T],S=y[E]-a.reference[E],C=await (null==l.getOffsetParent?void 0:l.getOffsetParent(d)),I=C?C[x]:0;I&&await (null==l.isElement?void 0:l.isElement(C))||(I=u.floating[x]||a.floating[T]);let N=I/2-k[T]/2-1,O=o(b[_?"top":"left"],N),R=o(b[_?"bottom":"right"],N),D=I-k[T]-R,L=I/2-k[T]/2+(w/2-S/2),P=s(O,o(L,D)),M=!c.arrow&&null!=f(i)&&L!==P&&a.reference[T]/2-(L<O?O:R)-k[T]/2<0,F=M?L<O?L-O:L-D:0;return{[E]:y[E]+F,data:{[E]:P,centerOffset:L-P-F,...M&&{alignmentOffset:F}},reset:M}}});var eg=n(47650),ev="undefined"!=typeof document?i.useLayoutEffect:function(){};function eb(e,t){let n,r,i;if(e===t)return!0;
1097if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!eb(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!eb(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ey(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eE(e,t){let n=ey(e);return Math.round(t*n)/n}function eT(e){let t=i.useRef(e);return ev(()=>{t.current=e}),t}var ek=n(97602),e_=n(95155),eA=i.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,e_.jsx)(ek.sG.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,e_.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eA.displayName="Arrow";var ex=n(94446),ew=n(3468),eS=n(70222),eC=n(4129),eI=n(84288),eN="Popper",[eO,eR]=(0,ew.A)(eN),[eD,eL]=eO(eN),eP=e=>{let{__scopePopper:t,children:n}=e,[r,a]=i.useState(null),[o,s]=i.useState(void 0);return(0,e_.jsx)(eD,{scope:t,anchor:r,onAnchorChange:a,placementState:o,setPlacementState:s,children:n})};eP.displayName=eN;var eM="PopperAnchor",eF=i.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...a}=e,o=eL(eM,n),s=i.useRef(null),l=o.onAnchorChange,u=i.useCallback(e=>{s.current=e,e&&l(e)},[l]),c=(0,ex.s)(t,u),d=i.useRef(null);i.useEffect(()=>{if(!r)return;let e=d.current;d.current=r.current,e!==d.current&&l(d.current)});let h=o.placementState&&eV(o.placementState),p=null==h?void 0:h[0],f=null==h?void 0:h[1];return r?null:(0,e_.jsx)(ek.sG.div,{"data-radix-popper-side":p,"data-radix-popper-align":f,...a,ref:c})});eF.displayName=eM;var eB="PopperContent",[ej,eU]=eO(eB),eH=i.forwardRef((e,t)=>{var n,r,a,l,c,d,A,x;let{__scopePopper:w,side:S="bottom",sideOffset:D=0,align:L="center",alignOffset:P=0,arrowPadding:F=0,avoidCollisions:B=!0,collisionBoundary:j=[],collisionPadding:U=0,sticky:H="partial",hideWhenDetached:$=!1,updatePositionStrategy:z="optimized",onPlaced:G,...Y}=e,q=eL(eB,w),[V,W]=i.useState(null),K=(0,ex.s)(t,e=>W(e)),[Z,X]=i.useState(null),J=(0,eI.X)(Z),ee=null!=(A=null==J?void 0:J.width)?A:0,en=null!=(x=null==J?void 0:J.height)?x:0,er="number"==typeof U?U:{top:0,right:0,bottom:0,left:0,...U},ei=Array.isArray(j)?j:[j],eo=ei.length>0,es={padding:er,boundary:ei.filter(eY),altBoundary:eo},{refs:el,floatingStyles:eu,placement:ec,isPositioned:ed,middlewareData:eh}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:s}={},transform:l=!0,whileElementsMounted:u,open:c}=e,[d,h]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=i.useState(r);eb(p,r)||f(r);let[m,g]=i.useState(null),[v,b]=i.useState(null),y=i.useCallback(e=>{e!==_.current&&(_.current=e,g(e))},[]),E=i.useCallback(e=>{e!==A.current&&(A.current=e,b(e))},[]),T=o||m,k=s||v,_=i.useRef(null),A=i.useRef(null),x=i.useRef(d),w=null!=u,S=eT(u),I=eT(a),N=eT(c),O=i.useCallback(()=>{if(!_.current||!A.current)return;let e={placement:t,strategy:n,middleware:p};I.current&&(e.platform=I.current),((e,t,n)=>{let r=new Map,i={platform:ep,...n},a={...i.platform,_c:r};return C(e,t,{...i,platform:a})})(_.current,A.current,e).then(e=>{let t={...e,isPositioned:!1!==N.current};R.current&&!eb(x.current,t)&&(x.current=t,eg.flushSync(()=>{h(t)}))})},[p,t,n,I,N]);ev(()=>{!1===c&&x.current.isPositioned&&(x.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[c]);let R=i.useRef(!1);ev(()=>(R.current=!0,()=>{R.current=!1}),[]),ev(()=>{if(T&&(_.current=T),k&&(A.current=k),T&&k){if(S.current)return S.current(T,k,O);O()}},[T,k,O,S,w]);let D=i.useMemo(()=>({reference:_,floating:A,setReference:y,setFloating:E}),[y,E]),L=i.useMemo(()=>({reference:T,floating:k}),[T,k]),P=i.useMemo(()=>{let e={position:n,left:0,top:0};if(!L.floating)return e;let t=eE(L.floating,d.x),r=eE(L.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...ey(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,L.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:O,refs:D,elements:L,floatingStyles:P}),[d,O,D,L,P])}({strategy:"fixed",placement:S+("center"!==L?"-"+L:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:h=!1}=r,p=et(e),f=a||l?[...p?Q(p):[],...t?Q(t):[]]:[];
1097f.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let m=p&&d?function(e,t){let n,r=null,i=M(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(c,d){void 0===c&&(c=!1),void 0===d&&(d=1),a();let h=e.getBoundingClientRect(),{left:p,top:f,width:m,height:g}=h;if(c||t(),!m||!g)return;let v=u(f),b=u(i.clientWidth-(p+m)),y={rootMargin:-v+"px "+-b+"px "+-u(i.clientHeight-(f+g))+"px "+-u(p)+"px",threshold:s(0,o(1,d))||1},E=!0;function T(t){let r=t[0].intersectionRatio;if(r!==d){if(!E)return l();r?l(!1,r):n=setTimeout(()=>{l(!1,1e-7)},1e3)}1!==r||ef(h,e.getBoundingClientRect())||l(),E=!1}try{r=new IntersectionObserver(T,{...y,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(T,y)}r.observe(e)}(!0),a}(p,n):null,g=-1,v=null;c&&(v=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&v&&t&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=v)||e.observe(t)})),n()}),p&&!h&&v.observe(p),t&&v.observe(t));let b=h?ea(e):null;return h&&function t(){let r=ea(e);b&&!ef(b,r)&&n(),b=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{a&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=v)||e.disconnect(),v=null,h&&cancelAnimationFrame(i)}}(...t,{animationFrame:"always"===z})},elements:{reference:q.anchor},middleware:[((e,t)=>{let n=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;let{x:i,y:a,placement:o,middlewareData:s}=t,l=await R(t,e);return o===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({mainAxis:D+en,alignmentAxis:P}),B&&((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:l=!0,crossAxis:u=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...d}=h(e,t),f={x:n,y:r},g=await a.detectOverflow(t,d),b=v(p(i)),y=m(b),E=f[y],T=f[b];if(l){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=E+g[e],r=E-g[t];E=s(n,o(E,r))}if(u){let e="y"===b?"top":"left",t="y"===b?"bottom":"right",n=T+g[e],r=T-g[t];T=s(n,o(T,r))}let k=c.fn({...t,[y]:E,[b]:T});return{...k,data:{x:k.x-n,y:k.y-r,enabled:{[y]:l,[b]:u}}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({mainAxis:!0,crossAxis:!1,limiter:"partial"===H?((e,t)=>({fn:function(e){return void 0===e&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=h(e,t),c={x:n,y:r},d=v(i),f=m(d),g=c[f],b=c[d],y=h(s,t),E="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){let e="y"===f?"height":"width",t=a.reference[f]-a.floating[e]+E.mainAxis,n=a.reference[f]+a.reference[e]-E.mainAxis;g<t?g=t:g>n&&(g=n)}if(u){var T,k;let e="y"===f?"width":"height",t=O.has(p(i)),n=a.reference[d]-a.floating[e]+(t&&(null==(T=o.offset)?void 0:T[d])||0)+(t?0:E.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:(null==(k=o.offset)?void 0:k[d])||0)-(t?E.crossAxis:0);b<n?b=n:b>r&&(b=r)}return{[f]:g,[d]:b}}}}(e).fn,options:[e,t]}))():void 0,...es}),B&&((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,a,o;let{placement:s,middlewareData:l,rects:u,initialPlacement:c,platform:d,elements:A}=t,{mainAxis:x=!0,crossAxis:w=!0,fallbackPlacements:S,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:I="none",flipAlignment:N=!0,...O}=h(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};let R=p(s),D=v(c),L=p(c)===c,P=await (null==d.isRTL?void 0:d.isRTL(A.floating)),M=S||(L||!N?[_(c)]:function(e){let t=_(e);return[b(e),t,b(t)]}(c)),F="none"!==I;!S&&F&&M.push(...function(e,t,n,r){let i=f(e),a=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?E:y;return t?y:E;case"left":case"right":return t?T:k;default:return[]}}(p(e),"start"===n,r);return i&&(a=a.map(e=>e+"-"+i),t&&(a=a.concat(a.map(b)))),a}(c,N,I,P));let B=[c,...M],j=await d.detectOverflow(t,O),U=[],H=(null==(r=l.flip)?void 0:r.overflows)||[];if(x&&U.push(j[R]),w){let e=function(e,t,n){void 0===n&&(n=!1);let r=f(e),i=m(v(e)),a=g(i),o="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=_(o)),[o,_(o)]}(s,u,P);U.push(j[e[0]],j[e[1]])}if(H=[...H,{placement:s,overflows:U}],!U.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=B[e];if(t&&("alignment"!==w||D===v(t)||H.every(e=>v(e.placement)!==D||e.overflows[0]>0)))return{data:{index:e,overflows:H},reset:{placement:t}};let n=null==(a=H.filter(e=>e.overflows[0]<=0).sort((e,t)=>
1097e.overflows[1]-t.overflows[1])[0])?void 0:a.placement;if(!n)switch(C){case"bestFit":{let e=null==(o=H.filter(e=>{if(F){let t=v(e.placement);return t===D||"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:o[0];e&&(n=e);break}case"initialPlacement":n=c}if(s!==n)return{reset:{placement:n}}}return{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...es}),((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let i,a,{placement:l,rects:u,platform:c,elements:d}=t,{apply:m=()=>{},...g}=h(e,t),b=await c.detectOverflow(t,g),y=p(l),E=f(l),T="y"===v(l),{width:k,height:_}=u.floating;"top"===y||"bottom"===y?(i=y,a=E===(await (null==c.isRTL?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(a=y,i="end"===E?"top":"bottom");let A=_-b.top-b.bottom,x=k-b.left-b.right,w=o(_-b[i],A),S=o(k-b[a],x),C=!t.middlewareData.shift,I=w,N=S;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(N=x),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(I=A),C&&!E){let e=s(b.left,0),t=s(b.right,0),n=s(b.top,0),r=s(b.bottom,0);T?N=k-2*(0!==e||0!==t?e+t:s(b.left,b.right)):I=_-2*(0!==n||0!==r?n+r:s(b.top,b.bottom))}await m({...t,availableWidth:N,availableHeight:I});let O=await c.getDimensions(d.floating);return k!==O.width||_!==O.height?{reset:{rects:!0}}:{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...es,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:i}=e,{width:a,height:o}=n.reference,s=t.floating.style;s.setProperty("--radix-popper-available-width","".concat(r,"px")),s.setProperty("--radix-popper-available-height","".concat(i,"px")),s.setProperty("--radix-popper-anchor-width","".concat(a,"px")),s.setProperty("--radix-popper-anchor-height","".concat(o,"px"))}}),Z&&((e,t)=>{let n=(e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?em({element:n.current,padding:r}).fn(t):{}:n?em({element:n,padding:r}).fn(t):{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}})({element:Z,padding:F}),eq({arrowWidth:ee,arrowHeight:en}),$&&((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=h(e,t);switch(i){case"referenceHidden":{let e=I(await r.detectOverflow(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:N(e)}}}case"escaped":{let e=I(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:N(e)}}}default:return{}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({strategy:"referenceHidden",...es,boundary:eo?es.boundary:void 0})]}),eA=q.setPlacementState;(0,eC.N)(()=>(eA(ec),()=>{eA(void 0)}),[ec,eA]);let[ew,eN]=eV(ec),eO=(0,eS.c)(G);(0,eC.N)(()=>{ed&&(null==eO||eO())},[ed,eO]);let eR=null==(n=eh.arrow)?void 0:n.x,eD=null==(r=eh.arrow)?void 0:r.y,eP=(null==(a=eh.arrow)?void 0:a.centerOffset)!==0,[eM,eF]=i.useState();return(0,eC.N)(()=>{V&&eF(window.getComputedStyle(V).zIndex)},[V]),(0,e_.jsx)("div",{ref:el.setFloating,"data-radix-popper-content-wrapper":"",style:{...eu,transform:ed?eu.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eM,"--radix-popper-transform-origin":[null==(l=eh.transformOrigin)?void 0:l.x,null==(c=eh.transformOrigin)?void 0:c.y].join(" "),...(null==(d=eh.hide)?void 0:d.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,e_.jsx)(ej,{scope:w,placedSide:ew,placedAlign:eN,onArrowChange:X,arrowX:eR,arrowY:eD,shouldHideArrow:eP,children:(0,e_.jsx)(ek.sG.div,{"data-side":ew,"data-align":eN,...Y,ref:K,style:{...Y.style,animation:ed?void 0:"none"}})})})});eH.displayName=eB;var e$="PopperArrow",ez={top:"bottom",right:"left",bottom:"top",left:"right"},eG=i.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=eU(e$,n),a=ez[i.placedSide];return(0,e_.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,e_.jsx)(eA,{...r,ref:t,style:{...r.style,display:"block"}})})});function eY(e){return null!==e}eG.displayName=e$;var eq=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,a,o;let{placement:s,rects:l,middlewareData:u}=t,c=(null==(n=u.arrow)?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,h=c?0:e.arrowHeight,[p,f]=eV(s),m={start:"0%",center:"50%",end:"100%"}[f],g=(null!=(a=null==(r=u.arrow)?void 0:r.x)?a:0)+d/2,v=(null!=(o=null==(i=u.arrow)?void 0:i.y)?o:0)+h/2,b="",y="";return"bottom"===p?(b=c?m:"".concat(g,"px"),y="".concat(-h,"px")):"top"===p?(b=c?m:"".concat(g,"px"),y="".concat(l.floating.height+h,"px")):"right"===p?(b="".concat(-h,"px"),y=c?m:"".concat(v,"px")):"left"===p&&(b="".concat(l.floating.width+h,"px"),y=c?m:"".concat(v,"px")),{data:{x:b,y}}}});function eV(e){let[t,n="center"]=e.split("-");return[t,n]}var eW=eP,eK=eF,eZ=eH,eX=eG},66218:(e,t,n)=>{n.d(t,{jH:()=>a});var r=n(12115);n(95155);var i=r.createContext(void 0);function a(e){let t=r.useContext(i);return e||t||"ltr"}},67131:(e,t,n)=>{n.d(t,{c:()=>p});var r=n(12718),i=n(61270),a=n(16433),o=n(62473),s=n(63704),l=n(64354),u=n(8286),c=n(45037),d=n(89526),h=n(42421);function p(e,t){void 0===t&&(t=r.E);var n,p,f,m,g=(n=e,p=t,void 0===n&&(n=0),void 0===f&&(f=r.b),m=-1,null!=p&&((0,d.m)(p)?f=p:m=p),new c.c(function(e){var t=(0,h.v)(n)?n-f.now():n;t<0&&(t=0);var r=0;return f.schedule(function(){e.closed||(e.next(r++),0<=m?this.schedule(void 0,m):e.complete())},t)}));return function e(t,n){return n?function(r){return(0,i.x)(n.pipe((0,a.s)(1),(0,o.w)()),r.pipe(e(t)))}:(0,l.Z)(function(e,n){return(0,u.Tg)(t(e,n)).pipe((0,a.s)(1),(0,s.T)(function(){return e}))})}(function(){return g})}},67927:(e,t,n)=>{n.d(t,{Eg:()=>l,gV:()=>u});var r,i=n(47211),a=n(85755),o=n(40712),s=n(39097);!function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(r||(r={}));var l=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){return u(this,e)},e.prototype.do=function(e,t,n){var r=this.kind,i=this.value,a=this.error;return"N"===r?null==e?void 0:e(i):"E"===r?null==t?void 0:t(a):null==n?void 0:n()},e.prototype.accept=function(e,t,n){return(0,s.T)(null==e?void 0:e.next)?this.observe(e):this.do(e,t,n
1097)},e.prototype.toObservable=function(){var e=this.kind,t=this.value,n=this.error,r="N"===e?(0,a.of)(t):"E"===e?(0,o.$)(function(){return n}):"C"===e?i.w:0;if(!r)throw TypeError("Unexpected notification kind "+e);return r},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function u(e,t){var n,r,i,a=e.kind,o=e.value,s=e.error;if("string"!=typeof a)throw TypeError('Invalid notification, missing "kind"');"N"===a?null==(n=t.next)||n.call(t,o):"E"===a?null==(r=t.error)||r.call(t,s):null==(i=t.complete)||i.call(t)}},68283:(e,t,n)=>{n.d(t,{q:()=>o});var r=n(71450),i=n(61270),a=n(85755);function o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return(0,i.x)(t,a.of.apply(void 0,(0,r.fX)([],(0,r.zs)(e))))}}},68419:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},68681:(e,t,n)=>{n.d(t,{T:()=>u});var r=n(18283);let i={basename:function(e,t){let n;if(void 0!==t&&"string"!=typeof t)throw TypeError('"ext" argument must be a string');a(e);let r=0,i=-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 i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let s=-1,l=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else s<0&&(n=!0,s=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(i=o):(l=-1,i=s));return r===i?i=s:i<0&&(i=e.length),e.slice(r,i)},dirname:function(e){let t;if(a(e),0===e.length)return".";let 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){let t;a(e);let n=e.length,r=-1,i=0,o=-1,s=0;for(;n--;){let a=e.codePointAt(n);if(47===a){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===a?o<0?o=n:1!==s&&(s=1):o>-1&&(s=-1)}return o<0||r<0||0===s||1===s&&o===r-1&&o===i+1?"":e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)a(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){a(e);let t=47===e.codePointAt(0),n=function(e,t){let n,r,i="",a=0,o=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else if(47===n)break;else n=47;if(47===n){if(o===l-1||1===s);else if(o!==l-1&&2===s){if(i.length<2||2!==a||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2)){if(i.length>2){if((r=i.lastIndexOf("/"))!==i.length-1){r<0?(i="",a=0):a=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),o=l,s=0;continue}}else if(i.length>0){i="",a=0,o=l,s=0;continue}}t&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+e.slice(o+1,l):i=e.slice(o+1,l),a=l-o-1;o=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t);return 0!==n.length||t||(n="."),n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/"),t?"/"+n:n}(t)},sep:"/"};function a(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}let o={cwd:function(){return"/"}};function s(e){return!!(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}let l=["history","path","basename","stem","extname","dirname"];class u{constructor(e){let t,n;t=e?s(e)?{path:e}:"string"==typeof e||function(e){return!!(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":o.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<l.length;){let e=l[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)l.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?i.basename(this.path):void 0}set basename(e){d(e,"basename"),c(e,"basename"),this.path=i.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?i.dirname(this.path):void 0}set dirname(e){h(this.basename,"dirname"),this.path=i.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?i.extname(this.path):void 0}set extname(e){if(c(e,"extname"),h(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");
1097if(e.includes(".",1))throw Error("`extname` cannot contain multiple dots")}this.path=i.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){s(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!s(e)){let t=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){let e=TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){let e=TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}let t=e.pathname,n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){let e=t.codePointAt(n+2);if(70===e||102===e){let e=TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}(e)),d(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?i.basename(this.path,this.extname):void 0}set stem(e){d(e,"stem"),c(e,"stem"),this.path=i.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let i=new r.o(e,t,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return void 0===this.value?"":"string"==typeof this.value?this.value:new TextDecoder(e||void 0).decode(this.value)}}function c(e,t){if(e&&e.includes(i.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+i.sep+"`")}function d(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function h(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}},68946:(e,t,n)=>{n.d(t,{B:()=>l});var r,i=n(12115),a=n(4129),o=(r||(r=n.t(i,2)))[" useId ".trim().toString()]||(()=>void 0),s=0;function l(e){let[t,n]=i.useState(o());return(0,a.N)(()=>{e||n(e=>e??String(s++))},[e]),e||(t?`radix-${t}`:"")}},69666:(e,t,n)=>{n.d(t,{n:()=>d});var r=n(12115),i=n(94446),a=n(97602),o=n(70222),s=n(95155),l="focusScope.autoFocusOnMount",u="focusScope.autoFocusOnUnmount",c={bubbles:!1,cancelable:!0},d=r.forwardRef((e,t)=>{let{loop:n=!1,trapped:d=!1,onMountAutoFocus:g,onUnmountAutoFocus:v,...b}=e,[y,E]=r.useState(null),T=(0,o.c)(g),k=(0,o.c)(v),_=r.useRef(null),A=(0,i.s)(t,e=>E(e)),x=r.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;r.useEffect(()=>{if(d){let e=function(e){if(x.paused||!y)return;let t=e.target;y.contains(t)?_.current=t:f(_.current,{select:!0})},t=function(e){if(x.paused||!y)return;let t=e.relatedTarget;null!==t&&(y.contains(t)||f(_.current,{select:!0}))};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&f(y)});return y&&n.observe(y,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[d,y,x.paused]),r.useEffect(()=>{if(y){m.add(x);let e=document.activeElement;if(!y.contains(e)){let t=new CustomEvent(l,c);y.addEventListener(l,T),y.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(f(r,{select:t}),document.activeElement!==n)return}(h(y).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&f(y))}return()=>{y.removeEventListener(l,T),setTimeout(()=>{let t=new CustomEvent(u,c);y.addEventListener(u,k),y.dispatchEvent(t),t.defaultPrevented||f(null!=e?e:document.body,{select:!0}),y.removeEventListener(u,k),m.remove(x)},0)}}},[y,T,k,x]);let w=r.useCallback(e=>{if(!n&&!d||x.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){let t=e.currentTarget,[i,a]=function(e){let t=h(e);return[p(t,e),p(t.reverse(),e)]}(t);i&&a?e.shiftKey||r!==a?e.shiftKey&&r===i&&(e.preventDefault(),n&&f(a,{select:!0})):(e.preventDefault(),n&&f(i,{select:!0})):r===t&&e.preventDefault()}},[n,d,x.paused]);return(0,s.jsx)(a.sG.div,{tabIndex:-1,...b,ref:A,onKeyDown:w})});function h(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let 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 p(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function f(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}d.displayName="FocusScope";var m=function(){let e=[];return{add(t){let n=e[0];t!==n&&(null==n||n.pause()),(e=g(e,t)).unshift(t)},remove(t){var n;null==(n=(e=g(e,t))[0])||n.resume()}}}();function g(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}}
1097,69899:(e,t,n)=>{n.d(t,{l:()=>r});var r="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},70011:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},o=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),a=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!a)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;else if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,u,c,d=arguments[0],h=1,p=arguments.length,f=!1;for("boolean"==typeof d&&(f=d,d=arguments[1]||{},h=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});h<p;++h)if(t=arguments[h],null!=t)for(n in t)r=l(d,n),d!==(i=l(t,n))&&(f&&i&&(o(i)||(u=a(i)))?(u?(u=!1,c=r&&a(r)?r:[]):c=r&&o(r)?r:{},s(d,{name:n,newValue:e(f,c,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},70222:(e,t,n)=>{n.d(t,{c:()=>i});var r=n(12115);function i(e){let t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}},71450:(e,t,n)=>{n.d(t,{AQ:()=>p,C6:()=>i,Cl:()=>a,Ju:()=>u,N3:()=>h,Tt:()=>o,YH:()=>l,fX:()=>d,sH:()=>s,xN:()=>f,zs:()=>c});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function o(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function s(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(o,s)}l((r=r.apply(e,t||[])).next())})}function l(e,t){var n,r,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){var u=[s,l];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function u(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function d(e,t,n){if(n||2==arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function p(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(e){return function(t){return Promise.resolve(t).then(e,u)}}),r[Symbol.asyncIterator]=function(){return this},r;function o(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){a.push([e,t,n,r])>1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{var n;(n=i[e](t)).value instanceof h?Promise.resolve(n.value.v).then(l,u):c(a[0][2],n)}catch(e){c(a[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function f(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=u(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){var a,o,s;a=r,o=i,s=(t=e[n](t)).done,Promise.resolve(t.value).then(function(e){a({value:e,done:s})},o)})}}}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},72613:(e,t,n)=>{n.d(t,{Y:()=>r});let r=function(e){return e.SERVICE_NOT_CONFIGURED="service_not_configured",e.INVALID_AUDIO_FORMAT="invalid_audio_format",e.AUDIO_TOO_LONG="audio_too_long",e.AUDIO_TOO_SHORT="audio_too_short",e.RATE_LIMITED="rate_limited",e.AUTH_FAILED="auth_failed",e.PROVIDER_ERROR="provider_error",e.NETWORK_E
1097RROR="network_error",e.INVALID_REQUEST="invalid_request",e}({})},73431:(e,t,n)=>{n.d(t,{a:()=>ol,b:()=>oc,c:()=>sE,g:()=>sm,i:()=>sb});var r,i,a,o,s,l,u,c,d,h,p,f,m,g,v,b,y={};n.r(y),n.d(y,{boolean:()=>M,booleanish:()=>F,commaOrSpaceSeparated:()=>$,commaSeparated:()=>H,number:()=>j,overloadedBoolean:()=>B,spaceSeparated:()=>U});var E={};n.r(E),n.d(E,{boolean:()=>eY,booleanish:()=>eq,commaOrSpaceSeparated:()=>eX,commaSeparated:()=>eZ,number:()=>eW,overloadedBoolean:()=>eV,spaceSeparated:()=>eK});var T={};n.r(T),n.d(T,{boolean:()=>tE,booleanish:()=>tT,commaOrSpaceSeparated:()=>tw,commaSeparated:()=>tx,number:()=>t_,overloadedBoolean:()=>tk,spaceSeparated:()=>tA});var k=n(12115),_=n(95139),A=n(56522);let x={indicator:"indicator",textOnly:"text-only",remove:"remove"};function w(e,t){if("string"!=typeof e)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{}return null}}let S=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),C=new Set(["javascript:","data:","file:","vbscript:"]);function I(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if("string"==typeof e&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if("string"==typeof e&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if("string"==typeof e&&e.startsWith("blob:")){try{let t=new URL(e);if("blob:"===t.protocol&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&"invalid"!==t)return e}}catch{}return null}let o=w(e,n);if(!o||C.has(o.protocol)||!(S.has(o.protocol)||a.includes(o.protocol)||a.includes("*")))return null;if("mailto:"===o.protocol||!o.protocol.match(/^https?:$/))return o.href;let s="string"==typeof e&&(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"));return o&&t.some(e=>{let t=w(e,n);return!!t&&t.origin===o.origin&&o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes("*")?"https:"!==o.protocol&&"http:"!==o.protocol?null:s?o.pathname+o.search+o.hash:o.href:null}let N=Symbol("node-seen");class O{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function R(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new O(n,r,t)}function D(e){return e.toLowerCase()}O.prototype.normal={},O.prototype.property={},O.prototype.space=void 0;class L{constructor(e,t){this.attribute=t,this.property=e}}L.prototype.attribute="",L.prototype.booleanish=!1,L.prototype.boolean=!1,L.prototype.commaOrSpaceSeparated=!1,L.prototype.commaSeparated=!1,L.prototype.defined=!1,L.prototype.mustUseProperty=!1,L.prototype.number=!1,L.prototype.overloadedBoolean=!1,L.prototype.property="",L.prototype.spaceSeparated=!1,L.prototype.space=void 0;let P=0,M=z(),F=z(),B=z(),j=z(),U=z(),H=z(),$=z();function z(){return 2**++P}let G=Object.keys(y);class Y extends L{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<G.length;){let e=G[i];!function(e,t,n){n&&(e[t]=n)}(this,G[i],(n&y[e])===y[e])}}}function q(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Y(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[D(r)]=r,n[D(a.attribute)]=r}return new O(t,n,e.space)}Y.prototype.defined=!0;let V=q({properties:{ariaActiveDescendant:null,ariaAtomic:F,ariaAutoComplete:null,ariaBusy:F,ariaChecked:F,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:U,ariaCurrent:null,ariaDescribedBy:U,ariaDetails:null,ariaDisabled:F,ariaDropEffect:U,ariaErrorMessage:null,ariaExpanded:F,ariaFlowTo:U,ariaGrabbed:F,ariaHasPopup:null,ariaHidden:F,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:U,ariaLevel:j,ariaLive:null,ariaModal:F,ariaMultiLine:F,ariaMultiSelectable:F,ariaOrientation:null,ariaOwns:U,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:F,ariaReadOnly:F,ariaRelevant:null,ariaRequired:F,ariaRoleDescription:U,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:F,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform:(e,t)=>
vendor: 4,641 bytes, line 1097
1097"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function W(e,t){return t in e?e[t]:t}function K(e,t){return W(e,t.toLowerCase())}let Z=q({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:H,acceptCharset:U,accessKey:U,action:null,allow:null,allowFullScreen:M,allowPaymentRequest:M,allowUserMedia:M,alt:null,as:null,async:M,autoCapitalize:null,autoComplete:U,autoFocus:M,autoPlay:M,blocking:U,capture:null,charSet:null,checked:M,cite:null,className:U,cols:j,colSpan:null,content:null,contentEditable:F,controls:M,controlsList:U,coords:j|H,crossOrigin:null,data:null,dateTime:null,decoding:null,default:M,defer:M,dir:null,dirName:null,disabled:M,download:B,draggable:F,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:M,formTarget:null,headers:U,height:j,hidden:B,high:j,href:null,hrefLang:null,htmlFor:U,httpEquiv:U,id:null,imageSizes:null,imageSrcSet:null,inert:M,inputMode:null,integrity:null,is:null,isMap:M,itemId:null,itemProp:U,itemRef:U,itemScope:M,itemType:U,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:M,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:M,muted:M,name:null,nonce:null,noModule:M,noValidate:M,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:M,optimum:j,pattern:null,ping:U,placeholder:null,playsInline:M,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:M,referrerPolicy:null,rel:U,required:M,reversed:M,rows:j,rowSpan:j,sandbox:U,scope:null,scoped:M,seamless:M,selected:M,shadowRootClonable:M,shadowRootDelegatesFocus:M,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:F,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:M,useMap:null,value:F,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:U,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:M,declare:M,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:M,noHref:M,noShade:M,noWrap:M,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:F,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:M,disableRemotePlayback:M,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:K}),X=q({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",colorRen
1097dering:"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:$,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,
1097className:U,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:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:M,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,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:H,g2:H,glyphName:H,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:$,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,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:j,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:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:U,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$,rev:$,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$,requiredFeatures:$,requiredFonts:$,requiredFormats:$,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:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:$,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:W}),Q=q({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>
1097"xlink:"+t.slice(5).toLowerCase()}),J=q({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:K}),ee=q({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),et=R([V,Z,Q,J,ee],"html"),en=R([V,X,Q,J,ee],"svg");var er=n(52371);let ei=/[#.]/g,ea=/[A-Z]/g,eo=/-[a-z]/g,es=/^data[-\w.:]+$/i;function el(e){return"-"+e.toLowerCase()}function eu(e){return e.charAt(1).toUpperCase()}var ec=n(59292);function ed(e,t,n){let r=n?function(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}(n):void 0;return function(n,i,...a){let o;if(null==n)o={type:"root",children:[]},a.unshift(i);else{let s=(o=function(e,t){let n,r,i=e||"",a={},o=0;for(;o<i.length;){ei.lastIndex=o;let e=ei.exec(i),t=i.slice(o,e?e.index:i.length);t&&(n?"#"===n?a.id=t:Array.isArray(a.className)?a.className.push(t):a.className=[t]:r=t,o+=t.length),e&&(n=e[0],o++)}return{type:"element",tagName:r||t||"div",properties:a,children:[]}}(n,t)).tagName.toLowerCase(),l=r?r.get(s):void 0;if(o.tagName=l||s,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;if("string"!=typeof e.type)return!1;for(let t of Object.keys(e)){let n=e[t];if(n&&"object"==typeof n){if(!Array.isArray(n))return!0;for(let e of n)if("number"!=typeof e&&"string"!=typeof e)return!0}}return!!("children"in e&&Array.isArray(e.children))}(i))a.unshift(i);else for(let[t,n]of Object.entries(i))!function(e,t,n,r){let i,a=function(e,t){let n=D(t),r=t,i=L;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&es.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(eo,eu);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!eo.test(e)){let n=e.replace(ea,el);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=Y}return new i(r,t)}(e,n);if(null!=r){if("number"==typeof r){if(Number.isNaN(r))return;i=r}else i="boolean"==typeof r?r:"string"==typeof r?a.spaceSeparated?(0,ec.q)(r):a.commaSeparated?(0,er.q)(r):a.commaOrSpaceSeparated?(0,ec.q)((0,er.q)(r).join(" ")):eh(a,a.property,r):Array.isArray(r)?[...r]:"style"===a.property?function(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}(r):String(r);if(Array.isArray(i)){let e=[];for(let t of i)e.push(eh(a,a.property,t));i=e}"className"===a.property&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[a.property]=i}}(e,o.properties,t,n)}for(let e of a)!function e(t,n){if(null==n);else if("number"==typeof n||"string"==typeof n)t.push({type:"text",value:String(n)});else if(Array.isArray(n))for(let r of n)e(t,r);else if("object"==typeof n&&"type"in n)"root"===n.type?e(t,n.children):t.push(n);else throw Error("Expected node, nodes, or string, got `"+n+"`")}(o.children,e);return"element"===o.type&&"template"===o.tagName&&(o.content={type:"root",children:o.children},o.children=[]),o}}function eh(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||D(n)===D(t)))return!0}return n}let ep=ed(et,"div"),ef=ed(en,"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"]),em={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/"};function eg(e,t){let n=function(e,t){switch(e.nodeType){case 1:return function(e,t){let n=e.namespaceURI,r=n===em.svg?ef:ep,i=n===em.html?e.tagName.toLowerCase():e.tagName,a=n===em.html&&"template"===i?e.content:e,o=e.getAttributeNames(),s={},l=-1;for(;++l<o.length;)s[o[l]]=e.getAttribute(o[l])||"";return r(i,s,ev(a,t))}(e,t);case 3:return{type:"text",value:e.nodeValue||""};case 8:return{type:"comment",value:e.nodeValue||""};case 9:case 11:return function(e,t){return{type:"root",children:ev(e,t)}}(e,t);case 10:return{type:"doctype"};default:return}}(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function ev(e,t){let n=e.childNodes,r=[],i=-1;for(;++i<n.length;){let e=eg(n[i],t);void 0!==e&&r.push(e)}return r}let eb=new DOMParser;var ey=n(95502);let eE=function(e,t,n){let r=(0,ey.C)(n);if(!e||!e.type||!e.children)throw Error("Expected parent node");if("number"==typeof t){if(t<0||t===1/0)throw Error("Expected positive finite number as index")}else if((t=e.children.indexOf(t))<0)throw Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]},eT=function(e){if(null==e)return e_;if("string"==typeof e){var t;return t=e,ek(function(e){return e.tagName===t})}if("object"==typeof e){var n=e;let t=[],r=-1;for(;++r<n.length;)t[r]=eT(n[r]);return ek(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}if("function"==typeof e)return ek(e);throw Error("Expected function, string, or array as `test`")};function ek(e){return function(t,n,r){var i;return!!(null!==(i=t)&&"object"==typeof i&&"type"in i&&"tagName"in i&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function e_(e){return!!(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}let eA=/\n/g,ex=/[\t ]+/g,ew=eT("br"),eS=eT(function(e){return"td"===e.tagName||"th"===e.tagName}),eC=eT("p"),eI=eT("tr"),eN=eT(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",function(e){return!!(e.properties||{}).hidden},function(e){return"dialog"===e.tagName&&!(e.properties||{}).open}]),eO=eT(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function eR(e,t){let n,r=String(e.value),i=[],a=[],o=0;for(;o<=r.length;){eA.lastIndex=o;let e=eA.exec(r),n=e&&"index"in e?e.index:r.length;i.push(function(e,t,n){let r,i=[],a=0;for(;a<e.length;){ex.lastIndex=a;let n=ex.exec(e);r=n?n.index:e.length,a||r||!n||t||i.push(""),a!==r&&i.push(e.slice(a,r)),a=n?r+n[0].length:r}return a===r||n||i.push(""),i.join(" ")}(r.slice(o,n).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),0!==o||t.breakBefore,n!==r.length||t.breakAfter)),o=n+1}let s=-1;for(;++s<i.length;
1097)8203===i[s].charCodeAt(i[s].length-1)||s<i.length-1&&8203===i[s+1].charCodeAt(0)?(a.push(i[s]),n=void 0):i[s]?("number"==typeof n&&a.push(n),a.push(i[s]),n=0):(0===s||s===i.length-1)&&a.push(0);return a}function eD(e,t){if("element"===e.type){let n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}var eL=n(84739);let eP={},eM=[];function eF(e){let t=e||eP;return function(e,n){(0,A.VG)(e,"element",function(e,r){let i,a=Array.isArray(e.properties.className)?e.properties.className:eM,o=a.includes("language-math"),s=a.includes("math-display"),l=a.includes("math-inline"),u=s;if(!o&&!s&&!l)return;let c=r[r.length-1],d=e;if("code"===e.tagName&&o&&c&&"element"===c.type&&"pre"===c.tagName&&(d=c,c=r[r.length-2],u=!0),!c)return;let h=function(e,t){let n,r="children"in e?e.children:[],i=eO(e),a=eD(e,{whitespace:(t||{}).whitespace||"normal",breakBefore:!1,breakAfter:!1}),o=[];("text"===e.type||"comment"===e.type)&&o.push(...eR(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...function e(t,n,r){return"element"===t.type?function(t,n,r){let i,a,o=eD(t,r),s=t.children||[],l=-1,u=[];if(eN(t))return u;for(ew(t)||eI(t)&&eE(n,t,eI)?a="\n":eC(t)?(i=2,a=2):eO(t)&&(i=1,a=1);++l<s.length;)u=u.concat(e(s[l],t,{whitespace:o,breakBefore:l?void 0:i,breakAfter:l<s.length-1?ew(s[l+1]):a}));return eS(t)&&eE(n,t,eS)&&u.push("	"),i&&u.unshift(i),a&&u.push(a),u}(t,n,r):"text"===t.type?"normal"===r.whitespace?eR(t,r):[String(t.value)]:[]}(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?ew(r[s+1]):i}));let l=[];for(s=-1;++s<o.length;){let e=o[s];"number"==typeof e?void 0!==n&&e>n&&(n=e):e&&(void 0!==n&&n>-1&&l.push("\n".repeat(n)||" "),n=-1,l.push(e))}return l.join("")}(d,{whitespace:"pre"});try{i=eL.default.renderToString(h,{...t,displayMode:u,throwOnError:!0})}catch(o){let a=o.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...r,e],cause:o,place:e.position,ruleId:a,source:"rehype-katex"});try{i=eL.default.renderToString(h,{...t,displayMode:u,strict:"ignore",throwOnError:!1})}catch{i=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(o)},children:[{type:"text",value:h}]}]}}if("string"==typeof i){var p,f;i=(p=i,f={fragment:!0},eg(f?.fragment?function(e){let t=document.createElement("template");return t.innerHTML=e,t.content}(p):eb.parseFromString(p,"text/html"),{})||{type:"root",children:[]}).children}let m=c.children.indexOf(d);return c.children.splice(m,1,...i),A._Z})}}var eB=n(44599),ej=n(63758);class eU{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function eH(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new eU(n,r,t)}function e$(e){return e.toLowerCase()}eU.prototype.normal={},eU.prototype.property={},eU.prototype.space=void 0;class ez{constructor(e,t){this.attribute=t,this.property=e}}ez.prototype.attribute="",ez.prototype.booleanish=!1,ez.prototype.boolean=!1,ez.prototype.commaOrSpaceSeparated=!1,ez.prototype.commaSeparated=!1,ez.prototype.defined=!1,ez.prototype.mustUseProperty=!1,ez.prototype.number=!1,ez.prototype.overloadedBoolean=!1,ez.prototype.property="",ez.prototype.spaceSeparated=!1,ez.prototype.space=void 0;let eG=0,eY=eQ(),eq=eQ(),eV=eQ(),eW=eQ(),eK=eQ(),eZ=eQ(),eX=eQ();function eQ(){return 2**++eG}let eJ=Object.keys(E);class e0 extends ez{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<eJ.length;){let e=eJ[i];!function(e,t,n){n&&(e[t]=n)}(this,eJ[i],(n&E[e])===E[e])}}}function e1(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new e0(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[e$(r)]=r,n[e$(a.attribute)]=r}return new eU(t,n,e.space)}e0.prototype.defined=!0;let e2=e1({properties:{ariaActiveDescendant:null,ariaAtomic:eq,ariaAutoComplete:null,ariaBusy:eq,ariaChecked:eq,ariaColCount:eW,ariaColIndex:eW,ariaColSpan:eW,ariaControl
1097s:eK,ariaCurrent:null,ariaDescribedBy:eK,ariaDetails:null,ariaDisabled:eq,ariaDropEffect:eK,ariaErrorMessage:null,ariaExpanded:eq,ariaFlowTo:eK,ariaGrabbed:eq,ariaHasPopup:null,ariaHidden:eq,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:eK,ariaLevel:eW,ariaLive:null,ariaModal:eq,ariaMultiLine:eq,ariaMultiSelectable:eq,ariaOrientation:null,ariaOwns:eK,ariaPlaceholder:null,ariaPosInSet:eW,ariaPressed:eq,ariaReadOnly:eq,ariaRelevant:null,ariaRequired:eq,ariaRoleDescription:eK,ariaRowCount:eW,ariaRowIndex:eW,ariaRowSpan:eW,ariaSelected:eq,ariaSetSize:eW,ariaSort:null,ariaValueMax:eW,ariaValueMin:eW,ariaValueNow:eW,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function e3(e,t){return t in e?e[t]:t}function e4(e,t){return e3(e,t.toLowerCase())}let e9=e1({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:eZ,acceptCharset:eK,accessKey:eK,action:null,allow:null,allowFullScreen:eY,allowPaymentRequest:eY,allowUserMedia:eY,alt:null,as:null,async:eY,autoCapitalize:null,autoComplete:eK,autoFocus:eY,autoPlay:eY,blocking:eK,capture:null,charSet:null,checked:eY,cite:null,className:eK,cols:eW,colSpan:null,content:null,contentEditable:eq,controls:eY,controlsList:eK,coords:eW|eZ,crossOrigin:null,data:null,dateTime:null,decoding:null,default:eY,defer:eY,dir:null,dirName:null,disabled:eY,download:eV,draggable:eq,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:eY,formTarget:null,headers:eK,height:eW,hidden:eV,high:eW,href:null,hrefLang:null,htmlFor:eK,httpEquiv:eK,id:null,imageSizes:null,imageSrcSet:null,inert:eY,inputMode:null,integrity:null,is:null,isMap:eY,itemId:null,itemProp:eK,itemRef:eK,itemScope:eY,itemType:eK,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:eY,low:eW,manifest:null,max:null,maxLength:eW,media:null,method:null,min:null,minLength:eW,multiple:eY,muted:eY,name:null,nonce:null,noModule:eY,noValidate:eY,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:eY,optimum:eW,pattern:null,ping:eK,placeholder:null,playsInline:eY,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:eY,referrerPolicy:null,rel:eK,required:eY,reversed:eY,rows:eW,rowSpan:eW,sandbox:eK,scope:null,scoped:eY,seamless:eY,selected:eY,shadowRootClonable:eY,shadowRootDelegatesFocus:eY,shadowRootMode:null,shape:null,size:eW,sizes:null,slot:null,span:eW,spellCheck:eq,src:null,
1097srcDoc:null,srcLang:null,srcSet:null,start:eW,step:null,style:null,tabIndex:eW,target:null,title:null,translate:null,type:null,typeMustMatch:eY,useMap:null,value:eq,width:eW,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:eK,axis:null,background:null,bgColor:null,border:eW,borderColor:null,bottomMargin:eW,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:eY,declare:eY,event:null,face:null,frame:null,frameBorder:null,hSpace:eW,leftMargin:eW,link:null,longDesc:null,lowSrc:null,marginHeight:eW,marginWidth:eW,noResize:eY,noHref:eY,noShade:eY,noWrap:eY,object:null,profile:null,prompt:null,rev:null,rightMargin:eW,rules:null,scheme:null,scrolling:eq,standby:null,summary:null,text:null,topMargin:eW,valueType:null,version:null,vAlign:null,vLink:null,vSpace:eW,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:eY,disableRemotePlayback:eY,prefix:null,property:null,results:eW,security:null,unselectable:null},space:"html",transform:e4}),e5=e1({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
1097-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:eX,accentHeight:eW,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:eW,amplitude:eW,arabicForm:null,ascent:eW,attributeName:null,attributeType:null,azimuth:eW,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:eW,by:null,calcMode:null,capHeight:eW,className:eK,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:eW,diffuseConstant:eW,direction:null,display:null,dur:null,divisor:eW,dominantBaseline:null,download:eY,dx:null,dy:null,edgeMode:null,editable:null,elevation:eW,enableBackground:null,end:null,event:null,exponent:eW,externalResourcesRequired:null,fill:null,fillOpacity:eW,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:eZ,g2:eZ,glyphName:eZ,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:eW,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:eW,horizOriginX:eW,horizOriginY:eW,id:null,ideographic:eW,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:eW,k:eW,k1:eW,k2:eW,k3:eW,k4:eW,kernelMatrix:eX,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:eW,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:eW,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,on
1097Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:eW,overlineThickness:eW,paintOrder:null,panose1:null,path:null,pathLength:eW,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:eK,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:eW,pointsAtY:eW,pointsAtZ:eW,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:eX,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:eX,rev:eX,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:eX,requiredFeatures:eX,requiredFonts:eX,requiredFormats:eX,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:eW,specularExponent:eW,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:eW,strikethroughThickness:eW,string:null,stroke:null,strokeDashArray:eX,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:eW,strokeOpacity:eW,strokeWidth:null,style:null,surfaceScale:eW,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:eX,tabIndex:eW,tableValues:null,target:null,targetX:eW,targetY:eW,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:eX,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:eW,underlineThickness:eW,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:eW,values:null,vAlphabetic:eW,vMathematical:eW,vectorEffect:null,vHanging:eW,vIdeographic:eW,version:null,vertAdvY:eW,vertOriginX:eW,vertOriginY:eW,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:eW,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:e3}),e8=e1({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()}),e6=e1({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:e4}),e7=e1({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),te=eH([e2,e9,e8,e6,e7],"html"),tt=eH([e2,e5,e8,e6,e7],"svg"),tn=/[A-Z]/g,tr=/-[a-z]/g,ti=/^data[-\w.:]+$/i;function ta(e){return"-"+e.toLowerCase()}function to(e){return e.charAt(1).toUpperCase()}function ts(e,t){let n=e.indexOf("\r",t),r=e.indexOf("\n",t);return -1===r?n:-1===n||n+1===r?r:n<r?n:r}let tl={}.hasOwnProperty,tu=Object.prototype;function tc(e,t){let n;switch(t.nodeName){case"#comment":return n={type:"comment",value:t.data},th(e,t,n),n;case"#document":case"#document-fragment":{let r="mode"in t&&("quirks"===t.mode||"limited-quirks"===t.mode);if(n={type:"root",children:td(e,t.childNodes),data:{quirksMode:r}},e.file&&e.location){let t=String(e.file),r=function(e){let 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;){let e=n[n.length-1],r=ts(t,e),i=-1===r?t.length+1:r+1;if(e===i)break;n.push(i)}let 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 i=n[r];if(void 0===i){let e=ts(t,n[r-1]);i=-1===e?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}}}(t),i=r.toPoint(0),a=r.toPoint(t.length);(0,ej.ok)(i,"expected `start`"),(0,ej.ok)(a,"expected `end`"),n.position={start:i,end:a}}return n}case"#documentType":return th(e,t,n={type:"doctype"}),n;case"#text":return n={type:"text",value:t.value},th(e,t,n),n;
1097default:return function(e,t){let n=e.schema;e.schema=t.namespaceURI===em.svg?tt:te;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;tl.call(tu,n)||(i[n]=e.value)}let a=("svg"===e.schema.space?ef:ep)(t.tagName,i,td(e,t.childNodes));if(th(e,t,a),"template"===a.tagName){let n=t.sourceCodeLocation,r=n&&n.startTag&&tp(n.startTag),i=n&&n.endTag&&tp(n.endTag),o=tc(e,t.content);r&&i&&e.file&&(o.position={start:r.end,end:i.start}),a.content=o}return e.schema=n,a}(e,t)}}function td(e,t){let n=-1,r=[];for(;++n<t.length;){let i=tc(e,t[n]);r.push(i)}return r}function th(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){let r=function(e,t,n){let r=tp(n);if("element"===t.type){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r,i={};if(n.attrs)for(r in n.attrs)tl.call(n.attrs,r)&&(i[function(e,t){let n=e$(t),r=t,i=ez;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&ti.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(tr,to);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!tr.test(e)){let n=e.replace(tn,ta);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=e0}return new i(r,t)}(e.schema,r).property]=tp(n.attrs[r]));(0,ej.ok)(n.startTag,"a start tag should exist");let a=tp(n.startTag),o=n.endTag?tp(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=i,t.data={position:s}}}return r}(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function tp(e){let t=tf({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=tf({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function tf(e){return e.line&&e.column?e:void 0}class tm{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function tg(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new tm(n,r,t)}function tv(e){return e.toLowerCase()}tm.prototype.normal={},tm.prototype.property={},tm.prototype.space=void 0;class tb{constructor(e,t){this.attribute=t,this.property=e}}tb.prototype.attribute="",tb.prototype.booleanish=!1,tb.prototype.boolean=!1,tb.prototype.commaOrSpaceSeparated=!1,tb.prototype.commaSeparated=!1,tb.prototype.defined=!1,tb.prototype.mustUseProperty=!1,tb.prototype.number=!1,tb.prototype.overloadedBoolean=!1,tb.prototype.property="",tb.prototype.spaceSeparated=!1,tb.prototype.space=void 0;let ty=0,tE=tS(),tT=tS(),tk=tS(),t_=tS(),tA=tS(),tx=tS(),tw=tS();function tS(){return 2**++ty}let tC=Object.keys(T);class tI extends tb{constructor(e,t,n,r){let i=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++i<tC.length;){let e=tC[i];!function(e,t,n){n&&(e[t]=n)}(this,tC[i],(n&T[e])===T[e])}}}function tN(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new tI(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[tv(r)]=r,n[tv(a.attribute)]=r}return new tm(t,n,e.space)}tI.prototype.defined=!0;let tO=tN({properties:{ariaActiveDescendant:null,ariaAtomic:tT,ariaAutoComplete:null,ariaBusy:tT,ariaChecked:tT,ariaColCount:t_,ariaColIndex:t_,ariaColSpan:t_,ariaControls:tA,ariaCurrent:null,ariaDescribedBy:tA,ariaDetails:null,ariaDisabled:tT,ariaDropEffect:tA,ariaErrorMessage:null,ariaExpanded:tT,ariaFlowTo:tA,ariaGrabbed:tT,ariaHasPopup:null,ariaHidden:tT,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tA,ariaLevel:t_,ariaLive:null,ariaModal:tT,ariaMultiLine:tT,ariaMultiSelectable:tT,ariaOrientation:null,ariaOwns:tA,ariaPlaceholder:null,ariaPosInSet:t_,ariaPressed:tT,ariaReadOnly:tT,ariaRelevant:null,ariaRequired:tT,ariaRoleDescription:tA,ariaRowCount:t_,ariaRowIndex:t_,ariaRowSpan:t_,ariaSelected:tT,ariaSetSize:t_,ariaSort:null,ariaValueMax:t_,ariaValueMin:t_,ariaValueNow:t_,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function tR(e,t){return t in e?e[t]:t}function tD(e,t){return tR(e,t.toLowerCase())}let tL=tN({attributes:{acceptcharset:"accept-charset",classname:"
1097class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:tx,acceptCharset:tA,accessKey:tA,action:null,allow:null,allowFullScreen:tE,allowPaymentRequest:tE,allowUserMedia:tE,alt:null,as:null,async:tE,autoCapitalize:null,autoComplete:tA,autoFocus:tE,autoPlay:tE,blocking:tA,capture:null,charSet:null,checked:tE,cite:null,className:tA,cols:t_,colSpan:null,content:null,contentEditable:tT,controls:tE,controlsList:tA,coords:t_|tx,crossOrigin:null,data:null,dateTime:null,decoding:null,default:tE,defer:tE,dir:null,dirName:null,disabled:tE,download:tk,draggable:tT,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:tE,formTarget:null,headers:tA,height:t_,hidden:tk,high:t_,href:null,hrefLang:null,htmlFor:tA,httpEquiv:tA,id:null,imageSizes:null,imageSrcSet:null,inert:tE,inputMode:null,integrity:null,is:null,isMap:tE,itemId:null,itemProp:tA,itemRef:tA,itemScope:tE,itemType:tA,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:tE,low:t_,manifest:null,max:null,maxLength:t_,media:null,method:null,min:null,minLength:t_,multiple:tE,muted:tE,name:null,nonce:null,noModule:tE,noValidate:tE,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:tE,optimum:t_,pattern:null,ping:tA,placeholder:null,playsInline:tE,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:tE,referrerPolicy:null,rel:tA,required:tE,reversed:tE,rows:t_,rowSpan:t_,sandbox:tA,scope:null,scoped:tE,seamless:tE,selected:tE,shadowRootClonable:tE,shadowRootDelegatesFocus:tE,shadowRootMode:null,shape:null,size:t_,sizes:null,slot:null,span:t_,spellCheck:tT,src:null,
1097srcDoc:null,srcLang:null,srcSet:null,start:t_,step:null,style:null,tabIndex:t_,target:null,title:null,translate:null,type:null,typeMustMatch:tE,useMap:null,value:tT,width:t_,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tA,axis:null,background:null,bgColor:null,border:t_,borderColor:null,bottomMargin:t_,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:tE,declare:tE,event:null,face:null,frame:null,frameBorder:null,hSpace:t_,leftMargin:t_,link:null,longDesc:null,lowSrc:null,marginHeight:t_,marginWidth:t_,noResize:tE,noHref:tE,noShade:tE,noWrap:tE,object:null,profile:null,prompt:null,rev:null,rightMargin:t_,rules:null,scheme:null,scrolling:tT,standby:null,summary:null,text:null,topMargin:t_,valueType:null,version:null,vAlign:null,vLink:null,vSpace:t_,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:tE,disableRemotePlayback:tE,prefix:null,property:null,results:t_,security:null,unselectable:null},space:"html",transform:tD}),tP=tN({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
1097-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:tw,accentHeight:t_,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:t_,amplitude:t_,arabicForm:null,ascent:t_,attributeName:null,attributeType:null,azimuth:t_,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:t_,by:null,calcMode:null,capHeight:t_,className:tA,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:t_,diffuseConstant:t_,direction:null,display:null,dur:null,divisor:t_,dominantBaseline:null,download:tE,dx:null,dy:null,edgeMode:null,editable:null,elevation:t_,enableBackground:null,end:null,event:null,exponent:t_,externalResourcesRequired:null,fill:null,fillOpacity:t_,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:tx,g2
1097:tx,glyphName:tx,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:t_,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:t_,horizOriginX:t_,horizOriginY:t_,id:null,ideographic:t_,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:t_,k:t_,k1:t_,k2:t_,k3:t_,k4:t_,kernelMatrix:tw,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:t_,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:t_,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:t_,overlineThickness:t_,paintOrder:null,panose1:null,path:null,pathLength:t_,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tA,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:t_,pointsAtY:t_,pointsAtZ:t_,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tw,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tw,rev:tw,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tw,requiredFeatures:tw,requiredFonts:tw,requiredFormats:tw,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:t_,specularExponent:t_,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:t_,strikethroughThickness:t_,string:null,stroke:null,strokeDashArray:tw,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:t_,strokeOpacity:t_,strokeWidth:null,style:null,surfaceScale:t_,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tw,tabIndex:t_,tableValues:null,target:null,targetX:t_,targetY:t_,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tw,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:t_,underlineThickness:t_,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:t_,values:null,vAlphabetic:t_,vMathematical:t_,vectorEffect:null,vHanging:t_,vIdeographic:t_,version:null,vertAdvY:t_,vertOriginX:t_,vertOriginY:t_,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:t_,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:tR}),tM=tN({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>
1097"xlink:"+t.slice(5).toLowerCase()}),tF=tN({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:tD}),tB=tN({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),tj=tg([tO,tL,tM,tF,tB],"html"),tU=tg([tO,tP,tM,tF,tB],"svg"),tH=/[A-Z]/g,t$=/-[a-z]/g,tz=/^data[-\w.:]+$/i;function tG(e){return"-"+e.toLowerCase()}function tY(e){return e.charAt(1).toUpperCase()}var tq=n(75164);let tV={}.hasOwnProperty,tW=(0,tq.A)("type",{handlers:{root:function(e,t){let n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=tK(e.children,n,t),tZ(e,n),n},element:function(e,t){let n,r=t;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===t.space&&(r=tU);let i=[];if(e.properties){for(n in e.properties)if("children"!==n&&tV.call(e.properties,n)){let t=function(e,t,n){let r=function(e,t){let n=tv(t),r=t,i=tb;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&tz.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(t$,tY);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!t$.test(e)){let n=e.replace(tH,tG);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=tI}return new i(r,t)}(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?(0,er.A)(n):(0,ec.A)(n));let i={name:r.attribute,value:!0===n?"":String(n)};if(r.space&&"html"!==r.space&&"svg"!==r.space){let e=i.name.indexOf(":");e<0?i.prefix="":(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=em[r.space]}return i}(r,n,e.properties[n]);t&&i.push(t)}}let a=r.space;(0,ej.ok)(a);let o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:em[a],childNodes:[],parentNode:null};return o.childNodes=tK(e.children,o,r),tZ(e,o),"template"===e.tagName&&e.content&&(o.content=function(e,t){let n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=tK(e.children,n,t),tZ(e,n),n}(e.content,r)),o},text:function(e){let t={nodeName:"#text",value:e.value,parentNode:null};return tZ(e,t),t},comment:function(e){let t={nodeName:"#comment",data:e.value,parentNode:null};return tZ(e,t),t},doctype:function(e){let t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return tZ(e,t),t}}});function tK(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=tW(e[r],n);a.parentNode=t,i.push(a)}return i}function tZ(e,t){let n=e.position;n&&n.start&&n.end&&((0,ej.ok)("number"==typeof n.start.offset),(0,ej.ok)("number"==typeof 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})}var tX=n(87325);let tQ=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]);!function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"}(r||(r={}));let tJ={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function t0(e){return e>=55296&&e<=57343}function t1(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function t2(e){return e>=64976&&e<=65007||tQ.has(e)}!function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invali
1097dFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(i||(i={}));class t3{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){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_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){let t=this.html.charCodeAt(this.pos+1);if(t>=56320&&t<=57343)return this.pos++,this._addGap(),(e-55296)*1024+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,r.EOF;return this._err(i.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 t=0;t<e.length;t++)if((32|this.html.charCodeAt(this.pos+t))!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,r.EOF;let n=this.html.charCodeAt(t);
vendor: 7,404 bytes, line 1097
1097return n===r.CARRIAGE_RETURN?r.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,r.EOF;let e=this.html.charCodeAt(this.pos);return e===r.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,r.LINE_FEED):e===r.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,t0(e)&&(e=this._processSurrogate(e)),null===this.handler.onParseError||e>31&&e<127||e===r.LINE_FEED||e===r.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){t1(e)?this._err(i.controlCharacterInInputStream):t2(e)&&this._err(i.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}function t4(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}!function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"}(a||(a={}));let t9=new Uint16Array('ᵁ<\xd5ıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms\x7f\x84\x8b\x90\x95\x98\xa6\xb3\xb9\xc8\xcflig耻\xc6䃆P耻&䀦cute耻\xc1䃁reve;䄂Āiyx}rc耻\xc2䃂;䐐r;쀀\ud835\udd04rave耻\xc0䃀pha;䎑acr;䄀d;橓Āgp\x9d\xa1on;䄄f;쀀\ud835\udd38plyFunction;恡ing耻\xc5䃅Ācs\xbe\xc3r;쀀\ud835\udc9cign;扔ilde耻\xc3䃃ml耻\xc4䃄Ѐaceforsu\xe5\xfb\xfeėĜĢħĪĀcr\xea\xf2kslash;或Ŷ\xf6\xf8;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀\ud835\udd05pf;쀀\ud835\udd39eve;䋘c\xf2ēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻\xa9䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻\xc7䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷\xf2ſ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;쀀\ud835\udc9epĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀\ud835\udd07Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀\ud835\udd3bƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegra\xecȹoɴ͹\0\0ͻ\xbb͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔e\xe5ˊ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;쀀\ud835\udc9frok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻\xd0䃐cute耻\xc9䃉ƀaiyӒӗӜron;䄚rc耻\xca䃊;䐭ot;䄖r;쀀\ud835\udd08rave耻\xc8䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀\ud835\udd3csilon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻\xcb䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀\ud835\udd09lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀\ud835\udd3dAll;戀riertrf;愱c\xf2׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀\ud835\udd0a;拙pf;쀀\ud835\udd3eeater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀\ud835\udca2;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅ\xf2کrok;䄦mpńېۘownHum\xf0įqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻\xcd䃍Āiyܓܘrc耻\xce䃎;䐘ot;䄰r;愑rave耻\xcc䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lie\xf3ϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀\ud835\udd40a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻\xcf䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀\ud835\udd0dpf;쀀\ud835\udd41ǣ߇\0ߌr;쀀\ud835\udca5rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀\ud835\udd0epf;쀀\ud835\udd42cr;쀀\ud835\udca6ր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\xe1Μs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀\ud835\udd0fĀ;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊight\xe1οight\xe1ϊf;쀀\ud835\udd43erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂ\xf2ࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀\ud835\udd10nusPlus;戓pf;쀀\ud835\udd44c\xf2੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘\xeb૙eryThi\xee૙tedĀGL૸ଆreaterGreate\xf2ٳessLes\xf3ੈLine;䀊r;쀀\ud835\udd11ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀\ud835\udca9ilde耻\xd1䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻\xd3䃓Āiy෎ීrc耻\xd4䃔;䐞blac;䅐r;쀀\ud835\udd12rave耻\xd2䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀\ud835\udd46enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀\ud835\udcaaash耻\xd8䃘iŬื฼de耻\xd5䃕es;樷ml耻\xd6䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;
1097揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀\ud835\udd13i;䎦;䎠usMinus;䂱Āipຢອncareplan\xe5ڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀\ud835\udcab;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀\ud835\udd14pf;愚cr;쀀\ud835\udcac؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻\xae䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r\xbbཹ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;쀀\ud835\udd16ortȀDLRUᄪᄴᄾᅉownArrow\xbbОeftArrow\xbb࢚ightArrow\xbb࿝pArrow;憑gma;䎣allCircle;战pf;쀀\ud835\udd4aɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀\ud835\udcaear;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Th\xe1ྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et\xbbሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻\xde䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀\ud835\udd17Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀\ud835\udd4bipleDot;惛Āctዖዛr;쀀\ud835\udcafrok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻\xda䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻\xdb䃛;䐣blac;䅰r;쀀\ud835\udd18rave耻\xd9䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀\ud835\udd4cЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥own\xe1ϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀\ud835\udcb0ilde;䅨ml耻\xdc䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀\ud835\udd19pf;쀀\ud835\udd4dcr;쀀\ud835\udcb1dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀\ud835\udd1apf;쀀\ud835\udd4ecr;쀀\ud835\udcb2Ȁfiosᓋᓐᓒᓘr;쀀\ud835\udd1b;䎞pf;쀀\ud835\udd4fcr;쀀\ud835\udcb3ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻\xdd䃝Āiyᔉᔍrc;䅶;䐫r;쀀\ud835\udd1cpf;쀀\ud835\udd50cr;쀀\ud835\udcb4ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidt\xe8૙a;䎖r;愨pf;愤cr;쀀\ud835\udcb5௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻\xe1䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻\xe2䃢te肻\xb4̆;䐰lig耻\xe6䃦Ā;r\xb2ᖺ;쀀\ud835\udd1erave耻\xe0䃠ĀepᗊᗖĀfpᗏᗔsym;愵\xe8ᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e\xbbᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢\xbb\xb9arr;捼Āgpᙣᙧon;䄅f;쀀\ud835\udd52΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒ\xf1ᚃing耻\xe5䃥ƀctyᚡᚦᚨr;쀀\ud835\udcb6;䀪mpĀ;e዁ᚯ\xf1ʈilde耻\xe3䃣ml耻\xe4䃤Āciᛂᛈonin\xf4ɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e\xbbᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰s\xe9ᜌno\xf5ēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀\ud835\udd1fg΀costuvwឍឝឳេ៕៛៞ƀaiuបពរ\xf0ݠrc;旯p\xbb፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄e\xe5ᑄ\xe5ᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀\ud835\udd53Ā;tᏋᡣom\xbbᏌtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻\xa6䂦Ȁceioᥑᥖᥚᥠr;쀀\ud835\udcb7mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t\xbb᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁\xeeړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;
1097䄍dil耻\xe7䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻\xb8ƭptyv;榲t脀\xa2;eᨭᨮ䂢r\xe4Ʋr;쀀\ud835\udd20ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark\xbbᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟\xbbཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it\xbb᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;q\xc7\xc6ɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁\xeeᅠeĀmx᫱᫶ent\xbb᫩e\xf3ɍǧ᫾\0ᬇĀ;dኻᬂot;橭n\xf4Ɇƀfryᬐᬔᬗ;쀀\ud835\udd54o\xe4ɔ脀\xa9;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀\ud835\udcb8Ā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\xe3᭳u\xe3᭵ee;拎edge;拏en耻\xa4䂤earrowĀlrᯮ᯳eft\xbbᮀight\xbbᮽe\xe4ᯝĀciᰁᰇonin\xf4Ƿnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍r\xf2΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸\xf2ᄳhĀ;vᱚᱛ怐\xbbऊūᱡᱧarow;椏a\xe3̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻\xb0䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀\ud835\udd21arĀlrᲳᲵ\xbbࣜ\xbbသʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀\xf7;o᳧ᳰntimes;拇n\xf8᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀\ud835\udd55ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedg\xe5\xfanƀadhᄮᵝᵧownarrow\xf3ᲃarpoonĀlrᵲᵶef\xf4Ჴigh\xf4ᲶŢᵿᶅkaro\xf7གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀\ud835\udcb9;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃r\xf2Щa\xf2ྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴo\xf4ᲉĀcsḎḔute耻\xe9䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻\xea䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀\ud835\udd22ƀ;rsṐṑṗ檚ave耻\xe8䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et\xbbẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀\ud835\udd56ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on\xbbớ;䏵ȀcsuvỪỳἋἣĀioữḱrc\xbbḮɩỹ\0\0ỻ\xedՈantĀglἂἆtr\xbbṝess\xbbṺƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯o\xf4͒ĀahὉὋ;䎷耻\xf0䃰Āmrὓὗl耻\xeb䃫o;悬ƀcipὡὤὧl;䀡s\xf4ծĀeoὬὴctatio\xeeՙnential\xe5չৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotse\xf1Ṅy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀\ud835\udd23lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀\ud835\udd57ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻\xbd䂽;慓耻\xbc䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻\xbe䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀\ud835\udcbbࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lan\xf4٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀\ud835\udd24Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox\xbbℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀\ud835\udd58Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎pro\xf8₞r;楸qĀlqؿ↖les\xf3₈i\xed٫Āen↣↭rtneqq;쀀≩︀\xc5↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽r\xf2ΠȀilmr⇐⇔⇗⇛rs\xf0ᒄf\xbb․il\xf4کĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it\xbb∊lip;怦con;抹r;쀀\ud835\udd25sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀\ud835\udd59bar;怕ƀclt≯≴≸r;쀀\ud835\udcbdas\xe8⇴rok;䄧Ābp⊂⊇ull;恃hen\xbbᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻\xed䃭ƀ;
1097iyݱ⊰⊵rc耻\xee䃮;䐸Ācx⊼⊿y;䐵cl耻\xa1䂡ĀfrΟ⋉;쀀\ud835\udd26rave耻\xec䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓in\xe5ގar\xf4ܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝do\xf4⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙er\xf3ᕣ\xe3⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀\ud835\udd5aa;䎹uest耻\xbf䂿Āci⎊⎏r;쀀\ud835\udcbenʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻\xef䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀\ud835\udd27ath;䈷pf;쀀\ud835\udd5bǣ⏬\0⏱r;쀀\ud835\udcbfrcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀\ud835\udd28reen;䄸cy;䑅cy;䑜pf;쀀\ud835\udd5ccr;쀀\ud835\udcc0஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼r\xf2৆\xf2Εail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴ra\xeeࡌbda;䎻gƀ;dlࢎⓁⓃ;榑\xe5ࢎ;檅uo耻\xab䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝\xeb≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼\xecࢰ\xe2┩;
1097䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□a\xe9⓶arpoonĀdu▯▴own\xbbњp\xbb०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoon\xf3྘quigarro\xf7⇰hreetimes;拋ƀ;qs▋ও◺lan\xf4বʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋ppro\xf8Ⓠot;拖qĀgq♃♅\xf4উgt\xf2⒌\xf4ছi\xedলƀilr♕࣡♚sht;楼;쀀\ud835\udd29Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖r\xf2◁orne\xf2ᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che\xbb⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox\xbb⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽r\xebࣁgƀlmr⛿✍✔eftĀar০✇ight\xe1৲apsto;柼ight\xe1৽parrowĀlr✥✩ef\xf4⓭ight;憬ƀafl✶✹✽r;榅;쀀\ud835\udd5dus;樭imes;樴š❋❏st;戗\xe1ፎƀ;ef❗❘᠀旊nge\xbb❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇r\xf2ࢨorne\xf2ᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀\ud835\udcc1mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹re\xe5◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀\xc5⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻\xaf䂯Āet⡗⡙;時Ā;e⡞⡟朠se\xbb⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻ow\xeeҌef\xf4ए\xf0Ꮡker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle\xbbᘦr;쀀\ud835\udd2ao;愧ƀcdn⢯⢴⣉ro耻\xb5䂵Ȁ;acdᑤ⢽⣀⣄s\xf4ᚧir;櫰ot肻\xb7Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛\xf2−\xf0ઁĀdp⣩⣮els;抧f;쀀\ud835\udd5eĀct⣸⣽r;쀀\ud835\udcc2pos\xbbᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la\xbb˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉ro\xf8඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xa0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸ui\xf6ୣĀei⩊⩎ar;椨\xed஘istĀ;s஠டr;쀀\ud835\udd2bȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lan\xf4௢i\xed௪Ā;rஶ⪁\xbbஷƀAap⪊⪍⪑r\xf2⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹r\xf2⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro\xf7⫁ightarro\xf7⪐ƀ;qs఻⪺⫪lan\xf4ౕĀ;sౕ⫴\xbbశi\xedౝĀ;rవ⫾iĀ;eచథi\xe4ඐĀpt⬌⬑f;쀀\ud835\udd5f膀\xac;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lle\xec୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳u\xe5ಥĀ;cಘ⭸Ā;eಒ⭽\xf1ಘȀAait⮈⮋⮝⮧r\xf2⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow\xbb⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉u\xe5൅;쀀\ud835\udcc3ortɭ⬅\0\0⯖ar\xe1⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭\xe5೸\xe5ഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗ\xf1സȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇ\xecௗlde耻\xf1䃱\xe7ృiangleĀlrⱒⱜeftĀ;eచⱚ\xf1దightĀ;eೋⱥ\xf1೗Ā;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耻\xf3䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻\xf4䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀\ud835\udd2cͯ⵹\0\0⵼\0ⶂn;䋛ave耻\xf2䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨr\xf2᪀Āir⶝ⶠr;榾oss;榻n\xe5๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀\ud835\udd60ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨r\xf2᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f\xbbⷿ耻\xaa䂪耻\xba䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧\xf2⸁ash耻\xf8䃸l;折iŬⸯ⸴de耻\xf5䃵esĀ;aǛ⸺s;樶ml耻\xf6䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;
1097astЃ⹧⹲຅脀\xb6;l⹭⹮䂶le\xecЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀\ud835\udd2dƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕ma\xf4੶ne;明ƀ;tv⺿⻀⻈䏀chfork\xbb´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎\xf6⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻\xb1ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀\ud835\udd61nd耻\xa3䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷u\xe5໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾ppro\xf8⽃urlye\xf1໙\xf1໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨i\xedໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺\xf0⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴\xef໻rel;抰Āci⿀⿅r;쀀\ud835\udcc5;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀\ud835\udd2epf;쀀\ud835\udd62rime;恗cr;쀀\ud835\udcc6ƀaeo⿸〉〓tĀei⿾々rnion\xf3ڰnt;樖stĀ;e【】䀿\xf1Ἑ\xf4༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがr\xf2Ⴓ\xf2ϝail;検ar\xf2ᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕i\xe3ᅮmptyv;榳gȀ;del࿑らるろ;榒;榥\xe5࿑uo耻\xbb䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞\xeb≝\xf0✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶al\xf3༞ƀabrョリヮr\xf2៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗\xec࿲\xe2ヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜn\xe5Ⴛar\xf4ྩt;断ƀilrㅩဣㅮsht;楽;쀀\ud835\udd2fĀaoㅷㆆrĀduㅽㅿ\xbbѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭa\xe9トarpoonĀduㆻㆿow\xeeㅾp\xbb႒eftĀah㇊㇐rrow\xf3࿪arpoon\xf3Ցightarrows;應quigarro\xf7ニhreetimes;拌g;䋚ingdotse\xf1ἲƀahm㈍㈐㈓r\xf2࿪a\xf2Ց;怏oustĀ;a㈞㈟掱che\xbb㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾r\xebဃƀafl㉇㉊㉎r;榆;쀀\ud835\udd63us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒ar\xf2㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀\ud835\udcc7Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠re\xe5ㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛qu\xef➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡u\xe5ᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓i\xedሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒\xeb∨Ā;oਸ਼਴t耻\xa7䂧i;䀻war;椩mĀin㍩\xf0nu\xf3\xf1t;朶rĀ;o㍶⁕쀀\ud835\udd30Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜i\xe4ᑤara\xec⹯耻\xad䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲ar\xf2ᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetm\xe9㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀\ud835\udd64aĀdr㑍ЂesĀ;u㑔㑕晠it\xbb㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍\xf1ᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝\xf1ᆮƀ;afᅻ㒦ְrť㒫ֱ\xbbᅼar\xf2ᅈȀcemt㒹㒾㓂㓅r;쀀\ud835\udcc8tm\xee\xf1i\xec㐕ar\xe6ᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psilo\xeeỠh\xe9⺯s\xbb⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦ppro\xf8㋺urlye\xf1ᇾ\xf1ᇳƀaes㖂㖈㌛ppro\xf8㌚q\xf1㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻\xb9䂹耻\xb2䂲耻\xb3䂳;櫆Ā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㘦㘨\xeb∮Ā;oਫ਩war;椪lig耻\xdf䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄r\xeb๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀\ud835\udd31Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮ppro\xf8዁im\xbbኬs\xf0ኞĀas㚺㚮\xf0዁rn耻\xfe䃾Ǭ̟㛆⋧es膀\xd7;bd㛏㛐㛘䃗Ā;
1097aᤏ㛕r;樱;樰ƀeps㛡㛣㜀\xe1⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀\ud835\udd65rk;櫚\xe1㍢rime;怴ƀaip㜏㜒㝤d\xe5ቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own\xbbᶻeftĀ;e⠀㜾\xf1म;扜ightĀ;e㊪㝋\xf1ၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀\ud835\udcc9;䑆cy;䑛rok;䅧Āio㞋㞎x\xf4᝷headĀlr㞗㞠eftarro\xf7ࡏightarrow\xbbཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶r\xf2ϭar;楣Ācr㟜㟢ute耻\xfa䃺\xf2ᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻\xfb䃻;䑃ƀabh㠃㠆㠋r\xf2Ꭽlac;䅱a\xf2ᏃĀir㠓㠘sht;楾;쀀\ud835\udd32rave耻\xf9䃹š㠧㠱rĀlr㠬㠮\xbbॗ\xbbႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r\xbb㡆op;挏ri;旸Āal㡖㡚cr;䅫肻\xa8͉Āgp㡢㡦on;䅳f;쀀\ud835\udd66̀adhlsuᅋ㡸㡽፲㢑㢠own\xe1ᎳarpoonĀlr㢈㢌ef\xf4㠭igh\xf4㠯iƀ;hl㢙㢚㢜䏅\xbbᏺon\xbb㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r\xbb㢽op;挎ng;䅯ri;旹cr;쀀\ud835\udccaƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨\xbb᠓Āam㣯㣲r\xf2㢨l耻\xfc䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠r\xf2ϷarĀ;v㤦㤧櫨;櫩as\xe8ϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖app\xe1␕othin\xe7ẖƀhir㓫⻈㥙op\xf4⾵Ā;hᎷ㥢\xefㆍĀiu㥩㥭gm\xe1㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟et\xe1㚜iangleĀlr㦪㦯eft\xbbथight\xbbၑy;䐲ash\xbbံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨa\xf2ᑩr;쀀\ud835\udd33tr\xe9㦮suĀbp㧯㧱\xbbജ\xbb൙pf;쀀\ud835\udd67ro\xf0໻tr\xe9㦴Ācu㨆㨋r;쀀\ud835\udccbĀbp㨐㨘nĀEe㦀㨖\xbb㥾nĀEe㦒㨞\xbb㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀\ud835\udd34pf;쀀\ud835\udd68Ā;eᑹ㩦at\xe8ᑹcr;쀀\ud835\udcccૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tr\xe9៑r;쀀\ud835\udd35ĀAa㪔㪗r\xf2σr\xf2৶;䎾ĀAa㪡㪤r\xf2θr\xf2৫a\xf0✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀\ud835\udd69im\xe5ឲĀAa㫇㫊r\xf2ώr\xf2ਁĀcq㫒ីr;쀀\ud835\udccdĀpt៖㫜r\xe9។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻\xfd䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻\xa5䂥r;쀀\ud835\udd36cy;䑗pf;쀀\ud835\udd6acr;쀀\ud835\udcceĀcm㬦㬩y;䑎l耻\xff䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡tr\xe6ᕟa;䎶r;쀀\ud835\udd37cy;䐶grarr;懝pf;쀀\ud835\udd6bcr;쀀\ud835\udccfĀjn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),t5=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function t8(e){return e>=o.ZERO&&e<=o.NINE}String.fromCodePoint,!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(o||(o={})),!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(s||(s={})),!function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(l||(l={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(u||(u={}));class t6{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=l.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=u.Strict}startEntity(e){this.decodeMode=e,this.state=l.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case l.EntityStart:if(e.charCodeAt(t)===o.NUM)return this.state=l.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1);return this.state=l.NamedEntity,this.stateNamedEntity(e,t);case l.NumericStart:return this.stateNumericStart(e,t);case l.NumericDecimal:return this.stateNumericDecimal(e,t);case l.NumericHex:return this.stateNumericHex(e,t);case l.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===o.LOWER_X?(this.state=l.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=l.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*Math.pow(r,i)+Number.parseInt(e.substr(t,
1097i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){var r;let i=e.charCodeAt(t);if(!t8(i)&&(!((r=i)>=o.UPPER_A)||!(r<=o.UPPER_F))&&(!(r>=o.LOWER_A)||!(r<=o.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(!t8(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,r,i;if(this.consumed<=t)return null==(n=this.errors)||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===o.SEMI)this.consumed+=1;else if(this.decodeMode===u.Strict)return 0;return this.emitCodePoint((r=this.result)>=55296&&r<=57343||r>1114111?65533:null!=(i=t5.get(r))?i:r,this.consumed),this.errors&&(e!==o.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&s.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=function(e,t,n,r){let i=(t&s.BRANCH_LENGTH)>>7,a=t&s.JUMP_TABLE;if(0===i)return 0!==a&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,l=o+i-1;for(;o<=l;){let t=o+l>>>1,n=e[t];if(n<r)o=t+1;else{if(!(n>r))return e[t+i];l=t-1}}return -1}(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return 0===this.result||this.decodeMode===u.Attribute&&(0===i||function(e){var t;return e===o.EQUALS||(t=e)>=o.UPPER_A&&t<=o.UPPER_Z||t>=o.LOWER_A&&t<=o.LOWER_Z||t8(t)}(a))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((r=n[this.treeIndex])&s.VALUE_LENGTH)>>14)){if(a===o.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==u.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return -1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&s.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null==(e=this.errors)||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~s.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case l.NamedEntity:return 0!==this.result&&(this.decodeMode!==u.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case l.NumericDecimal:return this.emitNumericEntity(0,2);case l.NumericHex:return this.emitNumericEntity(0,3);case l.NumericStart:return null==(e=this.errors)||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case l.EntityStart:return 0}}}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"}(c||(c={})),function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"}(d||(d={})),function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"}(h||(h={})),function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="str
1097ike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"}(p||(p={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"}(f||(f={}));let t7=new Map([[p.A,f.A],[p.ADDRESS,f.ADDRESS],[p.ANNOTATION_XML,f.ANNOTATION_XML],[p.APPLET,f.APPLET],[p.AREA,f.AREA],[p.ARTICLE,f.ARTICLE],[p.ASIDE,f.ASIDE],[p.B,f.B],[p.BASE,f.BASE],[p.BASEFONT,f.BASEFONT],[p.BGSOUND,f.BGSOUND],[p.BIG,f.BIG],[p.BLOCKQUOTE,f.BLOCKQUOTE],[p.BODY,f.BODY],[p.BR,f.BR],[p.BUTTON,f.BUTTON],[p.CAPTION,f.CAPTION],[p.CENTER,f.CENTER],[p.CODE,f.CODE],[p.COL,f.COL],[p.COLGROUP,f.COLGROUP],[p.DD,f.DD],[p.DESC,f.DESC],[p.DETAILS,f.DETAILS],[p.DIALOG,f.DIALOG],[p.DIR,f.DIR],[p.DIV,f.DIV],[p.DL,f.DL],[p.DT,f.DT],[p.EM,f.EM],[p.EMBED,f.EMBED],[p.FIELDSET,f.FIELDSET],[p.FIGCAPTION,f.FIGCAPTION],[p.FIGURE,f.FIGURE],[p.FONT,f.FONT],[p.FOOTER,f.FOOTER],[p.FOREIGN_OBJECT,f.FOREIGN_OBJECT],[p.FORM,f.FORM],[p.FRAME,f.FRAME],[p.FRAMESET,f.FRAMESET],[p.H1,f.H1],[p.H2,f.H2],[p.H3,f.H3],[p.H4,f.H4],[p.H5,f.H5],[p.H6,f.H6],[p.HEAD,f.HEAD],[p.HEADER,f.HEADER],[p.HGROUP,f.HGROUP],[p.HR,f.HR],[p.HTML,f.HTML],[p.I,f.I],[p.IMG,f.IMG],[p.IMAGE,f.IMAGE],[p.INPUT,f.INPUT],[p.IFRAME,f.IFRAME],[p.KEYGEN,f.KEYGEN],[p.LABEL,f.LABEL],[p.LI,f.LI],[p.LINK,f.LINK],[p.LISTING,f.LISTING],[p.MAIN,f.MAIN],[p.MALIGNMARK,f.MALIGNMARK],[p.MARQUEE,f.MARQUEE],[p.MATH,f.MATH],[p.MENU,f.MENU],[p.META,f.META],[p.MGLYPH,f.MGLYPH],[p.MI,f.MI],[p.MO,f.MO],[p.MN,f.MN],[p.MS,f.MS],[p.MTEXT,f.MTEXT],[p.NAV,f.NAV],[p.NOBR,f.NOBR],[p.NOFRAMES,f.NOFRAMES],[p.NOEMBED,f.NOEMBED],[p.NOSCRIPT,f.NOSCRIPT],[p.OBJ
1097ECT,f.OBJECT],[p.OL,f.OL],[p.OPTGROUP,f.OPTGROUP],[p.OPTION,f.OPTION],[p.P,f.P],[p.PARAM,f.PARAM],[p.PLAINTEXT,f.PLAINTEXT],[p.PRE,f.PRE],[p.RB,f.RB],[p.RP,f.RP],[p.RT,f.RT],[p.RTC,f.RTC],[p.RUBY,f.RUBY],[p.S,f.S],[p.SCRIPT,f.SCRIPT],[p.SEARCH,f.SEARCH],[p.SECTION,f.SECTION],[p.SELECT,f.SELECT],[p.SOURCE,f.SOURCE],[p.SMALL,f.SMALL],[p.SPAN,f.SPAN],[p.STRIKE,f.STRIKE],[p.STRONG,f.STRONG],[p.STYLE,f.STYLE],[p.SUB,f.SUB],[p.SUMMARY,f.SUMMARY],[p.SUP,f.SUP],[p.TABLE,f.TABLE],[p.TBODY,f.TBODY],[p.TEMPLATE,f.TEMPLATE],[p.TEXTAREA,f.TEXTAREA],[p.TFOOT,f.TFOOT],[p.TD,f.TD],[p.TH,f.TH],[p.THEAD,f.THEAD],[p.TITLE,f.TITLE],[p.TR,f.TR],[p.TRACK,f.TRACK],[p.TT,f.TT],[p.U,f.U],[p.UL,f.UL],[p.SVG,f.SVG],[p.VAR,f.VAR],[p.WBR,f.WBR],[p.XMP,f.XMP]]);function ne(e){var t;return null!=(t=t7.get(e))?t:f.UNKNOWN}let nt=f,nn={[c.HTML]:new Set([nt.ADDRESS,nt.APPLET,nt.AREA,nt.ARTICLE,nt.ASIDE,nt.BASE,nt.BASEFONT,nt.BGSOUND,nt.BLOCKQUOTE,nt.BODY,nt.BR,nt.BUTTON,nt.CAPTION,nt.CENTER,nt.COL,nt.COLGROUP,nt.DD,nt.DETAILS,nt.DIR,nt.DIV,nt.DL,nt.DT,nt.EMBED,nt.FIELDSET,nt.FIGCAPTION,nt.FIGURE,nt.FOOTER,nt.FORM,nt.FRAME,nt.FRAMESET,nt.H1,nt.H2,nt.H3,nt.H4,nt.H5,nt.H6,nt.HEAD,nt.HEADER,nt.HGROUP,nt.HR,nt.HTML,nt.IFRAME,nt.IMG,nt.INPUT,nt.LI,nt.LINK,nt.LISTING,nt.MAIN,nt.MARQUEE,nt.MENU,nt.META,nt.NAV,nt.NOEMBED,nt.NOFRAMES,nt.NOSCRIPT,nt.OBJECT,nt.OL,nt.P,nt.PARAM,nt.PLAINTEXT,nt.PRE,nt.SCRIPT,nt.SECTION,nt.SELECT,nt.SOURCE,nt.STYLE,nt.SUMMARY,nt.TABLE,nt.TBODY,nt.TD,nt.TEMPLATE,nt.TEXTAREA,nt.TFOOT,nt.TH,nt.THEAD,nt.TITLE,nt.TR,nt.TRACK,nt.UL,nt.WBR,nt.XMP]),[c.MATHML]:new Set([nt.MI,nt.MO,nt.MN,nt.MS,nt.MTEXT,nt.ANNOTATION_XML]),[c.SVG]:new Set([nt.TITLE,nt.FOREIGN_OBJECT,nt.DESC]),[c.XLINK]:new Set,[c.XML]:new Set,[c.XMLNS]:new Set},nr=new Set([nt.H1,nt.H2,nt.H3,nt.H4,nt.H5,nt.H6]);p.STYLE,p.SCRIPT,p.XMP,p.IFRAME,p.NOEMBED,p.NOFRAMES,p.PLAINTEXT,function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"}(m||(m={}));let ni={DATA:m.DATA,RCDATA:m.RCDATA,RAWTEXT:m.RAWTEXT,SCRIPT_DATA:m.SCRIPT_DATA,PLAINTEXT:m.PLAINTEXT,CDATA_SECTION:m.CDATA_SECTION};function na(e){return e>=r.LATIN_CAPITAL_A&&e<=r.LATIN_CAPITAL_Z}function no(e){return e>=r.LATIN_SMALL_A&&e<=r.LATIN_SMALL_Z||na(e)}function ns(e){return no(e)||e>=r.DIGIT_0&&e<=r.DIGIT_9}function nl(e){return e===r.SPACE||e===r.LINE_FEED||e===r.TABULATION||e===r.FORM_FEED}function nu(e){return nl(e)||e===r.SOLIDUS||e===r.GREATER_THAN_SIGN}class nc{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=m.DATA,this.returnState=m.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new t3(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new t6(t9,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(i.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(i.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=function(e){if(e===r.NULL)return i.nullCharacterReference;if(e>1114111)return i.characterReferenceOutsideUnicodeRange;if(t0(e))return i.surrogateCharacterReference;if(t2(e))return i.noncharacterCharacterReference;
1097if(t1(e)||e===r.CARRIAGE_RETURN)return i.controlCharacterReference;return null}(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;null==(r=(n=this.handler).onParseError)||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;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw 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:a.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:a.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:a.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:a.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;let n=this.currentToken;null===t4(n,this.currentAttr.name)?(n.attrs.push(this.currentAttr),n.location&&this.currentLocation&&((null!=(e=(t=n.location).attrs)?e:t.attrs=Object.create(null))[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue())):this._err(i.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(){let e=this.currentToken;this.prepareToken(e),e.tagID=ne(e.tagName),e.type===a.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(i.endTagWithAttributes),e.selfClosing&&this._err(i.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 a.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case a.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case a.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:a.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=nl(e)?a.WHITESPACE_CHARACTER:e===r.NULL?a.NULL_CHARACTER:a.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(a.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=m.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?u.Attribute:u.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===m.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===m.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===m.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case m.DATA:this._stateData(e);break;case m.RCDATA:this._stateRcdata(e);break;case m.RAWTEXT:this._stateRawtext(e);break;case m.SCRIPT_DATA:this._stateScriptData(e);break;case m.PLAINTEXT:this._statePlaintext(e);break;case m.TAG_OPEN:this._stateTagOpen(e);break;case m.END_TAG_OPEN:this._stateEndTagOpen(e);break;case m.TAG_NAME:this._stateTagName(e);break;case m.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case m.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case m.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case m.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case m.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case m.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case m.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case m.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case m.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case m.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case m.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case m.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case m.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case m.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case m.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case m.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case m.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case m.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscape
vendor: 27,030 bytes, line 1097
1097Start(e);break;case m.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case m.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case m.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case m.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case m.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case m.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case m.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case m.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case m.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case m.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case m.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case m.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case m.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case m.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case m.BOGUS_COMMENT:this._stateBogusComment(e);break;case m.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case m.COMMENT_START:this._stateCommentStart(e);break;case m.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case m.COMMENT:this._stateComment(e);break;case m.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case m.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case m.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case m.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case m.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case m.COMMENT_END:this._stateCommentEnd(e);break;case m.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case m.DOCTYPE:this._stateDoctype(e);break;case m.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case m.DOCTYPE_NAME:this._stateDoctypeName(e);break;case m.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case m.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case m.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case m.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case m.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case m.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case m.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case m.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case m.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case m.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case m.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case m.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case m.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case m.CDATA_SECTION:this._stateCdataSection(e);break;case m.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case m.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case m.CHARACTER_REFERENCE:this._stateCharacterReference();break;case m.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error("Unknown state")}}_stateData(e){switch(e){case r.LESS_THAN_SIGN:this.state=m.TAG_OPEN;break;case r.AMPERSAND:this._startCharacterReference();break;case r.NULL:this._err(i.unexpectedNullCharacter),this._emitCodePoint(e);break;case r.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case r.AMPERSAND:this._startCharacterReference();break;case r.LESS_THAN_SIGN:this.state=m.RCDATA_LESS_THAN_SIGN;break;case r.NULL:this._err(i.unexpectedNullCharacter),this._emitChars("�");break;case r.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case r.LESS_THAN_SIGN:this.state=m.RAWTEXT_LESS_THAN_SIGN;break;case r.NULL:this._err(i.unexpectedNullCharacter),this._emitChars("�");break;case r.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case r.LESS_THAN_SIGN:this.state=m.SCRIPT_DATA_LESS_THAN_SIGN;break;case r.NULL:this._err(i.unexpectedNullCharacter),this._emitChars("�");break;case r.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case r.NULL:this._err(i.unexpectedNullCharacter),this._emitChars("�");break;case r.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(no(e))this._createStartTagToken(),this.state=m.TAG_NAME,this._stateTagName(e);else switch(e){case r.EXCLAMATION_MARK:this.state=m.MARKUP_DECLARATION_OPEN;break;case r.SOLIDUS:this.state=m.END_TAG_OPEN;break;case r.QUESTION_MARK:this._err(i.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=m.BOGUS_COMMENT,this._stateBogusComment(e);break;case r.EOF:this._err(i.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(i.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=m.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(no(e))this._createEndTagToken(),this.state=m.TAG_NAME,this._stateTagName(e);else switch(e){case r.GREATER_THAN_SIGN:this._err(i.missingEndTagName),this.state=m.DATA;break;case r.EOF:this._err(i.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break;default:this._err(i.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=m.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:this.state=m.BEFORE_ATTRIBUTE_NAME;break;case r.SOLIDUS:this.state=m.SELF_CLOSING_START_TAG;break;case r.GREATER_THAN_SIGN:this.state=m.DATA,this.emitCurrentTagToken();break;case r.NULL:this._err(i.unexpectedNullCharacter),t.tagName+="�";break;case r.EOF:this._err(i.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(na(e)?e+32:e)}}_stateRcdataLessThanSign(e){e===r.SOLIDUS?this.state=m.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=m.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){no(e)?(this.state=m.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=m.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();switch(this._createEndTagToken(),this.currentToken.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=m.BEFORE_ATTRIBUTE_NAME,!1;case r.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=m.SELF_CLOSING_START_TAG,!1;case r.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=m.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=m.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===r.SOLIDUS?this.state=m.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=m.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){no(e)?(this.state=m.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=m.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=m.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case r.SOLIDUS:this.state=m.SCRIPT_DATA_END_TAG_OPEN;break;case r.EXCLAMATION_MARK:this.state=m.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break;default:this._emitChars("<"),this.state=m.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){no(e)?(this.state=m.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=m.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=m.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===r.HYPHEN_MINUS?(this.state=m.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=m.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===r.HYPHEN_MINUS?(this.state=m.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=m.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case r.HYPHEN_MINUS:this.state=m.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break;case r.LESS_THAN_SIGN:this.state=m.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case r.NULL:this._err(i.unexpectedNullCharacter),this._emitChars("�");break;case r.EOF:this._err(i.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case r.HYPHEN_MINUS:this.state=m.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break;case r.LESS_THAN_SIGN:this.state=m.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case r.NULL:this._err(i.unexpectedNullCharacter),this.state=m.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case r.EOF:this._err(i.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=m.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case r.HYPHEN_MINUS:this._emitChars("-");break;case r.LESS_THAN_SIGN:this.state=m.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case r.GREATER_THAN_SIGN:this.state=m.SCRIPT_DATA,this._emitChars(">");break;case r.NULL:this._err(i.unexpectedNullCharacter),this.state=m.SCRIPT_DATA_ESCAPED,this._emitChars("�");break;case r.EOF:this._err(i.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=m.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===r.SOLIDUS?this.state=m.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:no(e)?(this._emitChars("<"),this.state=m.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=m.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){no(e)?(this.state=m.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=m.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=m.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(tJ.SCRIPT,!1)&&nu(this.preprocessor.peek(tJ.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<tJ.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=m.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case r.HYPHEN_MINUS:this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break;case r.LESS_THAN_SIGN:this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case r.NULL:this._err(i.unexpectedNullCharacter),this._emitChars("�");break;case r.EOF:this._err(i.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case r.HYPHEN_MINUS:this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break;case r.LESS_THAN_SIGN:this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case r.NULL:this._err(i.unexpectedNullCharacter),this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case r.EOF:this._err(i.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case r.HYPHEN_MINUS:this._emitChars("-");break;case r.LESS_THAN_SIGN:this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break;case r.GREATER_THAN_SIGN:this.state=m.SCRIPT_DATA,this._emitChars(">");break;case r.NULL:this._err(i.unexpectedNullCharacter),this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars("�");break;case r.EOF:this._err(i.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===r.SOLIDUS?(this.state=m.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(tJ.SCRIPT,!1)&&nu(this.preprocessor.peek(tJ.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<tJ.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=m.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=m.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.SOLIDUS:case r.GREATER_THAN_SIGN:case r.EOF:this.state=m.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case r.EQUALS_SIGN:this._err(i.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=m.ATTRIBUTE_NAME;break;default:this._createAttr(""),this.state=m.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:case r.SOLIDUS:case r.GREATER_THAN_SIGN:case r.EOF:this._leaveAttrName(),this.state=m.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case r.EQUALS_SIGN:this._leaveAttrName(),this.state=m.BEFORE_ATTRIBUTE_VALUE;break;case r.QUOTATION_MARK:case r.APOSTROPHE:case r.LESS_THAN_SIGN:this._err(i.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case r.NULL:this._err(i.unexpectedNullCharacter),this.currentAttr.name+="�";break;default:this.currentAttr.name+=String.fromCodePoint(na(e)?e+32:e)}}_stateAfterAttributeName(e){switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.SOLIDUS:this.state=m.SELF_CLOSING_START_TAG;break;case r.EQUALS_SIGN:this.state=m.BEFORE_ATTRIBUTE_VALUE;break;case r.GREATER_THAN_SIGN:this.state=m.DATA,this.emitCurrentTagToken();break;case r.EOF:this._err(i.eofInTag),this._emitEOFToken();break;default:this._createAttr(""),this.state=m.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.QUOTATION_MARK:this.state=m.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case r.APOSTROPHE:this.state=m.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case r.GREATER_THAN_SIGN:this._err(i.missingAttributeValue),this.state=m.DATA,this.emitCurrentTagToken();break;default:this.state=m.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case r.QUOTATION_MARK:this.state=m.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case r.AMPERSAND:this._startCharacterReference();break;case r.NULL:this._err(i.unexpectedNullCharacter),this.currentAttr.value+="�";break;case r.EOF:this._err(i.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case r.APOSTROPHE:this.state=m.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case r.AMPERSAND:this._startCharacterReference();break;case r.NULL:this._err(i.unexpectedNullCharacter),this.currentAttr.value+="�";break;case r.EOF:this._err(i.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:this._leaveAttrValue(),this.state=m.BEFORE_ATTRIBUTE_NAME;break;case r.AMPERSAND:this._startCharacterReference();break;case r.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=m.DATA,this.emitCurrentTagToken();break;case r.NULL:this._err(i.unexpectedNullCharacter),this.currentAttr.value+="�";break;case r.QUOTATION_MARK:case r.APOSTROPHE:case r.LESS_THAN_SIGN:case r.EQUALS_SIGN:case r.GRAVE_ACCENT:this._err(i.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case r.EOF:this._err(i.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:this._leaveAttrValue(),this.state=m.BEFORE_ATTRIBUTE_NAME;break;case r.SOLIDUS:this._leaveAttrValue(),this.state=m.SELF_CLOSING_START_TAG;break;case r.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=m.DATA,this.emitCurrentTagToken();break;case r.EOF:this._err(i.eofInTag),this._emitEOFToken();break;default:this._err(i.missingWhitespaceBetweenAttributes),this.state=m.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case r.GREATER_THAN_SIGN:this.currentToken.selfClosing=!0,this.state=m.DATA,this.emitCurrentTagToken();break;case r.EOF:this._err(i.eofInTag),this._emitEOFToken();break;default:this._err(i.unexpectedSolidusInTag),this.state=m.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case r.GREATER_THAN_SIGN:this.state=m.DATA,this.emitCurrentComment(t);break;case r.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case r.NULL:this._err(i.unexpectedNullCharacter),t.data+="�";break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(tJ.DASH_DASH,!0)?(this._createCommentToken(tJ.DASH_DASH.length+1),this.state=m.COMMENT_START):this._consumeSequenceIfMatch(tJ.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(tJ.DOCTYPE.length+1),this.state=m.DOCTYPE):this._consumeSequenceIfMatch(tJ.CDATA_START,!0)?this.inForeignNode?this.state=m.CDATA_SECTION:(this._err(i.cdataInHtmlContent),this._createCommentToken(tJ.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=m.BOGUS_COMMENT):this._ensureHibernation()||(this._err(i.incorrectlyOpenedComment),this._createCommentToken(2),this.state=m.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case r.HYPHEN_MINUS:this.state=m.COMMENT_START_DASH;break;case r.GREATER_THAN_SIGN:{this._err(i.abruptClosingOfEmptyComment),this.state=m.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=m.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case r.HYPHEN_MINUS:this.state=m.COMMENT_END;break;case r.GREATER_THAN_SIGN:this._err(i.abruptClosingOfEmptyComment),this.state=m.DATA,this.emitCurrentComment(t);break;case r.EOF:this._err(i.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=m.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case r.HYPHEN_MINUS:this.state=m.COMMENT_END_DASH;break;case r.LESS_THAN_SIGN:t.data+="<",this.state=m.COMMENT_LESS_THAN_SIGN;break;case r.NULL:this._err(i.unexpectedNullCharacter),t.data+="�";break;case r.EOF:this._err(i.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case r.EXCLAMATION_MARK:t.data+="!",this.state=m.COMMENT_LESS_THAN_SIGN_BANG;break;case r.LESS_THAN_SIGN:t.data+="<";break;default:this.state=m.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===r.HYPHEN_MINUS?this.state=m.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=m.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===r.HYPHEN_MINUS?this.state=m.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=m.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==r.GREATER_THAN_SIGN&&e!==r.EOF&&this._err(i.nestedComment),this.state=m.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case r.HYPHEN_MINUS:this.state=m.COMMENT_END;break;case r.EOF:this._err(i.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="-",this.state=m.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case r.GREATER_THAN_SIGN:this.state=m.DATA,this.emitCurrentComment(t);break;case r.EXCLAMATION_MARK:this.state=m.COMMENT_END_BANG;break;case r.HYPHEN_MINUS:t.data+="-";break;case r.EOF:this._err(i.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--",this.state=m.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case r.HYPHEN_MINUS:t.data+="--!",this.state=m.COMMENT_END_DASH;break;case r.GREATER_THAN_SIGN:this._err(i.incorrectlyClosedComment),this.state=m.DATA,this.emitCurrentComment(t);break;case r.EOF:this._err(i.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+="--!",this.state=m.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:this.state=m.BEFORE_DOCTYPE_NAME;break;case r.GREATER_THAN_SIGN:this.state=m.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case r.EOF:{this._err(i.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(i.missingWhitespaceBeforeDoctypeName),this.state=m.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(na(e))this._createDoctypeToken(String.fromCharCode(e+32)),this.state=m.DOCTYPE_NAME;else switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.NULL:this._err(i.unexpectedNullCharacter),this._createDoctypeToken("�"),this.state=m.DOCTYPE_NAME;break;case r.GREATER_THAN_SIGN:{this._err(i.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=m.DATA;break}case r.EOF:{this._err(i.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=m.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:this.state=m.AFTER_DOCTYPE_NAME;break;case r.GREATER_THAN_SIGN:this.state=m.DATA,this.emitCurrentDoctype(t);break;case r.NULL:this._err(i.unexpectedNullCharacter),t.name+="�";break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(na(e)?e+32:e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.GREATER_THAN_SIGN:this.state=m.DATA,this.emitCurrentDoctype(t);break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(tJ.PUBLIC,!1)?this.state=m.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(tJ.SYSTEM,!1)?this.state=m.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(i.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:this.state=m.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case r.QUOTATION_MARK:this._err(i.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=m.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case r.APOSTROPHE:this._err(i.missingWhitespaceAfterDoctypePublicKeyword),t.publicId="",this.state=m.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case r.GREATER_THAN_SIGN:this._err(i.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=m.DATA,this.emitCurrentDoctype(t);break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(i.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.QUOTATION_MARK:t.publicId="",this.state=m.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case r.APOSTROPHE:t.publicId="",this.state=m.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case r.GREATER_THAN_SIGN:this._err(i.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=m.DATA,this.emitCurrentDoctype(t);break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(i.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case r.QUOTATION_MARK:this.state=m.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case r.NULL:this._err(i.unexpectedNullCharacter),t.publicId+="�";break;case r.GREATER_THAN_SIGN:this._err(i.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=m.DATA;break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case r.APOSTROPHE:this.state=m.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case r.NULL:this._err(i.unexpectedNullCharacter),t.publicId+="�";break;case r.GREATER_THAN_SIGN:this._err(i.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=m.DATA;break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:this.state=m.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case r.GREATER_THAN_SIGN:this.state=m.DATA,this.emitCurrentDoctype(t);break;case r.QUOTATION_MARK:this._err(i.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case r.APOSTROPHE:this._err(i.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;
vendor: 4,995 bytes, line 1097
1097default:this._err(i.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=m.DATA;break;case r.QUOTATION_MARK:t.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case r.APOSTROPHE:t.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(i.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:this.state=m.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case r.QUOTATION_MARK:this._err(i.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case r.APOSTROPHE:this._err(i.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case r.GREATER_THAN_SIGN:this._err(i.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=m.DATA,this.emitCurrentDoctype(t);break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(i.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.QUOTATION_MARK:t.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case r.APOSTROPHE:t.systemId="",this.state=m.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case r.GREATER_THAN_SIGN:this._err(i.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=m.DATA,this.emitCurrentDoctype(t);break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(i.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case r.QUOTATION_MARK:this.state=m.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case r.NULL:this._err(i.unexpectedNullCharacter),t.systemId+="�";break;case r.GREATER_THAN_SIGN:this._err(i.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=m.DATA;break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case r.APOSTROPHE:this.state=m.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case r.NULL:this._err(i.unexpectedNullCharacter),t.systemId+="�";break;case r.GREATER_THAN_SIGN:this._err(i.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=m.DATA;break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case r.SPACE:case r.LINE_FEED:case r.TABULATION:case r.FORM_FEED:break;case r.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=m.DATA;break;case r.EOF:this._err(i.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(i.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=m.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case r.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=m.DATA;break;case r.NULL:this._err(i.unexpectedNullCharacter);break;case r.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case r.RIGHT_SQUARE_BRACKET:this.state=m.CDATA_SECTION_BRACKET;break;case r.EOF:this._err(i.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===r.RIGHT_SQUARE_BRACKET?this.state=m.CDATA_SECTION_END:(this._emitChars("]"),this.state=m.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case r.GREATER_THAN_SIGN:this.state=m.DATA;break;case r.RIGHT_SQUARE_BRACKET:this._emitChars("]");break;default:this._emitChars("]]"),this.state=m.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}
vendor: 4,107 bytes, line 1097
10970===e?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(r.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ns(this.preprocessor.peek(1))?m.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){ns(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===r.SEMICOLON&&this._err(i.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}let nd=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),nh=new Set([...nd,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),np=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),nf=new Set([...np,f.OL,f.UL]),nm=new Set([...np,f.BUTTON]),ng=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),nv=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),nb=new Set([f.TR,f.TEMPLATE,f.HTML]),ny=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),nE=new Set([f.TABLE,f.TEMPLATE,f.HTML]),nT=new Set([f.TD,f.TH]);class nk{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=f.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===f.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===c.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(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let 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])!==c.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(nr,c.HTML)}popUntilTableCellPopped(){this.popUntilPopped(nT,c.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){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(nE,c.HTML)}clearBackToTableBodyContext(){this.clearBackTo(ny,c.HTML)}clearBackToTableRowContext(){this.clearBackTo(nb,c.HTML)}remove(e){let 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]===f.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.tagIDs[0]===f.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case c.HTML:if(r===e)return!0;
1097if(t.has(r))return!1;break;case c.SVG:if(nv.has(r))return!1;break;case c.MATHML:if(ng.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,np)}hasInListItemScope(e){return this.hasInDynamicScope(e,nf)}hasInButtonScope(e){return this.hasInDynamicScope(e,nm)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case c.HTML:if(nr.has(t))return!0;if(np.has(t))return!1;break;case c.SVG:if(nv.has(t))return!1;break;case c.MATHML:if(ng.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===c.HTML)switch(this.tagIDs[t]){case e:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===c.HTML)switch(this.tagIDs[e]){case f.TBODY:case f.THEAD:case f.TFOOT:return!0;case f.TABLE:case f.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===c.HTML)switch(this.tagIDs[t]){case e:return!0;case f.OPTION:case f.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;void 0!==this.currentTagId&&nd.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&nh.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&nh.has(this.currentTagId);)this.pop()}}!function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(g||(g={}));let n_={type:g.Marker};class nA{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===g.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<3)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<3)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1)>=3&&this.entries.splice(t.idx,1)}}insertMarker(){this.entries.unshift(n_)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:g.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:g.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);-1!==t&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(n_);-1===e?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===g.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===g.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===g.Element&&t.element===e)}}let nx={createDocument:()=>({nodeName:"#document",mode:h.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){let 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){let i=e.childNodes.find(e=>"#documentType"===e.nodeName);i?(i.name=t,i.publicId=n,i.systemId=r):nx.appendChild(e,{nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null})},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(nx.isTextNode(n)){n.value+=t;return}}nx.appendChild(e,nx.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&nx.isTextNode(r)?r.value+=t:nx.insertBefore(e,nx.createTextNode(t),n)},adoptAttributes(e,t){let 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}}},nw="html",nS=["+//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//"],nC=[...nS,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],nI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),nN=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],nO=[...nN,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function nR(e,t){return t.some(t=>e.startsWith(t))}let nD={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},nL=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=>
1097[e.toLowerCase(),e])),nP=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:c.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:c.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:c.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:c.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:c.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:c.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:c.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:c.XML}],["xml:space",{prefix:"xml",name:"space",namespace:c.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:c.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:c.XMLNS}]]),nM=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])),nF=new Set([f.B,f.BIG,f.BLOCKQUOTE,f.BODY,f.BR,f.CENTER,f.CODE,f.DD,f.DIV,f.DL,f.DT,f.EM,f.EMBED,f.H1,f.H2,f.H3,f.H4,f.H5,f.H6,f.HEAD,f.HR,f.I,f.IMG,f.LI,f.LISTING,f.MENU,f.META,f.NOBR,f.OL,f.P,f.PRE,f.RUBY,f.S,f.SMALL,f.SPAN,f.STRONG,f.STRIKE,f.SUB,f.SUP,f.TABLE,f.TT,f.U,f.UL,f.VAR]);function nB(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function nj(e){for(let t=0;t<e.attrs.length;t++){let n=nL.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function nU(e){for(let t=0;t<e.attrs.length;t++){let n=nP.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(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"}(v||(v={}));let nH={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},n$=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),nz={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:nx,onParseError:null};class nG{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=v.INITIAL,this.originalInsertionMode=v.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={...nz,...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 nc(this.options,this),this.activeFormattingElements=new nA(this.treeAdapter),this.fragmentContextID=n?ne(this.treeAdapter.getTagName(n)):f.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new nk(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...nz,...t};null!=e||(e=n.treeAdapter.createElement(p.TEMPLATE,c.HTML,[]));let r=n.treeAdapter.createElement("documentmock",c.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===f.TEMPLATE&&i.tmplInsertionModeStack.unshift(v.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let 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;let i=null!=(r=e.location)?r:nH,a={code:t,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:n?i.startLine:i.endLine,endCol:n?i.startCol:i.endCol,endOffset:n?i.startOffset:i.endOffset};this.onParseError(a)}
1097onItemPush(e,t,n){var r,i;null==(i=(r=this.treeAdapter).onItemPush)||i.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)||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){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===c.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,c.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=v.TEXT}switchToPlaintextParsing(){this.insertionMode=v.TEXT,this.originalInsertionMode=v.IN_BODY,this.tokenizer.state=ni.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)===p.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===c.HTML)switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:this.tokenizer.state=ni.RCDATA;break;case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:this.tokenizer.state=ni.RAWTEXT;break;case f.SCRIPT:this.tokenizer.state=ni.SCRIPT_DATA;break;case f.PLAINTEXT:this.tokenizer.state=ni.PLAINTEXT}}_setDocumentType(e){let t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let 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){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(null!=t?t:this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,c.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,c.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(){let e=this.treeAdapter.createElement(p.HTML,c.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,f.HTML)}_appendCommentNode(e,t){let 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;let r=this.treeAdapter.getChildNodes(t),i=n?r.lastIndexOf(n):r.length,a=r[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,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){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===a.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,i)}}shouldProcessStartTagTokenInForeignContent(e){let t,n;return!!this.currentNotInHTML&&(0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,(e.tagID!==f.SVG||this.treeAdapter.getTagName(t)!==p.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==c.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===f.MGLYPH||e.tagID===f.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,c.HTML)))}_processToken(e){switch(e.type){case a.CHARACTER:this.onCharacter(e);break;case a.NULL_CHARACTER:this.onNullCharacter(e);break;case a.COMMENT:this.onComment(e);break;case a.DOCTYPE:this.onDoctype(e);break;case a.START_TAG:this._processStartTag(e);break;case a.END_TAG:this.onEndTag(e);break;case a.EOF:this.onEof(e);break;case a.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){let r=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return(!n||n===c.HTML)&&function(e,t,n){if(t===c.MATHML&&e===f.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===d.ENCODING){let t=n[e].value.toLowerCase();return t===nD.TEXT_HTML||t===nD.APPLICATION_XML}}return t===c.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}(e,r,i)||(!n||n===c.MATHML)&&r===c.MATHML&&(e===f.MI||e===f.MO||e===f.MN||e===f.MS||e===f.MTEXT)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===g.Marker||this.openElements.contains(e.element)),n=-1===t?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=v.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(f.P),this.openElements.popUntilTagNamePopped(f.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case f.TR:this.insertionMode=v.IN_ROW;return;case f.TBODY:case f.THEAD:case f.TFOOT:this.insertionMode=v.IN_TABLE_BODY;return;case f.CAPTION:this.insertionMode=v.IN_CAPTION;return;case f.COLGROUP:this.insertionMode=v.IN_COLUMN_GROUP;return;case f.TABLE:this.insertionMode=v.IN_TABLE;return;case f.BODY:this.insertionMode=v.IN_BODY;return;case f.FRAMESET:this.insertionMode=v.IN_FRAMESET;return;case f.SELECT:return void this._resetInsertionModeForSelect(e);case f.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case f.HTML:this.insertionMode=this.headElement?v.AFTER_HEAD:v.BEFORE_HEAD;return;case f.TD:case f.TH:if(e>0){this.insertionMode=v.IN_CELL;return}break;case f.HEAD:if(e>0){this.insertionMode=v.IN_HEAD;return}}this.insertionMode=v.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===f.TEMPLATE)break;if(e===f.TABLE){this.insertionMode=v.IN_SELECT_IN_TABLE;return}}this.insertionMode=v.IN_SELECT}_isElementCausesFosterParenting(e){return n$.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--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case f.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===c.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case f.TABLE:{let n=this.treeAdapter.getParentNode(t);if(n)return{parent:n,beforeElement:t};return{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return nn[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){var t,n;return void(t=this,n=e,t._insertCharacters(n),t.framesetOk=!1)}switch(this.insertionMode){case v.INITIAL:nW(this,e);break;case v.BEFORE_HTML:nK(this,e);break;case v.BEFORE_HEAD:nZ(this,e);break;case v.IN_HEAD:nJ(this,e);break;case v.IN_HEAD_NO_SCRIPT:n0(this,e);break;case v.AFTER_HEAD:n1(this,e);break;case v.IN_BODY:case v.IN_CAPTION:case v.IN_CELL:case v.IN_TEMPLATE:n4(this,e);break;case v.TEXT:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:rr(this,e);break;case v.IN_TABLE_TEXT:rl(this,e);break;case v.IN_COLUMN_GROUP:rh(this,e);break;case v.AFTER_BODY:rT(this,e);break;case v.AFTER_AFTER_BODY:rk(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){var t,n;return void(t=this,(n=e).chars="�",t._insertCharacters(n))}switch(this.insertionMode){case v.INITIAL:nW(this,e);break;case v.BEFORE_HTML:nK(this,e);break;case v.BEFORE_HEAD:nZ(this,e);break;case v.IN_HEAD:nJ(this,e);break;case v.IN_HEAD_NO_SCRIPT:n0(this,e);break;case v.AFTER_HEAD:n1(this,e);break;case v.TEXT:this._insertCharacters(e);break;case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:rr(this,e);break;case v.IN_COLUMN_GROUP:rh(this,e);break;case v.AFTER_BODY:rT(this,e);break;case v.AFTER_AFTER_BODY:rk(this,e)}}onComment(e){var t,n,r,i;if(this.skipNextNewLine=!1,this.currentNotInHTML)return void nq(this,e);switch(this.insertionMode){case v.INITIAL:case v.BEFORE_HTML:case v.BEFORE_HEAD:case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:case v.IN_BODY:case v.IN_TABLE:case v.IN_CAPTION:case v.IN_COLUMN_GROUP:case v.IN_TABLE_BODY:case v.IN_ROW:case v.IN_CELL:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:case v.IN_TEMPLATE:case v.IN_FRAMESET:case v.AFTER_FRAMESET:nq(this,e);break;case v.IN_TABLE_TEXT:ru(this,e);break;case v.AFTER_BODY:t=this,n=e,t._appendCommentNode(n,t.openElements.items[0]);break;case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:r=this,i=e,r._appendCommentNode(i,r.document)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case v.INITIAL:!function(e,t){e._setDocumentType(t);let n=t.forceQuirks?h.QUIRKS:function(e){if(e.name!==nw)return h.QUIRKS;let{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return h.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),nI.has(n))return h.QUIRKS;let e=null===t?nC:nS;if(nR(n,e))return h.QUIRKS;if(nR(n,e=null===t?nN:nO))return h.LIMITED_QUIRKS}return h.NO_QUIRKS}(t);(t.name!==nw||null!==t.publicId||null!==t.systemId&&"about:legacy-compat"!==t.systemId)&&e._err(t,i.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=v.BEFORE_HTML}(this,e);break;case v.BEFORE_HEAD:case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:this._err(e,i.misplacedDoctype);break;case v.IN_TABLE_TEXT:ru(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,i.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(function(e){let t=e.tagID;return t===f.FONT&&e.attrs.some(({name:e})=>e===d.COLOR||e===d.SIZE||e===d.FACE)||nF.has(t)}(t))r_(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);if(r===c.MATHML)nB(t);else if(r===c.SVG){let e=nM.get(t.tagName);null!=e&&(t.tagName=e,t.tagID=ne(t.tagName)),nj(t)}nU(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 v.INITIAL:nW(this,e);break;case v.BEFORE_HTML:t=this,(n=e).tagID===f.HTML?(t._insertElement(n,c.HTML),t.insertionMode=v.BEFORE_HEAD):nK(t,n);break;case v.BEFORE_HEAD:var t,n,r,a,o,s,l=this,u=e;switch(u.tagID){case f.HTML:n7(l,u);break;case f.HEAD:l._insertElement(u,c.HTML),l.headElement=l.openElements.current,l.insertionMode=v.IN_HEAD;break;default:nZ(l,u)}break;case v.IN_HEAD:nX(this,e);break;case v.IN_HEAD_NO_SCRIPT:var d=this,h=e;switch(h.tagID){case f.HTML:n7(d,h);break;case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:nX(d,h);break;case f.NOSCRIPT:d._err(h,i.nestedNoscriptInHead);break;default:n0(d,h)}break;case v.AFTER_HEAD:var p=this,m=e;switch(m.tagID){case f.HTML:n7(p,m);break;case f.BODY:p._insertElement(m,c.HTML),p.framesetOk=!1,p.insertionMode=v.IN_BODY;break;case f.FRAMESET:p._insertElement(m,c.HTML),p.insertionMode=v.IN_FRAMESET;break;case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:p._err(m,i.abandonedHeadElementChild),p.openElements.push(p.headElement,f.HEAD),nX(p,m),p.openElements.remove(p.headElement);break;case f.HEAD:p._err(m,i.misplacedStartTagForHeadElement);break;default:n1(p,m)}break;case v.IN_BODY:n7(this,e);break;case v.IN_TABLE:ri(this,e);break;case v.IN_TABLE_TEXT:ru(this,e);break;case v.IN_CAPTION:var g=this,b=e;let y=b.tagID;rc.has(y)?g.openElements.hasInTableScope(f.CAPTION)&&(g.openElements.generateImpliedEndTags(),g.openElements.popUntilTagNamePopped(f.CAPTION),g.activeFormattingElements.clearToLastMarker(),g.insertionMode=v.IN_TABLE,ri(g,b)):n7(g,b);break;case v.IN_COLUMN_GROUP:rd(this,e);break;case v.IN_TABLE_BODY:rp(this,e);break;case v.IN_ROW:rm(this,e);break;case v.IN_CELL:var E=this,T=e;let k=T.tagID;rc.has(k)?(E.openElements.hasInTableScope(f.TD)||E.openElements.hasInTableScope(f.TH))&&(E._closeTableCell(),rm(E,T)):n7(E,T);break;case v.IN_SELECT:rv(this,e);break;case v.IN_SELECT_IN_TABLE:var _=this,A=e;let x=A.tagID;x===f.CAPTION||x===f.TABLE||x===f.TBODY||x===f.TFOOT||x===f.THEAD||x===f.TR||x===f.TD||x===f.TH?(_.openElements.popUntilTagNamePopped(f.SELECT),_._resetInsertionMode(),_._processStartTag(A)):rv(_,A);break;case v.IN_TEMPLATE:var w=this,S=e;switch(S.tagID){case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:case f.NOFRAMES:case f.SCRIPT:case f.STYLE:case f.TEMPLATE:case f.TITLE:nX(w,S);break;case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:w.tmplInsertionModeStack[0]=v.IN_TABLE,w.insertionMode=v.IN_TABLE,ri(w,S);break;case f.COL:w.tmplInsertionModeStack[0]=v.IN_COLUMN_GROUP,w.insertionMode=v.IN_COLUMN_GROUP,rd(w,S);break;case f.TR:w.tmplInsertionModeStack[0]=v.IN_TABLE_BODY,w.insertionMode=v.IN_TABLE_BODY,rp(w,S);break;case f.TD:case f.TH:w.tmplInsertionModeStack[0]=v.IN_ROW,w.insertionMode=v.IN_ROW,rm(w,S);break;default:w.tmplInsertionModeStack[0]=v.IN_BODY,w.insertionMode=v.IN_BODY,n7(w,S)}break;case v.AFTER_BODY:r=this,(a=e).tagID===f.HTML?n7(r,a):rT(r,a);break;case v.IN_FRAMESET:var C=this,I=e;switch(I.tagID){case f.HTML:n7(C,I);break;case f.FRAMESET:C._insertElement(I,c.HTML);break;case f.FRAME:C._appendElement(I,c.HTML),I.ackSelfClosing=!0;break;case f.NOFRAMES:nX(C,I)}break;case v.AFTER_FRAMESET:var N=this,O=e;switch(O.tagID){case f.HTML:n7(N,O);break;case f.NOFRAMES:nX(N,O)}break;case v.AFTER_AFTER_BODY:o=this,(s=e).tagID===f.HTML?n7(o,s):rk(o,s);break;case v.AFTER_AFTER_FRAMESET:var R=this,D=e;switch(D.tagID){case f.HTML:n7(R,D);break;case f.NOFRAMES:nX(R,D)}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID
1097===f.P||t.tagID===f.BR){r_(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===c.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case v.INITIAL:nW(this,e);break;case v.BEFORE_HTML:var t,n,r,a,o,s,l=this,u=e;let c=u.tagID;(c===f.HTML||c===f.HEAD||c===f.BODY||c===f.BR)&&nK(l,u);break;case v.BEFORE_HEAD:var d=this,h=e;let p=h.tagID;p===f.HEAD||p===f.BODY||p===f.HTML||p===f.BR?nZ(d,h):d._err(h,i.endTagWithoutMatchingOpenElement);break;case v.IN_HEAD:var m=this,g=e;switch(g.tagID){case f.HEAD:m.openElements.pop(),m.insertionMode=v.AFTER_HEAD;break;case f.BODY:case f.BR:case f.HTML:nJ(m,g);break;case f.TEMPLATE:nQ(m,g);break;default:m._err(g,i.endTagWithoutMatchingOpenElement)}break;case v.IN_HEAD_NO_SCRIPT:var b=this,y=e;switch(y.tagID){case f.NOSCRIPT:b.openElements.pop(),b.insertionMode=v.IN_HEAD;break;case f.BR:n0(b,y);break;default:b._err(y,i.endTagWithoutMatchingOpenElement)}break;case v.AFTER_HEAD:var E=this,T=e;switch(T.tagID){case f.BODY:case f.HTML:case f.BR:n1(E,T);break;case f.TEMPLATE:nQ(E,T);break;default:E._err(T,i.endTagWithoutMatchingOpenElement)}break;case v.IN_BODY:rt(this,e);break;case v.TEXT:t=this,e.tagID===f.SCRIPT&&(null==(n=t.scriptHandler)||n.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode;break;case v.IN_TABLE:ra(this,e);break;case v.IN_TABLE_TEXT:ru(this,e);break;case v.IN_CAPTION:var k=this,_=e;let A=_.tagID;switch(A){case f.CAPTION:case f.TABLE:k.openElements.hasInTableScope(f.CAPTION)&&(k.openElements.generateImpliedEndTags(),k.openElements.popUntilTagNamePopped(f.CAPTION),k.activeFormattingElements.clearToLastMarker(),k.insertionMode=v.IN_TABLE,A===f.TABLE&&ra(k,_));break;case f.BODY:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:rt(k,_)}break;case v.IN_COLUMN_GROUP:var x=this,w=e;switch(w.tagID){case f.COLGROUP:x.openElements.currentTagId===f.COLGROUP&&(x.openElements.pop(),x.insertionMode=v.IN_TABLE);break;case f.TEMPLATE:nQ(x,w);break;case f.COL:break;default:rh(x,w)}break;case v.IN_TABLE_BODY:rf(this,e);break;case v.IN_ROW:rg(this,e);break;case v.IN_CELL:var S=this,C=e;let I=C.tagID;switch(I){case f.TD:case f.TH:S.openElements.hasInTableScope(I)&&(S.openElements.generateImpliedEndTags(),S.openElements.popUntilTagNamePopped(I),S.activeFormattingElements.clearToLastMarker(),S.insertionMode=v.IN_ROW);break;case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:S.openElements.hasInTableScope(I)&&(S._closeTableCell(),rg(S,C));break;case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:rt(S,C)}break;case v.IN_SELECT:rb(this,e);break;case v.IN_SELECT_IN_TABLE:var N=this,O=e;let R=O.tagID;R===f.CAPTION||R===f.TABLE||R===f.TBODY||R===f.TFOOT||R===f.THEAD||R===f.TR||R===f.TD||R===f.TH?N.openElements.hasInTableScope(R)&&(N.openElements.popUntilTagNamePopped(f.SELECT),N._resetInsertionMode(),N.onEndTag(O)):rb(N,O);break;case v.IN_TEMPLATE:r=this,(a=e).tagID===f.TEMPLATE&&nQ(r,a);break;case v.AFTER_BODY:rE(this,e);break;case v.IN_FRAMESET:o=this,e.tagID===f.FRAMESET&&!o.openElements.isRootHtmlElementCurrent()&&(o.openElements.pop(),o.fragmentContext||o.openElements.currentTagId===f.FRAMESET||(o.insertionMode=v.AFTER_FRAMESET));break;case v.AFTER_FRAMESET:s=this,e.tagID===f.HTML&&(s.insertionMode=v.AFTER_AFTER_FRAMESET);break;case v.AFTER_AFTER_BODY:rk(this,e)}}onEof(e){switch(this.insertionMode){case v.INITIAL:nW(this,e);break;case v.BEFORE_HTML:nK(this,e);break;case v.BEFORE_HEAD:nZ(this,e);break;case v.IN_HEAD:nJ(this,e);break;case v.IN_HEAD_NO_SCRIPT:n0(this,e);break;case v.AFTER_HEAD:n1(this,e);break;case v.IN_BODY:case v.IN_TABLE:case v.IN_CAPTION:case v.IN_COLUMN_GROUP:case v.IN_TABLE_BODY:case v.IN_ROW:case v.IN_CELL:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:rn(this,e);break;case v.TEXT:var t,n;t=this,n=e,t._err(n,i.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(n);break;case v.IN_TABLE_TEXT:ru(this,e);break;case v.IN_TEMPLATE:ry(this,e);break;case v.AFTER_BODY:case v.IN_FRAMESET:case v.AFTER_FRAMESET:case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:nV(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCo
1097deAt(0)===r.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)return void this._insertCharacters(e);switch(this.insertionMode){case v.IN_HEAD:case v.IN_HEAD_NO_SCRIPT:case v.AFTER_HEAD:case v.TEXT:case v.IN_COLUMN_GROUP:case v.IN_SELECT:case v.IN_SELECT_IN_TABLE:case v.IN_FRAMESET:case v.AFTER_FRAMESET:this._insertCharacters(e);break;case v.IN_BODY:case v.IN_CAPTION:case v.IN_CELL:case v.IN_TEMPLATE:case v.AFTER_BODY:case v.AFTER_AFTER_BODY:case v.AFTER_AFTER_FRAMESET:n3(this,e);break;case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:rr(this,e);break;case v.IN_TABLE_TEXT:rs(this,e)}}}function nY(e,t){for(let n=0;n<8;n++){let n=function(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):re(e,t),n}(e,t);if(!n)break;let r=function(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=function(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=3;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=function(e,t){let 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}(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&function(e,t,n){let r=ne(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===f.TEMPLATE&&i===c.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}(e,a,i);let o=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,l=e.treeAdapter.createElement(s.tagName,o,s.attrs);e._adoptNodes(r,l),e.treeAdapter.appendChild(r,l),e.activeFormattingElements.insertElementAfterBookmark(l,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(r,l,s.tagID)}}function nq(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function nV(e,t){if(e.stopped=!0,t.location){let n=2*!e.fragmentContext;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function nW(e,t){e._err(t,i.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,h.QUIRKS),e.insertionMode=v.BEFORE_HTML,e._processToken(t)}function nK(e,t){e._insertFakeRootElement(),e.insertionMode=v.BEFORE_HEAD,e._processToken(t)}function nZ(e,t){e._insertFakeElement(p.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=v.IN_HEAD,e._processToken(t)}function nX(e,t){switch(t.tagID){case f.HTML:n7(e,t);break;case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:e._appendElement(t,c.HTML),t.ackSelfClosing=!0;break;case f.TITLE:e._switchToTextParsing(t,ni.RCDATA);break;case f.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,ni.RAWTEXT):(e._insertElement(t,c.HTML),e.insertionMode=v.IN_HEAD_NO_SCRIPT);break;case f.NOFRAMES:case f.STYLE:e._switchToTextParsing(t,ni.RAWTEXT);break;case f.SCRIPT:e._switchToTextParsing(t,ni.SCRIPT_DATA);break;case f.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=v.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(v.IN_TEMPLATE);break;case f.HEAD:e._err(t,i.misplacedStartTagForHeadElement);break;default:nJ(e,t)}}function nQ(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==f.TEMPLATE&&e._err(t,i.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,i.endTagWithoutMatchingOpenElement)}function nJ(e,t){e.openElements.pop(),e.insertionMode=v.AFTER_HEAD,e._processToken(t)}function n0(e,t){let n=t.type===a.EOF?i.openElementsLeftAfterEof:i.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=v.IN_HEAD,e._processToken(t)}function n1(e,t){e._insertFakeElement(p.BODY,f.BODY),e.insertionMode=v.IN_BODY,n2(e,t)}function n2(e,t){switch(t.type){case a.CHARACTER:n4(e,t);break;case a.WHITESPACE_CHARACTER:n3(e,t);break;case a.COMMENT:nq(e,t);break;case a.START_TAG:n7(e,t);break;case a.END_TAG:rt(e,t);break;case a.EOF:rn(e,t)}}function n3(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function n4(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function n9(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,c.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function n5(e){let t=t4(e,d.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function n8(e,t){e._switchToTextParsing(t,ni.RAWTEXT)}function n6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,c.HTML)}function n7(e,t){switch(t.tagID){case f.I:case f.S:case f.B:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.SMALL:case f.STRIKE:case f.STRONG:e._reconstructActiveFormattingElements(),e._insertElement(t,c.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case f.A:let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(p.A);n&&(nY(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,c.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:e.openElements.hasInButtonScope(f.P)&&e._closePElement(),void 0!==e.openElements.currentTagId&&nr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,c.HTML);break;case f.P:case f.DL:case f.OL:case f.UL:case f.DIV:case f.DIR:case f.NAV:case f.MAIN:case f.MENU:case f.ASIDE:case f.CENT
1097ER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.DETAILS:case f.ADDRESS:case f.ARTICLE:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,c.HTML);break;case f.LI:case f.DD:case f.DT:e.framesetOk=!1;let r=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let n=e.openElements.tagIDs[t];if(r===f.LI&&n===f.LI||(r===f.DD||r===f.DT)&&(n===f.DD||n===f.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==f.ADDRESS&&n!==f.DIV&&n!==f.P&&e._isSpecialElement(e.openElements.items[t],n))break}e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,c.HTML);break;case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:n9(e,t);break;case f.HR:e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,c.HTML),e.framesetOk=!1,t.ackSelfClosing=!0;break;case f.RB:case f.RTC:e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,c.HTML);break;case f.RT:case f.RP:e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,c.HTML);break;case f.PRE:case f.LISTING:e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,c.HTML),e.skipNextNewLine=!0,e.framesetOk=!1;break;case f.XMP:e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ni.RAWTEXT);break;case f.SVG:e._reconstructActiveFormattingElements(),nj(t),nU(t),t.selfClosing?e._appendElement(t,c.SVG):e._insertElement(t,c.SVG),t.ackSelfClosing=!0;break;case f.HTML:0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs);break;case f.BASE:case f.LINK:case f.META:case f.STYLE:case f.TITLE:case f.SCRIPT:case f.BGSOUND:case f.BASEFONT:case f.TEMPLATE:nX(e,t);break;case f.BODY:let i=e.openElements.tryPeekProperlyNestedBodyElement();i&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(i,t.attrs));break;case f.FORM:let a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,c.HTML),a||(e.formElement=e.openElements.current));break;case f.NOBR:e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(nY(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,c.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case f.MATH:e._reconstructActiveFormattingElements(),nB(t),nU(t),t.selfClosing?e._appendElement(t,c.MATHML):e._insertElement(t,c.MATHML),t.ackSelfClosing=!0;break;case f.TABLE:e.treeAdapter.getDocumentMode(e.document)!==h.QUIRKS&&e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,c.HTML),e.framesetOk=!1,e.insertionMode=v.IN_TABLE;break;case f.INPUT:e._reconstructActiveFormattingElements(),e._appendElement(t,c.HTML),n5(t)||(e.framesetOk=!1),t.ackSelfClosing=!0;break;case f.PARAM:case f.TRACK:case f.SOURCE:e._appendElement(t,c.HTML),t.ackSelfClosing=!0;break;case f.IMAGE:t.tagName=p.IMG,t.tagID=f.IMG,n9(e,t);break;case f.BUTTON:e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,c.HTML),e.framesetOk=!1;break;case f.APPLET:case f.OBJECT:case f.MARQUEE:e._reconstructActiveFormattingElements(),e._insertElement(t,c.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1;break;case f.IFRAME:e.framesetOk=!1,e._switchToTextParsing(t,ni.RAWTEXT);break;case f.SELECT:e._reconstructActiveFormattingElements(),e._insertElement(t,c.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===v.IN_TABLE||e.insertionMode===v.IN_CAPTION||e.insertionMode===v.IN_TABLE_BODY||e.insertionMode===v.IN_ROW||e.insertionMode===v.IN_CELL?v.IN_SELECT_IN_TABLE:v.IN_SELECT;break;case f.OPTION:case f.OPTGROUP:e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,c.HTML);break;case f.NOEMBED:case f.NOFRAMES:n8(e,t);break;case f.FRAMESET:let o=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&o&&(e.treeAdapter.detachNode(o),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,c.HTML),e.insertionMode=v.IN_FRAMESET);break;case f.TEXTAREA:e._insertElement(t,c.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ni.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=v.TEXT;break;case f.NOSCRIPT:e.options.scriptingEnabled?n8(e,t):n6(e,t);break;case f.PLAINTEXT:e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,c.HTML),e.tokenizer.state=ni.PLAINTEXT;break;case f.COL:case f.TH:case f.TD:case f.TR:case f.HEAD:case f.FRAME:case f.TBODY:case f.TFOOT:case f.THEAD:case f.CAPTION:case f.COLGROUP:break;default:n6(e,t)}}function re(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>
1097=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function rt(e,t){switch(t.tagID){case f.A:case f.B:case f.I:case f.S:case f.U:case f.EM:case f.TT:case f.BIG:case f.CODE:case f.FONT:case f.NOBR:case f.SMALL:case f.STRIKE:case f.STRONG:nY(e,t);break;case f.P:e.openElements.hasInButtonScope(f.P)||e._insertFakeElement(p.P,f.P),e._closePElement();break;case f.DL:case f.UL:case f.OL:case f.DIR:case f.DIV:case f.NAV:case f.PRE:case f.MAIN:case f.MENU:case f.ASIDE:case f.BUTTON:case f.CENTER:case f.FIGURE:case f.FOOTER:case f.HEADER:case f.HGROUP:case f.DIALOG:case f.ADDRESS:case f.ARTICLE:case f.DETAILS:case f.SEARCH:case f.SECTION:case f.SUMMARY:case f.LISTING:case f.FIELDSET:case f.BLOCKQUOTE:case f.FIGCAPTION:let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n));break;case f.LI:e.openElements.hasInListItemScope(f.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(f.LI),e.openElements.popUntilTagNamePopped(f.LI));break;case f.DD:case f.DT:let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r));break;case f.H1:case f.H2:case f.H3:case f.H4:case f.H5:case f.H6:e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped());break;case f.BR:e._reconstructActiveFormattingElements(),e._insertFakeElement(p.BR,f.BR),e.openElements.pop(),e.framesetOk=!1;break;case f.BODY:if(e.openElements.hasInScope(f.BODY)&&(e.insertionMode=v.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}break;case f.HTML:e.openElements.hasInScope(f.BODY)&&(e.insertionMode=v.AFTER_BODY,rE(e,t));break;case f.FORM:let i=e.openElements.tmplCount>0,{formElement:a}=e;i||(e.formElement=null),(a||i)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),i?e.openElements.popUntilTagNamePopped(f.FORM):a&&e.openElements.remove(a));break;case f.APPLET:case f.OBJECT:case f.MARQUEE:let o=t.tagID;e.openElements.hasInScope(o)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o),e.activeFormattingElements.clearToLastMarker());break;case f.TEMPLATE:nQ(e,t);break;default:re(e,t)}}function rn(e,t){e.tmplInsertionModeStack.length>0?ry(e,t):nV(e,t)}function rr(e,t){if(void 0!==e.openElements.currentTagId&&n$.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=v.IN_TABLE_TEXT,t.type){case a.CHARACTER:rl(e,t);break;case a.WHITESPACE_CHARACTER:rs(e,t)}else ro(e,t)}function ri(e,t){switch(t.tagID){case f.TD:case f.TH:case f.TR:e.openElements.clearBackToTableContext(),e._insertFakeElement(p.TBODY,f.TBODY),e.insertionMode=v.IN_TABLE_BODY,rp(e,t);break;case f.STYLE:case f.SCRIPT:case f.TEMPLATE:nX(e,t);break;case f.COL:e.openElements.clearBackToTableContext(),e._insertFakeElement(p.COLGROUP,f.COLGROUP),e.insertionMode=v.IN_COLUMN_GROUP,rd(e,t);break;case f.FORM:e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,c.HTML),e.formElement=e.openElements.current,e.openElements.pop());break;case f.TABLE:e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode(),e._processStartTag(t));break;case f.TBODY:case f.TFOOT:case f.THEAD:e.openElements.clearBackToTableContext(),e._insertElement(t,c.HTML),e.insertionMode=v.IN_TABLE_BODY;break;case f.INPUT:n5(t)?e._appendElement(t,c.HTML):ro(e,t),t.ackSelfClosing=!0;break;case f.CAPTION:e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,c.HTML),e.insertionMode=v.IN_CAPTION;break;case f.COLGROUP:e.openElements.clearBackToTableContext(),e._insertElement(t,c.HTML),e.insertionMode=v.IN_COLUMN_GROUP;break;default:ro(e,t)}}function ra(e,t){switch(t.tagID){case f.TABLE:e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break;case f.TEMPLATE:nQ(e,t);break;case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TBODY:case f.TD:case f.TFOOT:case f.TH:case f.THEAD:case f.TR:break;default:ro(e,t)}}function ro(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,n2(e,t),e.fosterParentingEnabled=n}
vendor: 5,181 bytes, line 1097
1097function rs(e,t){e.pendingCharacterTokens.push(t)}function rl(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ru(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ro(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}let rc=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function rd(e,t){switch(t.tagID){case f.HTML:n7(e,t);break;case f.COL:e._appendElement(t,c.HTML),t.ackSelfClosing=!0;break;case f.TEMPLATE:nX(e,t);break;default:rh(e,t)}}function rh(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=v.IN_TABLE,e._processToken(t))}function rp(e,t){switch(t.tagID){case f.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,c.HTML),e.insertionMode=v.IN_ROW;break;case f.TH:case f.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(p.TR,f.TR),e.insertionMode=v.IN_ROW,rm(e,t);break;case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE,ri(e,t));break;default:ri(e,t)}}function rf(e,t){let n=t.tagID;switch(t.tagID){case f.TBODY:case f.TFOOT:case f.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE);break;case f.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE,ra(e,t));break;case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:case f.TR:break;default:ra(e,t)}}function rm(e,t){switch(t.tagID){case f.TH:case f.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,c.HTML),e.insertionMode=v.IN_CELL,e.activeFormattingElements.insertMarker();break;case f.CAPTION:case f.COL:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,rp(e,t));break;default:ri(e,t)}}function rg(e,t){switch(t.tagID){case f.TR:e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY);break;case f.TABLE:e.openElements.hasInTableScope(f.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,rf(e,t));break;case f.TBODY:case f.TFOOT:case f.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(f.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=v.IN_TABLE_BODY,rf(e,t));break;case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:case f.TD:case f.TH:break;default:ra(e,t)}}function rv(e,t){switch(t.tagID){case f.HTML:n7(e,t);break;case f.OPTION:e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,c.HTML);break;case f.OPTGROUP:e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,c.HTML);break;case f.HR:e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,c.HTML),t.ackSelfClosing=!0;break;case f.INPUT:case f.KEYGEN:case f.TEXTAREA:case f.SELECT:e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode(),t.tagID!==f.SELECT&&e._processStartTag(t));break;case f.SCRIPT:case f.TEMPLATE:nX(e,t)}}function rb(e,t){switch(t.tagID){case f.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===f.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===f.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop();break;case f.OPTION:e.openElements.currentTagId===f.OPTION&&e.openElements.pop();break;case f.SELECT:e.openElements.hasInSelectScope(f.SELECT)&&(e.openElements.popUntilTagNamePopped(f.SELECT),e._resetInsertionMode());break;case f.TEMPLATE:nQ(e,t)}}function ry(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):nV(e,t)}function rE(e,t){var n;if(t.tagID===f.HTML){if(e.fragmentContext||(e.insertionMode=v.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===f.HTML){e._setEndLocation(e.openElements.items[0],t);let r=e.openElements.items[1];!r||(null==(n=e.treeAdapter.getNodeSourceCodeLocation(r))?void 0:n.endTag)||e._setEndLocation(r,t)}}else rT(e,t)}function rT(e,t){e.insertionMode=v.IN_BODY,n2(e,t)}function rk(e,t){e.insertionMode=v.IN_BODY,n2(e,t)}function r_(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==c.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.o
1097penElements.current);)e.openElements.pop()}null==String.prototype.codePointAt||((e,t)=>e.codePointAt(t)),p.AREA,p.BASE,p.BASEFONT,p.BGSOUND,p.BR,p.COL,p.EMBED,p.FRAME,p.HR,p.IMG,p.INPUT,p.KEYGEN,p.LINK,p.META,p.PARAM,p.SOURCE,p.TRACK,p.WBR;var rA=n(73545);let rx=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,rw=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),rS={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function rC(e,t){let n=function(e){let t="root"===e.type?e.children[0]:e;return!!(t&&("doctype"===t.type||"element"===t.type&&"html"===t.tagName.toLowerCase()))}(e),r=(0,tq.A)("type",{handlers:{root:rN,element:rO,text:rR,comment:rL,doctype:rD,raw:rP},unknown:rM}),i={parser:n?new nG(rS):nG.getFragmentParser(void 0,rS),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),rF(i,(0,rA.PW)());let a=function(e,t){let n=t||{};return tc({file:n.file||void 0,location:!1,schema:"svg"===n.space?tt:te,verbose:n.verbose||!1},e)}(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return(i.stitches&&(0,_.YR)(a,"comment",function(e,t,n){if(e.value.stitch&&n&&void 0!==t)return n.children[t]=e.value.stitch,t}),"root"===a.type&&1===a.children.length&&a.children[0].type===e.type)?a.children[0]:a}function rI(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function rN(e,t){rI(e.children,t)}function rO(e,t){(function(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ni.PLAINTEXT)return;rF(t,(0,rA.PW)(e));let r=t.parser.openElements.current,i="namespaceURI"in r?r.namespaceURI:em.html;i===em.html&&"svg"===n&&(i=em.svg);let o=tW({...e,children:[]},"svg"===({space:i===em.svg?"svg":"html"}).space?tU:tj),s={type:a.START_TAG,tagName:n,tagID:ne(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:rj(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n})(e,t),rI(e.children,t),function(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&tX.b.includes(n)||t.parser.tokenizer.state===ni.PLAINTEXT)return;rF(t,(0,rA.Y)(e));let r={type:a.END_TAG,tagName:n,tagID:ne(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:rj(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ni.RCDATA||t.parser.tokenizer.state===ni.RAWTEXT||t.parser.tokenizer.state===ni.SCRIPT_DATA)&&(t.parser.tokenizer.state=ni.DATA)}(e,t)}function rR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:a.CHARACTER,chars:e.value,location:rj(e)};rF(t,(0,rA.PW)(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function rD(e,t){let n={type:a.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:rj(e)};rF(t,(0,rA.PW)(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function rL(e,t){let n=e.value,r={type:a.COMMENT,data:n,location:rj(e)};rF(t,(0,rA.PW)(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function rP(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,rB(t,(0,rA.PW)(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(rx,"&lt;$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;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function rM(e,t){if(t.options.passThrough&&t.options.passThrough.includes(e.type)){var n;t.stitches=!0;let r="children"in(n=e)?(0,eB.Ay)({...n,children:[]}):(0,eB.Ay)(n);"children"in e&&"children"in r&&(r.children=rC({type:"root",children:e.children},t.options).children),rL({type:"comment",value:{stitch:r}},t)}else{let t="";
1097throw rw.has(e.type)&&(t=". 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"),Error("Cannot compile `"+e.type+"` node"+t)}}function rF(e,t){rB(e,t);let 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=ni.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 rB(e,t){if(t&&void 0!==t.offset){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function rj(e){let t=(0,rA.PW)(e)||{line:void 0,column:void 0,offset:void 0},n=(0,rA.Y)(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}}let rU=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],rH={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...rU,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...rU],h2:[["className","sr-only"]],img:[...rU,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...rU,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...rU],table:[...rU],ul:[...rU,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},r$={}.hasOwnProperty;function rz(e,t){if(t&&"object"==typeof t)switch("string"==typeof t.type?t.type:""){case"comment":var n=e,r=t;if(n.schema.allowComments){let e="string"==typeof r.value?r.value:"",t=e.indexOf("--\x3e"),n={type:"comment",value:t<0?e:e.slice(0,t)};return rV(n,r),n}return;case"doctype":var i=e,a=t;if(i.schema.allowDoctypes){let e={type:"doctype"};return rV(e,a),e}return;case"element":return function(e,t){let n="string"==typeof t.tagName?t.tagName:"";e.stack.push(n);let r=rG(e,t.children),i=function(e,t){let n,r=e.stack[e.stack.length-1],i=e.schema.attributes,a=e.schema.required,o=i&&r$.call(i,r)?i[r]:void 0,s=i&&r$.call(i,"*")?i["*"]:void 0,l=t&&"object"==typeof t?t:{},u={};
1097for(n in l)if(r$.call(l,n)){let t=l[n],r=rY(e,rW(o,n),n,t);null==r&&(r=rY(e,rW(s,n),n,t)),null!=r&&(u[n]=r)}if(a&&r$.call(a,r)){let e=a[r];for(n in e)r$.call(e,n)&&!r$.call(u,n)&&(u[n]=e[n])}return u}(e,t.properties);e.stack.pop();let a=!1;if(n&&"*"!==n&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&r$.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:"element",tagName:n,properties:i,children:r};return rV(o,t),o}(e,t);case"root":var o=e,s=t;let l={type:"root",children:rG(o,s.children)};return rV(l,s),l;case"text":var u=t;let c={type:"text",value:"string"==typeof u.value?u.value:""};return rV(c,u),c}}function rG(e,t){let n=[];if(Array.isArray(t)){let r=-1;for(;++r<t.length;){let i=rz(e,t[r]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function rY(e,t,n,r){return t?Array.isArray(r)?function(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=rq(e,t,n,r[i]);("number"==typeof o||"string"==typeof o)&&a.push(o)}return a}(e,t,n,r):rq(e,t,n,r):void 0}function rq(e,t,n,r){if(("boolean"==typeof r||"number"==typeof r||"string"==typeof r)&&function(e,t,n){let r=e.schema.protocols&&r$.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||0===r.length)return!0;let i=String(n),a=i.indexOf(":"),o=i.indexOf("?"),s=i.indexOf("#"),l=i.indexOf("/");if(a<0||l>-1&&a>l||o>-1&&a>o||s>-1&&a>s)return!0;let u=-1;for(;++u<r.length;){let e=r[u];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}(e,n,r)){if("object"==typeof t&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&"object"==typeof i&&"flags"in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function rV(e,t){let n=(0,rA.G1)(t);t.data&&(e.data=(0,eB.Ay)(t.data)),n&&(e.position=n)}function rW(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a="string"==typeof i?i:i[0];if(a===t)return i;"data*"===a&&(n=i)}if(t.length>4&&"data"===t.slice(0,4).toLowerCase())return n}let rK={eof:null,asterisk:42,underscore:95,tilde:126},rZ={attentionSideAfter:2,characterGroupPunctuation:2,characterGroupWhitespace:1};var rX=n(3407);let rQ=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],rJ=[12288,12288,65281,65376,65504,65510],r0=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],r1=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],r2=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12
1097686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],r3=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=2*i;if(t<e[a])r=i-1;else{if(!(t>e[a+1]))return!0;n=i+1}}return!1},[r4,r9]=function(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],a=e[r+1];if(19968>=i&&19968<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}(r2);var r5=Object.defineProperty,r8=r7(/\p{P}|\p{S}/u),r6=r7(/\s/);function r7(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCodePoint(t))}}function ie(e){if(e===rK.eof||(0,rX.Ee)(e)||r6(e))return rZ.characterGroupWhitespace;let t=0;if(e>=4352){if(null!==e&&e>=65024&&e<=65038)return b.nonEmojiGeneralUseVS;switch(function(e){if(!e||e<4352)return!1;switch(function(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`);return function(e){return!(e<161)&&!(e>1114109)&&r3(rQ,e)?"ambiguous":!(e<12288)&&!(e>65510)&&r3(rJ,e)?"fullwidth":!(e<8361)&&!(e>65518)&&r3(r0,e)?"halfwidth":!(e<32)&&!(e>10630)&&r3(r1,e)?"narrow":e>=r4&&e<=r9||!(e<4352)&&!(e>262141)&&r3(r2,e)?"wide":"neutral"}(e)}(e)){case"fullwidth":case"halfwidth":return!0;case"wide":return!/^\p{Emoji_Presentation}/u.test(String.fromCodePoint(e));case"narrow":return!1;case"ambiguous":return 917760<=e&&e<=917999&&null;case"neutral":return/^\p{sc=Hangul}/u.test(String.fromCodePoint(e))}}(e)){case null:return b.ivs;case!0:t|=b.cjk}}return r8(e)&&(t|=rZ.characterGroupPunctuation),t}function it(e,t,n){if(e!==b.nonEmojiGeneralUseVS)return e;let r=t(),i=ie(r);return!r||ir(i)?e:65025===n&&r&&!(r<8216)&&(8216===r||8217===r||8220===r||8221===r)?b.cjkPunctuation:i&~b.ivs}function ir(e){return!!(e&rZ.characterGroupWhitespace)}function ii(e){return(e&b.cjkPunctuation)===rZ.characterGroupPunctuation}function ia(e){return!!(e&b.cjk)}function io(e){return!!(e&b.spaceOrPunctuation)}function is(e){return!!(e&&e>=55296&&e<=56319)}function il(e){return!!(e&&e>=56320&&e<=57343)}function iu(e,t,n){if(t._bufferIndex<2)return e;let r=n({start:{...t,_bufferIndex:t._bufferIndex-2},end:t}).codePointAt(0);return r&&r>=65536?r:e}(e=>{e.spaceOrPunctuation=3,e.cjk=4096,e.cjkPunctuation=4098,e.ivs=8192,e.cjkOrIvs=12288,e.nonEmojiGeneralUseVS=16384,e.variationSelector=24576,e.ivsToCjkRightShift=1})(b||(b={}));var ic=class{constructor(e,t,n){this.previousCode=e,this.nowPoint=t,this.sliceSerialize=n,((e,t,n)=>((e,t,n)=>t in e?r5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n))(this,"cachedValue")}value(){return void 0===this.cachedValue&&(this.cachedValue=function(e,t,n){let r=e>=65536?2:1;if(t._bufferIndex<1+r)return null;let i=t._bufferIndex-r-2,a=n({start:{...t,_bufferIndex:i>=0?i:0},end:{...t,_bufferIndex:t._bufferIndex-r}}),o=a.charCodeAt(a.length-1);if(Number.isNaN(o))return null;if(a.length<2||o<56320||57343<o)return o;let s=a.codePointAt(0);return s&&s>=65536?s:o}(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function id(e,t,n){let r=n({start:t,end:{...t,_bufferIndex:t._bufferIndex+2}}).codePointAt(0);return r&&r>=65536?r:e}var ih=n(17032),ip=n(41006);let im={data:"data",characterEscape:"characterEscape",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",strong:"strong",strongSequence:"strongSequence",strongText:"strongText"};var ig={name:"attention",resolveAll:function(e,t){let n,r,i,a,o,s,l,u,c=-1;for(;++c<e.length;)if("enter"===e[c][0]&&"attentionSequence"===e[c][1].type&&e[c][1]._close){for(n=c;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[
1097n][1]).charCodeAt(0)===t.sliceSerialize(e[c][1]).charCodeAt(0)){if((e[n][1]._close||e[c][1]._open)&&(e[c][1].end.offset-e[c][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[c][1].end.offset-e[c][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[c][1].end.offset-e[c][1].start.offset>1?2:1;let d={...e[n][1].end},h={...e[c][1].start};iv(d,-s),iv(h,s),a={type:s>1?im.strongSequence:im.emphasisSequence,start:d,end:{...e[n][1].end}},o={type:s>1?im.strongSequence:im.emphasisSequence,start:{...e[c][1].start},end:h},i={type:s>1?im.strongText:im.emphasisText,start:{...e[n][1].end},end:{...e[c][1].start}},r={type:s>1?im.strong:im.emphasis,start:{...a.start},end:{...o.end}},e[n][1].end={...a.start},e[c][1].start={...o.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=(0,ih.V)(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=(0,ih.V)(l,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",i,t]]),(0,ej.ok)(t.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),l=(0,ih.V)(l,(0,ip.W)(t.parser.constructs.insideSpan.null,e.slice(n+1,c),t)),l=(0,ih.V)(l,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[c][1].end.offset-e[c][1].start.offset?(u=2,l=(0,ih.V)(l,[["enter",e[c][1],t],["exit",e[c][1],t]])):u=0,(0,ih.m)(e,n-1,c-n+3,l),c=n+l.length-u-2;break}}for(c=-1;++c<e.length;)"attentionSequence"===e[c][1].type&&(e[c][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,{now:i,sliceSerialize:a,previous:o}=this,s=il(o)?iu(o,i(),a):o,l=ie(s),u=new ic(s,i(),a),c=it(l,u.value.bind(u),s);return function(o){return(0,ej.ok)(o===rK.asterisk||o===rK.underscore,"expected asterisk or underscore"),n=o,e.enter("attentionSequence"),function o(l){if(l===n)return e.consume(l),o;let u=e.exit("attentionSequence"),d=ie(is(l)?id(l,i(),a):l);(0,ej.ok)(r,"expected `attentionMarkers` to be populated");let h=ii(c),p=h||ir(c),f=ii(d),m=f||ir(d),g=!!(c&b.cjkOrIvs),v=!m||f&&(p||g)||r.includes(l),y=!p||h&&(m||ia(d))||r.includes(s);return u._open=!!(n===rK.asterisk?v:v&&(io(c)||!y)),u._close=!!(n===rK.asterisk?y:y&&(io(d)||!v)),t(l)}(o)}}};function iv(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ib=n(27012),iy=n(95578),iE=n(79168);let iT={tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,o=0;return function(t){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(r){return 36===r?(e.consume(r),o++,t):o<2?n(r):(e.exit("mathFlowFenceSequence"),(0,iE.N)(e,s,"whitespace")(r))}(t)};function s(t){return null===t||(0,rX.HP)(t)?l(t):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(r){return null===r||(0,rX.HP)(r)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),l(r)):36===r?n(r):(e.consume(r),t)}(t))}function l(n){return(e.exit("mathFlowFence"),r.interrupt)?t(n):e.attempt(ik,u,h)(n)}function u(t){return e.attempt({tokenize:p,partial:!0},h,c)(t)}function c(t){return(a?(0,iE.N)(e,d,"linePrefix",a+1):d)(t)}function d(t){return null===t?h(t):(0,rX.HP)(t)?e.attempt(ik,u,h)(t):(e.enter("mathFlowValue"),function t(n){return null===n||(0,rX.HP)(n)?(e.exit("mathFlowValue"),d(n)):(e.consume(n),t)}(t))}function h(n){return e.exit("mathFlow"),t(n)}function p(e,t,n){let i=0;return(0,iE.N)(e,function(t){return e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(r){return 36===r?(i++,e.consume(r),t):i<o?n(r):(e.exit("mathFlowFenceSequence"),(0,iE.N)(e,a,"whitespace")(r))}(t)},"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function a(r){return null===r||(0,rX.HP)(r)?(e.exit("mathFlowFence"),t(r)):n(r)}}},concrete:!0,name:"mathFlow"},ik={tokenize:function(e,t,n){let r=this;return function(n){return null===n?t(n):(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),i)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}},partial:!0};function i_(e){let t,n,r=e.length-4,i=3;if(("lineEnding"===e[3][1].type||"space"===e[i][1].type)&&("lineEnding"===e[r][1].type||"space"===e[r][1].type)){for(t=i;++t<r;)if("mathTextData"===e[t][1].type){e[r][1].type="mathTextPadding",e[i][1].type="mathTextPadding",i+=2,r-=2;break}}for(t=i-1,r++;++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="mathTextData",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}function iA(e){return 36!==e||"characterEscape"===this.events[this.events.length-1][1].type}let ix={};function iw(e){let t,n=e||ix,r=this.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push({flow:{36:iT},text:{36:(null==(t=(n||{}).singleDollarTextMath)&&(t=!0),{tokenize:function(e,n,r){let i,a,o=0;return function(n){return e.enter("mathText"),e.enter("mathTextSequence"),function n(i){return 36===i?(e.consume(i),o++,n):o<2&&!t?r(i):(e.exit("mathTextSequence"),s(i))}(n)};function s(t){return null===t?r(t):36===t?(a=e.enter("mathTextSequence"),i=0,function t(r){return 36===r?(e.consume(r),i++,t):i===o?(e.exit("mathTextSequence"),e.exit("mathText"),n(r)):(a.type="mathTextData",l(r))}(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):(0,rX.HP)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("mathTextData"),l(t))}function l(t){return null===t||32===t||36===t||(0,rX.HP)(t)?(e.exit("mathTextData"),s(t)):(e.consume(t),l)}},resolve:i_,previous:iA,name:"mathText"})}}),a.push(function(){return{enter:{mathFlow:function(e){this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[{type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]}]}},e)},mathFlowFenceMeta:function(){this.buffer()},mathText:function(e){this.enter({type:"inlineMath",value:"",data:{hName:"
1097code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},e),this.buffer()}},exit:{mathFlow:function(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),n=this.stack[this.stack.length-1];(0,ej.ok)("math"===n.type),this.exit(e),n.value=t;let r=n.data.hChildren[0];(0,ej.ok)("element"===r.type),(0,ej.ok)("code"===r.tagName),r.children.push({type:"text",value:t}),this.data.mathFlowInside=void 0},mathFlowFence:function(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)},mathFlowFenceMeta:function(){let e=this.resume(),t=this.stack[this.stack.length-1];(0,ej.ok)("math"===t.type),t.meta=e},mathFlowValue:e,mathText:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];(0,ej.ok)("inlineMath"===n.type),this.exit(e),n.value=t,n.data.hChildren.push({type:"text",value:t})},mathTextData:e}};function e(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}()),o.push(function(e){let t=(e||{}).singleDollarTextMath;return null==t&&(t=!0),n.peek=function(){return"$"},{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:"\n",inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:function(e,t,n,r){let i=e.value||"",a=n.createTracker(r),o="$".repeat(Math.max((0,iy.D)(i,"$")+1,2)),s=n.enter("mathFlow"),l=a.move(o);if(e.meta){let t=n.enter("mathFlowMeta");l+=a.move(n.safe(e.meta,{after:"\n",before:l,encode:["$"],...a.current()})),t()}return l+=a.move("\n"),i&&(l+=a.move(i+"\n")),l+=a.move(o),s(),l},inlineMath:n}};function n(e,n,r){let i=e.value||"",a=1;for(!t&&a++;RegExp("(^|[^$])"+"\\$".repeat(a)+"([^$]|$)").test(i);)a++;let o="$".repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=" "+i+" ");let s=-1;for(;++s<r.unsafe.length;){let e,t=r.unsafe[s];if(!t.atBreak)continue;let n=r.compilePattern(t);for(;e=n.exec(i);){let t=e.index;10===i.codePointAt(t)&&13===i.codePointAt(t-1)&&t--,i=i.slice(0,t)+" "+i.slice(e.index+1)}}return o+i+o}}(n))}var iS=/(\*\*)([^*]*?)$/,iC=/(__)([^_]*?)$/,iI=/(\*\*\*)([^*]*?)$/,iN=/(\*)([^*]*?)$/,iO=/(_)([^_]*?)$/,iR=/(`)([^`]*?)$/,iD=/(~~)([^~]*?)$/,iL=/^[\s_~*`]*$/,iP=/^[\s]*[-*+][\s]+$/,iM=/[\p{L}\p{N}_]/u,iF=/^```[^`\n]*```?$/,iB=/^\*{4,}$/,ij=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||95===t||iM.test(e)},iU=e=>{let t=(e.match(/```/g)||[]).length;return t>0&&t%2==0&&e.includes(`
1098`)},iH=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if("\\"===e[i]&&"$"===e[i+1]){i+=1;continue}"$"===e[i]&&("$"===e[i+1]?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},i$=(e,t,n,r)=>!!("\\"===n||"*"===n||"*"===r||n&&r&&ij(n)&&ij(r)||((e,t,n)=>{if(" "!==n&&"	"!==n)return!1;let r=0;for(let n=t-1;n>=0;n-=1)if(e[n]===`
1099`){r=n+1;break}for(let n=r;n<t;n+=1)if(" "!==e[n]&&"	"!==e[n])return!1;return!0})(e,t,r)),iz=(e,t,n,r)=>!!("\\"===n||e.includes("$")&&iH(e,t)||"_"===n||"_"===r||n&&r&&ij(n)&&ij(r)),iG=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if("```"===e.substring(i,i+3)){r=!r,i+=2;continue}r||"`"!==e[i]||(n=!n)}return n||r},iY=(e,t)=>{let n="```"===e.substring(t,t+3),r=t>0&&"```"===e.substring(t-1,t+2),i=t>1&&"```"===e.substring(t-2,t+1);return n||r||i},iq=(e,t)=>{let n=t>0&&"!"===e[t-1];if(!e.substring(t+1).includes("]")||-1===((e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if("["===e[r])n+=1;else if("]"===e[r]&&0==(n-=1))return r;return -1})(e,t)){let r=e.substring(0,n?t-1:t);return n?r:`${e}](streamdown:incomplete-link)`}return null};let iV=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},iW=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var iK={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let iZ=(0,k.forwardRef)((e,t)=>{let{color:n="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:o="",children:s,iconNode:l,...u}=e;return(0,k.createElement)("svg",{ref:t,...iK,width:r,height:r,stroke:n,strokeWidth:a?24*Number(i)/Number(r):i,className:iW("lucide",o),...!s&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(u)&&{"aria-hidden":"true"},...u},[...l.map(e=>{let[t,n]=e;return(0,k.createElement)(t,n)}),...Array.isArray(s)?s:[s]])}),iX=(e,t)=>{let n=(0,k.forwardRef)((n,r)=>{let{className:i,...a}=n;return(0,k.createElement)(iZ,{ref:r,iconNode:t,className:iW("lucide-".concat(iV(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),i),...a}
1099)});return n.displayName=iV(e),n},iQ=iX("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),iJ=iX("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),i0=iX("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),i1=iX("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),i2=iX("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),i3=iX("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),i4=iX("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),i9=iX("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),i5=iX("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);var i8=n(2821),i6=n(75889),i7=n(95155),ae=n(35239),at=n(14733),an=n(7604),ar=n(29833);function ai(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var aa=ai(),ao={exec:()=>null};function as(e,t=""){let n="string"==typeof e?e:e.source,r={replace:(e,t)=>{let i="string"==typeof t?t:t.source;return i=i.replace(au.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var al=(()=>{try{return!!RegExp("(?<=1)(?<!1)")}catch{return!1}})(),au={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},ac=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ad=/(?:[*+-]|\d{1,9}[.)])/,ah=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ap=as(ah).replace(/bull/g,ad).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),af=as(ah).replace(/bull/g,ad).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),am=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ag=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,av=as(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ag).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ab=as(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ad).getRegex(),ay="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",aE=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,aT=as("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>
1099)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",aE).replace("tag",ay).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ak=as(am).replace("hr",ac).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ay).getRegex(),a_={blockquote:as(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ak).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:av,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:ac,html:aT,lheading:ap,list:ab,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:ak,table:ao,text:/^[^\n]+/},aA=as("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ac).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ay).getRegex(),ax={...a_,lheading:af,table:aA,paragraph:as(am).replace("hr",ac).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",aA).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ay).getRegex()},aw={...a_,html:as(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",aE).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ao,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:as(am).replace("hr",ac).replace("heading",` *#{1,6} *[^
1100]`).replace("lheading",ap).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},aS=/^( {2,}|\\)\n(?!\s*$)/,aC=/[\p{P}\p{S}]/u,aI=/[\s\p{P}\p{S}]/u,aN=/[^\s\p{P}\p{S}]/u,aO=as(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,aI).getRegex(),aR=/(?!~)[\p{P}\p{S}]/u,aD=as(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",al?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),aL=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,aP=as(aL,"u").replace(/punct/g,aC).getRegex(),aM=as(aL,"u").replace(/punct/g,aR).getRegex(),aF="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",aB=as(aF,"gu").replace(/notPunctSpace/g,aN).replace(/punctSpace/g,aI).replace(/punct/g,aC).getRegex(),aj=as(aF,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,aR).getRegex(),aU=as("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,aN).replace(/punctSpace/g,aI).replace(/punct/g,aC).getRegex(),aH=as(/\\(punct)/,"gu").replace(/punct/g,aC).getRegex(),a$=as(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),az=as(aE).replace("(?:--\x3e|$)","--\x3e").getRegex(),aG=as("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",az).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),aY=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,aq=as(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",aY).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),aV=as(/^!?\[(label)\]\[(ref)\]/).replace("label",aY).replace("ref",ag).getRegex(),aW=as(/^!?\[(ref)\](?:\[\])?/).replace("ref",ag).getRegex(),aK=as("reflink|nolink(?!\\()","g").replace("reflink",aV).replace("nolink",aW).getRegex(),aZ=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,aX={_backpedal:ao,anyPunctuation:aH,autolink:a$,blockSkip:aD,br:aS,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:ao,emStrongLDelim:aP,emStrongRDelimAst:aB,emStrongRDelimUnd:aU,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:aq,nolink:aW,punctuation:aO,reflink:aV,reflinkSearch:aK,tag:aG,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:ao},aQ={...aX,link:as(/^!?\[(label)\]\((.*?)\)/).replace("label",aY).getRegex(),reflink:as(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",aY).getRegex()},aJ={...aX,emStrongRDelimAst:aj,emStrongLDelim:aM,url:as(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",aZ).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:as(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",aZ).getRegex()},a0={...aJ,br:as(aS).replace("{2,}","*").getRegex(),text:as(aJ.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},a1={normal:a_,gfm:ax,pedantic:aw},a2={normal:aX,gfm:aJ,breaks:a0,pedantic:aQ},a3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},a4=e=>a3[e];function a9(e,t){if(t){if(au.escapeTest.test(e))return e.replace(au.escapeReplace,a4)}else if(au.escapeTestNoEncode.test(e))return e.replace(au.escapeReplaceNoEncode,a4);return e}function a5(e){try{e=encodeURI(e).replace(au.percentDecode,"%")}catch{return null}return e}function a8(e,t){let n=e.replace(au.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(au.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(au.slashPipe,"|");return n}function a6(e,t,n){let r=e.length;if(0===r)return"";let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a!==t||n)if(a!==t&&n)i++;else break;else i++}return e.slice(0,r-i)}function a7(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}var oe=class{options;rules;lexer;constructor(e){this.options=e||aa}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:a6(e,`
1101`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=function(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(null===r)return t;let i=r[1];return t.split(`
1102`).map(e=>{let t=e.match(n.other.beginningSpace);if(null===t)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
1103`)}(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=a6(e,"#");(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:a6(t[0],`
1104`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=a6(t[0],`
1105`).split(`
1106`),n="",r="",i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(t)break;else a.push(e[o]);e=e.slice(o);let s=a.join(`
1107`),l=s.replace(this.rules.other.blockquoteSetextReplace,`
1108    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
1109${s}`:s,r=r?`${r}
1110${l}`:l;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=u,0===e.length)break;let c=i.at(-1);if(c?.type==="code")break;if(c?.type==="blockquote"){let t=c.raw+`
1111`+e.join(`
1112`),a=this.blockquote(t);i[i.length-1]=a,n=n.substring(0,n.length-c.raw.length)+a.raw,r=r.substring(0,r.length-c.text.length)+a.text;break}if(c?.type==="list"){let t=c.raw+`
1113`+e.join(`
1114`),a=this.list(t);i[i.length-1]=a,n=n.substring(0,n.length-c.raw.length)+a.raw,r=r.substring(0,r.length-c.raw.length)+a.raw,e=t.substring(i.at(-1).raw.length).split(`
1115`);continue}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);
1115if(t){let n=t[1].trim(),r=n.length>1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r="",s="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split(`
1116`,1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),u=e.split(`
1117`,1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):c?d=t[1].length+1:(d=(d=t[2].search(this.rules.other.nonSpaceChar))>4?1:d,s=l.slice(d),d+=t[1].length),c&&this.rules.other.blankLine.test(u)&&(r+=u+`
1118`,e=e.substring(u.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let h=e.split(`
1119`,1)[0],p;if(u=h,p=this.options.pedantic?u=u.replace(this.rules.other.listReplaceNesting,"  "):u.replace(this.rules.other.tabCharGlobal,"    "),i.test(u)||a.test(u)||o.test(u)||t.test(u)||n.test(u))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!u.trim())s+=`
1120`+p.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||i.test(l)||a.test(l)||n.test(l))break;s+=`
1121`+u}c||u.trim()||(c=!0),r+=h+`
1122`,e=e.substring(h.length+1),l=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let h=null,p;this.options.gfm&&(h=this.rules.other.listIsTask.exec(s))&&(p="[ ] "!==h[0],s=s.replace(this.rules.other.listReplaceTask,"")),i.items.push({type:"list_item",raw:r,task:!!h,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>"space"===e.type);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=a8(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
1123`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(a8(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
1124`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=a6(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{let e=function(e,t){if(-1===e.indexOf(")"))return -1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if("("===e[r])n++;else if(e[r]===t[1]&&--n<0)return r;return n>0?-2:-1}(t[2],"()");if(-2===e)return;if(e>-1){let n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),a7(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return a7(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=l.exec(t));){if(!(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6]))continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if((o-=a)>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let u=l.slice(2,-2);return{type:"strong",raw:l,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return n="@"===t[2]?"mailto:"+(e=t[1]):e=t[1],{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if("@"===t[2])n="mailto:"+(e=t[0]);else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);e=t[0],n="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},ot=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||aa,this.options.tokenizer=this.options.tokenizer||new oe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:au,block:a1.normal,inline:a2.normal};this.options.pedantic?(t.block=a1.pedantic,t.inline=a2.pedantic):this.options.gfm&&(t.block=a1.gfm,this.options.breaks?t.inline=a2.breaks:t.inline=a2.gfm),this.tokenizer.rules=t}static get rules(){return{block:a1,inline:a2}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(au.carriageReturn,`
1125`),this.blockTokens(e,this.tokens);for(let e=0;
1125e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(au.tabCharGlobal,"    ").replace(au.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some(n=>!!(r=n.call({lexer:this},e,t))&&(e=e.substring(r.raw.length),t.push(r),!0)))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);1===r.raw.length&&void 0!==n?n.raw+=`
1126`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type==="paragraph"||n?.type==="text"?(n.raw+=(n.raw.endsWith(`
1127`)?"":`
1128`)+r.raw,n.text+=`
1129`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if((r=this.tokenizer.fences(e))||(r=this.tokenizer.heading(e))||(r=this.tokenizer.hr(e))||(r=this.tokenizer.blockquote(e))||(r=this.tokenizer.list(e))||(r=this.tokenizer.html(e))){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type==="paragraph"||n?.type==="text"?(n.raw+=(n.raw.endsWith(`
1130`)?"":`
1131`)+r.raw,n.text+=`
1132`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if((r=this.tokenizer.table(e))||(r=this.tokenizer.lheading(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(r=e.call({lexer:this},n))&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
1133`)?"":`
1134`)+r.raw,a.text+=`
1135`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type==="text"?(n.raw+=(n.raw.endsWith(`
1136`)?"":`
1137`)+r.raw,n.text+=`
1138`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,r=e,i=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(r));)e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.anyPunctuation.exec(r));)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(r));)n=i[2]?i[2].length:0,r=r.slice(0,i.index+n)+"["+"a".repeat(i[0].length-n-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,o="";for(;e;){let n;if(a||(o=""),a=!1,this.options.extensions?.inline?.some(r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))continue;if((n=this.tokenizer.escape(e))||(n=this.tokenizer.tag(e))||(n=this.tokenizer.link(e))){e=e.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(n.raw.length);let r=t.at(-1);"text"===n.type&&r?.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if((n=this.tokenizer.emStrong(e,r,o))||(n=this.tokenizer.codespan(e))||(n=this.tokenizer.br(e))||(n=this.tokenizer.del(e))||(n=this.tokenizer.autolink(e))||!this.state.inLink&&(n=this.tokenizer.url(e))){e=e.substring(n.raw.length),t.push(n);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{"number"==typeof(r=e.call({lexer:this},n))&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i)){e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),a=!0;let r=t.at(-1);r?.type==="text"?(r.raw+=n.raw,r.text+=n.text):t.push(n);continue}if(e){let t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},on=class{options;parser;constructor(e){this.options=e||aa}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(au.notSpaceStart)?.[0],i=e.replace(au.endingNewline,"")+`
1139`;return r?'<pre><code class="language-'+a9(r)+'">'+(n?i:a9(i,!0))+`</code></pre>
1140`:"<pre><code>"+(n?i:a9(i,!0))+`</code></pre>
1141`}blockquote({tokens:e}){return`<blockquote>
1142${this.parser.parse(e)}</blockquote>
1143`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
1144`}hr(e){return`<hr>
1145`}list(e){let t=e.ordered,n=e.start,r="";for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?"ol":"ul";return"<"+i+(t&&1!==n?' start="'+n+'"':"")+`>
1146`+r+"</"+i+`>
1147`}listitem(e){let t="";if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=n+" "+a9(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
1148`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
1149`}table(e){let t="",n="";for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r="";for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n="";for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
1150<thead>
1151`+t+`</thead>
1152`+r+`</table>
1153`}tablerow({text:e}){return`<tr>
1154${e}</tr>
1155`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
1156`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${a9(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=a5(e);if(null===i)return r;let a='<a href="'+(e=i)+'"';return t&&(a+=' title="'+a9(t)+'"'),a+=">"+r+"</a>"}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=a5(e);if(null===i)return a9(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${a9(t)}"`),a+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:a9(e.text)}},or=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},oi=class e{options;renderer;textRenderer;constructor(e){this.options=e||aa,this.options.renderer=this.options.renderer||new on,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new or}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(i.type)){n+=e||"";continue}}switch(i.type){case"space":n+=this.renderer.space(i);continue;case"hr":n+=this.renderer.hr(i);continue;case"heading":n+=this.renderer.heading(i);continue;case"code":n+=this.renderer.code(i);continue;case"table":n+=this.renderer.table(i);continue;case"blockquote":n+=this.renderer.blockquote(i);continue;case"list":n+=this.renderer.list(i);continue;case"html":n+=this.renderer.html(i);continue;case"def":n+=this.renderer.def(i);continue;case"paragraph":n+=this.renderer.paragraph(i);continue;case"text":{let a=i,o=this.renderer.text(a);for(;r+1<e.length&&"text"===e[r+1].type;)a=e[++r],o+=`
1157`+this.renderer.text(a);t?n+=this.renderer.paragraph({type:"paragraph",raw:o,text:o,tokens:[{type:"text",raw:o,text:o,escaped:!0}]}):n+=o;continue}default:{let e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return n}parseInline(e,t=this.renderer){let n="";for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=e||"";continue}}switch(i.type){case"escape":case"text":n+=t.text(i);break;case"html":n+=t.html(i);break;case"link":n+=t.link(i);break;case"image":n+=t.image(i);break;case"strong":n+=t.strong(i);break;case"em":n+=t.em(i);break;case"codespan":n+=t.codespan(i);break;case"br":n+=t.br(i);break;case"del":n+=t.del(i);break;default:{let e='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw Error(e)}}}return n}},oa=class{options;block;constructor(e){this.options=e||aa}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ot.lex:ot.lexInline}provideParser(){return this.block?oi.parse:oi.parseInline}},oo=new class{defaults=ai();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=oi;
1157Renderer=on;TextRenderer=or;Lexer=ot;Tokenizer=oe;Hooks=oa;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case"table":for(let e of r.header)n=n.concat(this.walkTokens(e.tokens,t));for(let e of r.rows)for(let r of e)n=n.concat(this.walkTokens(r.tokens,t));break;case"list":n=n.concat(this.walkTokens(r.items,t));break;default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error("extension name required");if("renderer"in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw Error("extension level must be 'block' or 'inline'");let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new on(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let r=e.renderer[n],i=t[n];t[n]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new oe(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let r=e.tokenizer[n],i=t[n];t[n]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new oa;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let r=e.hooks[n],i=t[n];oa.passThroughHooks.has(n)?t[n]=e=>{if(this.defaults.async&&oa.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await r.call(t,e);return i.call(t,n)})();let a=r.call(t,e);return i.call(t,a)}:t[n]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await r.apply(t,e);return!1===n&&(n=await i.apply(t,e)),n})();let n=r.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ot.lex(e,t??this.defaults)}parser(e,t){return oi.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return a(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||null===t)return a(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return a(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await (i.hooks?await i.hooks.provideLexer():e?ot.lex:ot.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await (i.hooks?await i.hooks.provideParser():e?oi.parse:oi.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?ot.lex:ot.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?oi.parse:oi.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
1158Please report this to https://github.com/markedjs/marked.`,e){let e="<p>An error occurred:</p><pre>"+a9(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function os(e,t){return oo.parse(e,t)}os.options=os.setOptions=function(e){return oo.setOptions(e),os.defaults=oo.defaults,aa=os.defaults,os},os.getDefaults=ai,os.defaults=aa,os.use=function(...e){return oo.use(...e),os.defaults=oo.defaults,aa=os.defaults,os},os.walkTokens=function(e,t){return oo.walkTokens(e,t)},os.parseInline=oo.parseInline,os.Parser=oi,os.parser=oi.parse,os.Renderer=on,os.TextRenderer=or,os.Lexer=ot,os.lexer=ot.lex,os.Tokenizer=oe,os.Hooks=oa,os.parse=os,os.options,os.setOptions,os.use,os.walkTokens,os.parseInline,oi.parse,ot.lex;var ol=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,i6.QP)((0,i8.$)(t))},ou=(e,t,n)=>{let r="string"==typeof t?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},oc=(0,k.createContext)({code:""}),od=()=>(0,k.useContext)(oc),oh=e=>{let{onCopy:t,onError:n,timeout:r=2e3,children:i,className:a,code:o,...s}=e,[l,u]=(0,k.useState)(!1),c=(0,k.useRef)(0),{code:d}=od(),{isAnimating:h}=(0,k.useContext)(sm),p=null!=o?o:d,f=async()=>{var e;if("undefined"==typeof window||!(null!=(e=null==navigator?void 0:navigator.clipboard)&&e.writeText)){null==n||n(Error("Clipboard API not available"));return}try{l||(await navigator.clipboard.writeText(p),u(!0),null==t||t(),c.current=window.setTimeout(()=>u(!1),r))}catch(e){null==n||n(e)}};return(0,k.useEffect)(()=>()=>{window.clearTimeout(c.current)},[]),(0,i7.jsx)("button",{className:ol("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),"data-streamdown":"code-block-copy-button",disabled:h,onClick:f,title:"Copy Code",type:"button",...s,children:null!=i?i:(0,i7.jsx)(l?iQ:iJ,{size:14})})},op={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",da
1158x:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},of=e=>{let{onDownload:t,onError:n,language:r,children:i,className:a,code:o,...s}=e,{code:l}=od(),{isAnimating:u}=(0,k.useContext)(sm),c=null!=o?o:l,d="file.".concat(r&&r in op?op[r]:"txt");return(0,i7.jsx)("button",{className:ol("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),"data-streamdown":"code-block-download-button",disabled:u,onClick:()=>{try{ou(d,c,"text/plain"),null==t||t()}catch(e){null==n||n(e)}},title:"Download file",type:"button",...s,children:null!=i?i:(0,i7.jsx)(i0,{size:14})})},om=()=>(0,i7.jsxs)("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[(0,i7.jsx)("div",{className:"h-[46px] w-full bg-muted/80"}),(0,i7.jsx)("div",{className:"flex w-full items-center justify-center p-4",children:(0,i7.jsx)(i1,{className:"size-4 animate-spin"})})]}),og=/\.[^/.]+$/,ov=async e=>{let t={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0,...e},r=(await Promise.all([n.e(2941),n.e(2995),n.e(8610),n.e(8499)]).then(n.bind(n,84725))).default;return r.initialize(t),r},ob=e=>{let{chart:t,children:n,className:r,onDownload:i,config:a,onError:o}=e,[s,l]=(0,k.useState)(!1),u=(0,k.useRef)(null),{isAnimating:c}=(0,k.useContext)(sm),d=async e=>{try{if("mmd"===e){ou("diagram.mmd",t,"text/plain"),l(!1),null==i||i(e);return}let r=await ov(a),s=t.split("").reduce((e,t)=>
1158(e<<5)-e+t.charCodeAt(0)|0,0),u="mermaid-".concat(Math.abs(s),"-").concat(Date.now(),"-").concat(Math.random().toString(36).substring(2,9)),{svg:c}=await r.render(u,t);if(!c){null==o||o(Error("SVG not found. Please wait for the diagram to render."));return}if("svg"===e){ou("diagram.svg",c,"image/svg+xml"),l(!1),null==i||i(e);return}if("png"===e){var n;let t=await (n=c,new Promise((e,t)=>{let r="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n))),i=new Image;i.crossOrigin="anonymous",i.onload=()=>{let n=document.createElement("canvas"),r=5*i.width,a=5*i.height;n.width=r,n.height=a;let o=n.getContext("2d");if(!o)return void t(Error("Failed to create 2D canvas context for PNG export"));o.drawImage(i,0,0,r,a),n.toBlob(n=>{if(!n)return void t(Error("Failed to create PNG blob"));e(n)},"image/png")},i.onerror=()=>t(Error("Failed to load SVG image")),i.src=r}));ou("diagram.png",t,"image/png"),null==i||i(e),l(!1);return}}catch(e){null==o||o(e)}};return(0,k.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,i7.jsxs)("div",{className:"relative",ref:u,children:[(0,i7.jsx)("button",{className:ol("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:c,onClick:()=>l(!s),title:"Download diagram",type:"button",children:null!=n?n:(0,i7.jsx)(i0,{size:14})}),s&&(0,i7.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,i7.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),(0,i7.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),(0,i7.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]})]})},oy=0,oE=e=>{let{chart:t,config:n,onFullscreen:r,onExit:i,className:a,...o}=e,[s,l]=(0,k.useState)(!1),{isAnimating:u,controls:c}=(0,k.useContext)(sm),d=(()=>{if("boolean"==typeof c)return c;let e=c.mermaid;return!1!==e&&(!0===e||void 0===e||!1!==e.panZoom)})(),h=()=>{l(!s)};return(0,k.useEffect)(()=>{if(s){1===(oy+=1)&&(document.body.style.overflow="hidden");let e=e=>{"Escape"===e.key&&l(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e),0===(oy=Math.max(0,oy-1))&&(document.body.style.overflow="")}}},[s]),(0,k.useEffect)(()=>{s?null==r||r():i&&i()},[s,r,i]),(0,i7.jsxs)(i7.Fragment,{children:[(0,i7.jsx)("button",{className:ol("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),disabled:u,onClick:h,title:"View fullscreen",type:"button",...o,children:(0,i7.jsx)(i2,{size:14})}),s&&(0,i7.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:h,onKeyDown:e=>{"Escape"===e.key&&h()},role:"button",tabIndex:0,children:[(0,i7.jsx)("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:h,title:"Exit fullscreen",type:"button",children:(0,i7.jsx)(i3,{size:20})}),(0,i7.jsx)("div",{className:"flex h-full w-full items-center justify-center p-4",onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:"presentation",children:(0,i7.jsx)(sE,{chart:t,className:"h-full w-full [&>div]:h-full [&>div]:overflow-hidden [&_svg]:h-auto [&_svg]:w-auto",config:n,fullscreen:!0,showControls:d})})]})]})},oT=e=>{var t,n;let r=[],i=[];for(let n of e.querySelectorAll("thead th"))r.push((null==(t=n.textContent)?void 0:t.trim())||"");for(let t of e.querySelectorAll("tbody tr")){let e=[];
1158for(let r of t.querySelectorAll("td"))e.push((null==(n=r.textContent)?void 0:n.trim())||"");i.push(e)}return{headers:r,rows:i}},ok=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r=0;r<e.length;r+=1){let i=e[r];if('"'===i){t=!0,n=!0;break}(","===i||"\n"===i)&&(t=!0)}return t?n?'"'.concat(e.replace(/"/g,'""'),'"'):'"'.concat(e,'"'):e},i=Array(t.length>0?n.length+1:n.length),a=0;for(let e of(t.length>0&&(i[a]=t.map(r).join(","),a+=1),n))i[a]=e.map(r).join(","),a+=1;return i.join("\n")},o_=e=>{let t=!1;for(let n=0;n<e.length;n+=1){let r=e[n];if("\\"===r||"|"===r){t=!0;break}}if(!t)return e;let n=[];for(let t=0;t<e.length;t+=1){let r=e[t];"\\"===r?n.push("\\\\"):"|"===r?n.push("\\|"):n.push(r)}return n.join("")},oA=e=>{let{children:t,className:n,onCopy:r,onError:i,timeout:a=2e3}=e,[o,s]=(0,k.useState)(!1),[l,u]=(0,k.useState)(!1),c=(0,k.useRef)(null),d=(0,k.useRef)(0),{isAnimating:h}=(0,k.useContext)(sm),p=async e=>{var t,n;if("undefined"==typeof window||!(null!=(t=null==navigator?void 0:navigator.clipboard)&&t.write)){null==i||i(Error("Clipboard API not available"));return}try{let t=null==(n=c.current)?void 0:n.closest('[data-streamdown="table-wrapper"]'),o=null==t?void 0:t.querySelector("table");if(!o){null==i||i(Error("Table not found"));return}let l=oT(o),h="csv"===e?ok(l):(e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n=0;n<e.length;n+=1){let r=e[n];if("	"===r||"\n"===r||"\r"===r){t=!0;break}}if(!t)return e;let n=[];for(let t=0;t<e.length;t+=1){let r=e[t];"	"===r?n.push("\\t"):"\n"===r?n.push("\\n"):"\r"===r?n.push("\\r"):n.push(r)}return n.join("")},i=Array(t.length>0?n.length+1:n.length),a=0;for(let e of(t.length>0&&(i[a]=t.map(r).join("	"),a+=1),n))i[a]=e.map(r).join("	"),a+=1;return i.join("\n")})(l),p=new ClipboardItem({"text/plain":new Blob([h],{type:"text/plain"}),"text/html":new Blob([o.outerHTML],{type:"text/html"})});await navigator.clipboard.write([p]),u(!0),s(!1),null==r||r(e),d.current=window.setTimeout(()=>u(!1),a)}catch(e){null==i||i(e)}};return(0,k.useEffect)(()=>{let e=e=>{c.current&&!c.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e),window.clearTimeout(d.current)}},[]),(0,i7.jsxs)("div",{className:"relative",ref:c,children:[(0,i7.jsx)("button",{className:ol("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:h,onClick:()=>s(!o),title:"Copy table",type:"button",children:null!=t?t:(0,i7.jsx)(l?iQ:iJ,{size:14})}),o&&(0,i7.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,i7.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),(0,i7.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>p("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]})]})},ox=e=>{let{children:t,className:n,onDownload:r,onError:i}=e,[a,o]=(0,k.useState)(!1),s=(0,k.useRef)(null),{isAnimating:l}=(0,k.useContext)(sm),u=e=>{var t;try{let n=null==(t=s.current)?void 0:t.closest('[data-streamdown="table-wrapper"]'),a=null==n?void 0:n.querySelector("table");if(!a){null==i||i(Error("Table not found"));return}let l=oT(a),u="csv"===e?ok(l):(e=>{let{headers:t,rows:n}=e;if(0===t.length)return"";let r=Array(n.length+2),i=0,a=t.map(e=>o_(e));r[i]="| ".concat(a.join(" | ")," |"),i+=1;let o=Array(t.length);for(let e=0;e<t.length;e+=1)o[e]="---";for(let e of(r[i]="| ".concat(o.join(" | ")," |"),i+=1,n))if(e.length<t.length){let n=Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=r<e.length?o_(e[r]):"";r[i]="| ".concat(n.join(" | ")," |"),i+=1}else{let t=e.map(e=>o_(e));r[i]="| ".concat(t.join(" | ")," |"),i+=1}return r.join("\n")})(l);ou("table.".concat("csv"===e?"csv":"md"),u,"csv"===e?"text/csv":"text/markdown"),o(!1),null==r||r(e)}catch(e){null==i||i(e)}};return(0,k.useEffect)(()=>{let e=e=>{s.current&&!s.current.contains(e.target)&&o(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,i7.jsxs)("div",{className:"relative",ref:s,children:[(0,i7.jsx)("button",{className:ol("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:l,onClick:()=>o(!a),title:"Download table",type:"button",children:null!=t?t:(0,i7.jsx)(i0,{size:14})}),a&&(0,i7.jsxs)("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[(0,i7.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),(0,i7.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]})]})},ow=e=>{let{children:t,className:n,showControls:r,...i}=e;return(0,i7.jsxs)("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[r&&(0,i7.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,i7.jsx)(oA,{}),(0,i7.jsx)(ox,{})]}),(0,i7.jsx)("div",{className:"overflow-x-auto",children:(0,i7.jsx)("table",{className:ol("w-full border-collapse border border-border",n),"data-streamdown":"table",...i,children:t})})]})},oS=(0,k.lazy)(()=>n.e(2098).then(n.bind(n,82098)).then(e=>({default:e.CodeBlock}))),oC=(0,k.lazy)(()=>n.e(2637).then(n.bind(n,92637)).then(e=>({default:e.Mermaid}))),oI=/language-([^\s]+)/;function oN(e,t){if(!(null!=e&&e.position||null!=t&&t.position))return!0;
1158if(!(null!=e&&e.position&&null!=t&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return(null==n?void 0:n.line)===(null==r?void 0:r.line)&&(null==n?void 0:n.column)===(null==r?void 0:r.column)&&(null==i?void 0:i.line)===(null==a?void 0:a.line)&&(null==i?void 0:i.column)===(null==a?void 0:a.column)}function oO(e,t){return e.className===t.className&&oN(e.node,t.node)}var oR=(e,t)=>"boolean"==typeof e?e:!1!==e[t],oD=(e,t)=>{if("boolean"==typeof e)return e;let n=e.mermaid;return!1!==n&&(!0===n||void 0===n||!1!==n[t])},oL=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("ol",{className:ol("list-inside list-decimal whitespace-normal",n),"data-streamdown":"ordered-list",...i,children:t})},(e,t)=>oO(e,t));oL.displayName="MarkdownOl";var oP=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("li",{className:ol("py-1 [&>p]:inline",n),"data-streamdown":"list-item",...i,children:t})},(e,t)=>e.className===t.className&&oN(e.node,t.node));oP.displayName="MarkdownLi";var oM=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("ul",{className:ol("list-inside list-disc whitespace-normal",n),"data-streamdown":"unordered-list",...i,children:t})},(e,t)=>oO(e,t));oM.displayName="MarkdownUl";var oF=(0,k.memo)(e=>{let{className:t,node:n,...r}=e;return(0,i7.jsx)("hr",{className:ol("my-6 border-border",t),"data-streamdown":"horizontal-rule",...r})},(e,t)=>oO(e,t));oF.displayName="MarkdownHr";var oB=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("span",{className:ol("font-semibold",n),"data-streamdown":"strong",...i,children:t})},(e,t)=>oO(e,t));oB.displayName="MarkdownStrong";var oj=(0,k.memo)(e=>{let{children:t,className:n,href:r,node:i,...a}=e;return(0,i7.jsx)("a",{className:ol("wrap-anywhere font-medium text-primary underline",n),"data-incomplete":"streamdown:incomplete-link"===r,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...a,children:t})},(e,t)=>oO(e,t)&&e.href===t.href);oj.displayName="MarkdownA";var oU=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("h1",{className:ol("mt-6 mb-2 font-semibold text-3xl",n),"data-streamdown":"heading-1",...i,children:t})},(e,t)=>oO(e,t));oU.displayName="MarkdownH1";var oH=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("h2",{className:ol("mt-6 mb-2 font-semibold text-2xl",n),"data-streamdown":"heading-2",...i,children:t})},(e,t)=>oO(e,t));oH.displayName="MarkdownH2";var o$=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("h3",{className:ol("mt-6 mb-2 font-semibold text-xl",n),"data-streamdown":"heading-3",...i,children:t})},(e,t)=>oO(e,t));o$.displayName="MarkdownH3";var oz=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("h4",{className:ol("mt-6 mb-2 font-semibold text-lg",n),"data-streamdown":"heading-4",...i,children:t})},(e,t)=>oO(e,t));oz.displayName="MarkdownH4";var oG=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("h5",{className:ol("mt-6 mb-2 font-semibold text-base",n),"data-streamdown":"heading-5",...i,children:t})},(e,t)=>oO(e,t));oG.displayName="MarkdownH5";var oY=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("h6",{className:ol("mt-6 mb-2 font-semibold text-sm",n),"data-streamdown":"heading-6",...i,children:t})},(e,t)=>oO(e,t));oY.displayName="MarkdownH6";var oq=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e,{controls:a}=(0,k.useContext)(sm),o=oR(a,"table");return(0,i7.jsx)(ow,{className:n,"data-streamdown":"table-wrapper",showControls:o,...i,children:t})},(e,t)=>oO(e,t));oq.displayName="MarkdownTable";var oV=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("thead",{className:ol("bg-muted/80",n),"data-streamdown":"table-header",...i,children:t})},(e,t)=>oO(e,t));oV.displayName="MarkdownThead";var oW=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("tbody",{className:ol("divide-y divide-border bg-muted/40",n),"data-streamdown":"table-body",...i,children:t})},(e,t)=>oO(e,t));oW.displayName="MarkdownTbody";var oK=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("tr",{className:ol("border-border border-b",n),"data-streamdown":"table-row",...i,children:t})},(e,t)=>oO(e,t));oK.displayName="MarkdownTr";var oZ=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("th",{className:ol("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",n),"data-streamdown":"table-header-cell",...i,children:t})},(e,t)=>oO(e,t));oZ.displayName="MarkdownTh";var oX=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("td",{className:ol("px-4 py-2 text-sm",n),"data-streamdown":"table-cell",...i,children:t})},(e,t)=>oO(e,t));oX.displayName="MarkdownTd";var oQ=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("blockquote",{className:ol("my-4 border-muted-foreground
1158/30 border-l-4 pl-4 text-muted-foreground italic",n),"data-streamdown":"blockquote",...i,children:t})},(e,t)=>oO(e,t));oQ.displayName="MarkdownBlockquote";var oJ=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("sup",{className:ol("text-sm",n),"data-streamdown":"superscript",...i,children:t})},(e,t)=>oO(e,t));oJ.displayName="MarkdownSup";var o0=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,i7.jsx)("sub",{className:ol("text-sm",n),"data-streamdown":"subscript",...i,children:t})},(e,t)=>oO(e,t));o0.displayName="MarkdownSub";var o1=(0,k.memo)(e=>{let{children:t,className:n,node:r,...i}=e;if("data-footnotes"in i){let e=Array.isArray(t)?t.map(e=>{if(!(0,k.isValidElement)(e))return e;if(e.type===oL){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!(e=>{var t,n;if(!(0,k.isValidElement)(e))return!1;let r=Array.isArray(e.props.children)?e.props.children:[e.props.children],i=!1,a=!1;for(let e of r)if(e){if("string"==typeof e)""!==e.trim()&&(i=!0);else if((0,k.isValidElement)(e)){if((null==(t=e.props)?void 0:t["data-footnote-backref"])!==void 0)a=!0;else for(let t of Array.isArray(e.props.children)?e.props.children:[e.props.children])if("string"==typeof t&&""!==t.trim()||(0,k.isValidElement)(t)&&(null==(n=t.props)?void 0:n["data-footnote-backref"])===void 0){i=!0;break}}}return a&&!i})(e));return 0===t.length?null:{...e,props:{...e.props,children:t}}}return e}):t;return(Array.isArray(e)?e.some(e=>null!==e):null!==e)?(0,i7.jsx)("section",{className:n,...i,children:e}):null}return(0,i7.jsx)("section",{className:n,...i,children:t})},(e,t)=>oO(e,t));o1.displayName="MarkdownSection";var o2=(0,k.memo)(e=>{var t,n,r;let{node:i,className:a,children:o,...s}=e,l=(null==(t=null==i?void 0:i.position)?void 0:t.start.line)===(null==(n=null==i?void 0:i.position)?void 0:n.end.line),{mermaid:u,controls:c}=(0,k.useContext)(sm);if(l)return(0,i7.jsx)("code",{className:ol("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",a),"data-streamdown":"inline-code",...s,children:o});let d=null==a?void 0:a.match(oI),h=null!=(r=null==d?void 0:d.at(1))?r:"",p="";if((0,k.isValidElement)(o)&&o.props&&"object"==typeof o.props&&"children"in o.props&&"string"==typeof o.props.children?p=o.props.children:"string"==typeof o&&(p=o),"mermaid"===h){let e=oR(c,"mermaid"),t=oD(c,"download"),n=oD(c,"copy"),r=oD(c,"fullscreen"),i=oD(c,"panZoom");return(0,i7.jsx)(k.Suspense,{fallback:(0,i7.jsx)(om,{}),children:(0,i7.jsxs)("div",{className:ol("group relative my-4 h-auto rounded-xl border p-4",a),"data-streamdown":"mermaid-block",children:[e&&(t||n||r)&&(0,i7.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[t&&(0,i7.jsx)(ob,{chart:p,config:null==u?void 0:u.config}),n&&(0,i7.jsx)(oh,{code:p}),r&&(0,i7.jsx)(oE,{chart:p,config:null==u?void 0:u.config})]}),(0,i7.jsx)(oC,{chart:p,config:null==u?void 0:u.config,showControls:i})]})})}let f=oR(c,"code");return(0,i7.jsx)(k.Suspense,{fallback:(0,i7.jsx)(om,{}),children:(0,i7.jsx)(oS,{className:ol("overflow-x-auto border-border border-t",a),code:p,language:h,children:f&&(0,i7.jsxs)(i7.Fragment,{children:[(0,i7.jsx)(of,{code:p,language:h}),(0,i7.jsx)(oh,{})]})})})},(e,t)=>e.className===t.className&&oN(e.node,t.node));o2.displayName="MarkdownCode";var o3=(0,k.memo)(e=>{let{node:t,className:n,src:r,alt:i,...a}=e,o=async()=>{if(r)try{let e=await (await fetch(r)).blob(),t=new URL(r,window.location.origin).pathname.split("/").pop()||"",n=t.split(".").pop(),a=t.includes(".")&&void 0!==n&&n.length<=4,o="";if(a)o=t;else{let n=e.type,r="png";n.includes("jpeg")||n.includes("jpg")?r="jpg":n.includes("png")?r="png":n.includes("svg")?r="svg":n.includes("gif")?r="gif":n.includes("webp")&&(r="webp"),o="".concat((i||t||"image").replace(og,""),".").concat(r)}ou(o,e,e.type)}catch(e){console.error("Failed to download image:",e)}};return r?(0,i7.jsxs)("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[(0,i7.jsx)("img",{alt:i,className:ol("max-w-full rounded-lg",n),"data-streamdown":"image",src:r,...a}),(0,i7.jsx)("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),(0,i7.jsx)("button",{className:ol("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:o,title:"Download image",type:"button",children:(0,i7.jsx)(i0,{size:14})})]}):null},(e,t)=>e.className===t.className&&oN(e.node,t.node));o3.displayName="MarkdownImg";var o4=(0,k.memo)(e=>{var t;
1158let{children:n,className:r,node:i,...a}=e,o=(Array.isArray(n)?n:[n]).filter(e=>null!=e&&""!==e);return 1===o.length&&(0,k.isValidElement)(o[0])&&(null==(t=o[0].props.node)?void 0:t.tagName)==="img"?(0,i7.jsx)(i7.Fragment,{children:n}):(0,i7.jsx)("p",{className:r,...a,children:n})},(e,t)=>oO(e,t));o4.displayName="MarkdownParagraph";var o9={ol:oL,li:oP,ul:oM,hr:oF,strong:oB,a:oj,h1:oU,h2:oH,h3:o$,h4:oz,h5:oG,h6:oY,table:oq,thead:oV,tbody:oW,tr:oK,th:oZ,td:oX,blockquote:oQ,code:o2,img:o3,pre:e=>{let{children:t}=e;return t},sup:oJ,sub:o0,p:o4,section:o1},o5=[],o8={allowDangerousHtml:!0},o6=new WeakMap,o7=new class{generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t="default";return this.keyCache.set(e,t),t}let a=e=>{if(!e||0===e.length)return"";let t="";for(let n=0;n<e.length;n+=1){let r=e[n];if(n>0&&(t+=","),Array.isArray(r)){let[e,n]=r;if("function"==typeof e){let n=o6.get(e);n||(n=e.name,o6.set(e,n)),t+=n}else t+=String(e);t+=":",t+=JSON.stringify(n)}else if("function"==typeof r){let e=o6.get(r);e||(e=r.name,o6.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=a(r),l=i?JSON.stringify(i):"",u="".concat(s,"::").concat(o,"::").concat(l);return this.keyCache.set(e,u),u}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}},se=e=>{let t=st(e),n=e.children||"";return sr(t.runSync(t.parse(n),n),e)},st=e=>{let t=o7.get(e);if(t)return t;let n=sn(e);return o7.set(e,n),n},sn=e=>{let t=e.rehypePlugins||o5,n=e.remarkPlugins||o5,r=e.remarkRehypeOptions?{...o8,...e.remarkRehypeOptions}:o8;return(0,ar.l)().use(at.A).use(n).use(an.A,r).use(t)},sr=(e,t)=>
1158(0,ae.H)(e,{Fragment:i7.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:i7.jsx,jsxs:i7.jsxs,passKeys:!0,passNode:!0}),si=/\[\^[^\]\s]{1,200}\](?!:)/,sa=/\[\^[^\]\s]{1,200}\]:/,so=/<\/(\w+)>/,ss=/<(\w+)[\s>]/,sl=e=>{let t=0;for(;t<e.length&&(" "===e[t]||"	"===e[t]||"\n"===e[t]||"\r"===e[t]);)t+=1;return t+1<e.length&&"$"===e[t]&&"$"===e[t+1]},su=e=>{let t=e.length-1;for(;t>=0&&(" "===e[t]||"	"===e[t]||"\n"===e[t]||"\r"===e[t]);)t-=1;return t>=1&&"$"===e[t]&&"$"===e[t-1]},sc=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)"$"===e[n]&&"$"===e[n+1]&&(t+=1,n+=1);return t},sd=e=>{let t=si.test(e),n=sa.test(e);if(t||n)return[e];let r=ot.lex(e,{gfm:!0}),i=[],a=[];for(let e of r){let t=e.raw,n=i.length;if(a.length>0){if(i[n-1]+=t,"html"===e.type){let e=t.match(so);if(e){let t=e[1];a.at(-1)===t&&a.pop()}}continue}if("html"===e.type&&e.block){let e=t.match(ss);if(e){let n=e[1];t.includes("</".concat(n,">"))||a.push(n)}}if("$$"===t.trim()&&n>0){let e=i[n-1],r=sl(e),a=sc(e);if(r&&a%2==1){i[n-1]=e+t;continue}}if(n>0&&su(t)){let e=i[n-1],r=sl(e),a=sc(e),o=sc(t);if(r&&a%2==1&&!sl(t)&&1===o){i[n-1]=e+t;continue}}i.push(t)}return i},sh={gfm:[ib.A,{}],math:[iw,{singleDollarTextMath:!1}],cjkFriendly:[function(){let e=this.data();(e.micromarkExtensions||(e.micromarkExtensions=[])).push({text:{[rK.asterisk]:ig,[rK.underscore]:ig},insideSpan:{null:[ig]}})},{}],cjkFriendlyGfmStrikethrough:[function(e){let t=this.data();(t.micromarkExtensions||(t.micromarkExtensions=[])).push(function(e){let t=(e||{}).singleTilde,n={name:"strikethrough",tokenize:function(e,n,r){let{now:i,sliceSerialize:a,previous:o}=this,s=il(o)?iu(o,i(),a):o,l=ie(s),u=new ic(s,i(),a),c=it(l,u.value.bind(u),s),d=this.events,h=0;return function(o){return((0,ej.ok)(o===rK.tilde,"expected `~`"),s===rK.tilde&&d[d.length-1][1].type!==im.characterEscape)?r(o):(e.enter("strikethroughSequenceTemporary"),function o(l){let u=ie(s);if(l===rK.tilde)return h>1?r(l):(e.consume(l),h++,o);if(h<2&&!t)return r(l);let d=e.exit("strikethroughSequenceTemporary"),p=ie(is(l)?id(l,i(),a):l),f=ii(c)||ir(c),m=ii(p)||ir(p),g=ia(c)||u===b.ivs;return d._open=!m||p===rZ.attentionSideAfter&&(f||g),d._close=!f||u===rZ.attentionSideAfter&&(m||ia(p)),n(l)}(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";let i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",a,t]],s=t.parser.constructs.insideSpan.null;s&&(0,ih.m)(o,o.length,0,(0,ip.W)(s,e.slice(r+1,n),t)),(0,ih.m)(o,o.length,0,[["exit",a,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),(0,ih.m)(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type=im.data);return e}};return null==t&&(t=!0),{text:{[rK.tilde]:n},insideSpan:{null:[n]},attentionMarkers:{null:[rK.tilde]}}}(e))},{}]},sp=Object.values({raw:function(e){return function(t,n){return rC(t,{...e,file:n})}},katex:[eF,{errorColor:"var(--color-muted-foreground)"}],sanitize:[function(e){return function(t){var n=t,r=e;let i={type:"root",children:[]},a=rz({schema:r?{...rH,...r}:rH,stack:[]},n);return a&&(Array.isArray(a)?1===a.length?i=a[0]:i.children=a:i=a),i}},{}],harden:[function({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:s=x.indicator,imageBlockPolicy:l=x.indicator}){let u=t.length&&!t.every(e=>"*"===e),c=n.length&&!n.every(e=>"*"===e);if(!e&&(u||c))throw Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return u=>{let c=((e,t,n,r,i,a,o,s,l)=>{let u=(c,d,h)=>{if("element"!==c.type||c[N])return A.IN;if("a"===c.tagName){let n=I(c.properties.href,t,e,!1,!1,i);if(null!==n)return c.properties.href=n,c.properties.target="_blank",c.properties.rel="noopener noreferrer",A.IN;if(c[N]=!0,(0,_.YR)(c,u),h&&"number"==typeof d){let e=function(e,t,n){return t===x.remove?{type:"remove"}:t===x.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}(c,s,o);if("remove"===e.type)return h.children.splice(d,1),[A._Z,d];h.children[d]=e.element}return A._Z}if("img"===c.tagName){let t=I(c.properties.src,n,e,r,!0,i);if(null===t){if(c[N]=!0,(0,_.YR)(c,u),h&&"number"==typeof d){let e=function(e,t,n){if(t===x.remove)return{type:"remove"};if(t===x.textOnly){let t=String(e.properties.alt||"");return t?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:t}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}(c,l,a);if("remove"===e.type)return h.children.splice(d,1),[A._Z,d];h.children[d]=e.element}return A._Z}c.properties.src=t}return A.IN};return u})(e,t,n,r,i,a,o,s,l);(function e(t){if("children"in t&&Array.isArray(t.children))for(let n of(t.children=t.children.filter(e=>null!=e),t.children))e(n)})(u),(0,_.YR)(u,c)}},{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]}),sf=Object.values(sh),sm=(0,k.createContext)({shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0}),sg=(0,k.memo)(e=>{let{content:t,shouldParseIncompleteMarkdown:n,...r}=e,i=(0,k.useMemo)(()=>"string"==typeof t&&n?(e=>{if(!e||"string"!=typeof e)return e;let t=e,n=(e=>{let t=e.lastIndexOf("](");if(-1!==t&&!iG(e,t)){let n=((e,t)=>{if(e.substring(t+2).includes(")"))return null;let n=((e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if("]"===e[r])n+=1;else if("["===e[r]&&0==(n-=1))return r;return -1})(e,t);if(-1===n||iG(e,n))return null;let r=n>0&&"!"===e[n-1],i=e.substring(0,r?n-1:n);if(r)return i;let a=e.substring(n+1,t);return`${i}[${a}](streamdown:incomplete-link)`})(e,t);if(null!==n)return n}for(let t=e.length-1;t>=0;t-=1)if("["===e[t]&&!iG(e,t)){let n=iq(e,t);if(null!==n)return n}return e})(t);return n.endsWith("](streamdown:incomplete-link)")?n:t=(e=>{if((e.match(/\$\$/g)||[]).length%2==0)return e;let t=e.indexOf("$$");return -1===t||-1===e.indexOf(`
1159`,t)||e.endsWith(`
1160`)?`${e}$$`:`${e}
1161$$`})(t=(e=>{let t=e.match(iD);if(t){let n=t[2];if(!n||iL.test(n))return e;if((e.match(/~~/g)||[]).length%2==1)return`${e}~~`}return e})(t=(e=>{let t=(e=>!e.match(iF)||e.includes(`
1162`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e)(e);if(null!==t)return t;if((e=>{let t=(e.match(/```/g)||[]).length;return!!(t>0&&t%2==0&&e.includes(`
1163`)||(e.endsWith("```\n")||e.endsWith("```"))&&t%2==0)})(e))return e;let n=e.match(iR);if(n&&(e.match(/```/g)||[]).length%2!=1){let t=n[2];if(!t||iL.test(t))return e;if((e=>{let t=0;for(let n=0;n<e.length;n+=1)"`"!==e[n]||iY(e,n)||(t+=1);return t})(e)%2==1)return`${e}\``}return e})(t=(e=>{if(iU(e)||!e.match(iO))return e;let t=(e=>{for(let t=0;t<e.length;t+=1)if("_"===e[t]&&"_"!==e[t-1]&&"_"!==e[t+1]&&"\\"!==e[t-1]&&!iH(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&ij(n)&&ij(r))continue;return t}return -1})(e);if(-1===t)return e;let n=e.substring(t+1);return!n||iL.test(n)?e:(e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if("_"!==e[r])continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";iz(e,r,i,a)||(t+=1)}return t})(e)%2==1?(e=>{let t=e.length;for(;t>0&&e[t-1]===`
1164`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`})(e):e})(t=(e=>{if(iU(e)||!e.match(iN))return e;let t=(e=>{for(let t=0;t<e.length;t+=1)if("*"===e[t]&&"*"!==e[t-1]&&"*"!==e[t+1]&&"\\"!==e[t-1]){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&ij(n)&&ij(r))continue;return t}return -1})(e);if(-1===t)return e;let n=e.substring(t+1);return!n||iL.test(n)?e:(e=>{let t=0,n=e.length;for(let r=0;r<n;r+=1){if("*"!==e[r])continue;let i=r>0?e[r-1]:"",a=r<n-1?e[r+1]:"";i$(e,r,i,a)||(t+=1)}return t})(e)%2==1?`${e}*`:e})(t=(e=>{let t=e.match(iC);if(t){let n=t[2];if(!n||iL.test(n))return e;let r=e.lastIndexOf(t[1]),i=e.substring(0,r).lastIndexOf(`
1165`),a=e.substring(-1===i?0:i+1,r);if(iP.test(a)&&n.includes(`
1166`))return e;if((e.match(/__/g)||[]).length%2==1)return`${e}__`}return e})(t=(e=>{if(iU(e))return e;let t=e.match(iS);if(t){let n=t[2];if(!n||iL.test(n))return e;let r=e.lastIndexOf(t[1]),i=e.substring(0,r).lastIndexOf(`
1167`),a=e.substring(-1===i?0:i+1,r);if(iP.test(a)&&n.includes(`
1168`))return e;if((e.match(/\*\*/g)||[]).length%2==1)return`${e}**`}return e})(t=(e=>{if(iU(e)||iB.test(e))return e;let t=e.match(iI);if(t){let n=t[2];if(!n||iL.test(n))return e;if((e=>{let t=0,n=0;for(let r=0;r<e.length;r+=1)"*"===e[r]?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0);return n>=3&&(t+=Math.floor(n/3)),t})(e)%2==1)return`${e}***`}return e})(t=n))))))))})(t.trim()):t,[t,n]);return(0,i7.jsx)(se,{...r,children:i})},(e,t)=>{if(e.content!==t.content||e.shouldParseIncompleteMarkdown!==t.shouldParseIncompleteMarkdown||e.index!==t.index)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>{var r,i;return(null==(r=e.components)?void 0:r[n])!==(null==(i=t.components)?void 0:i[n])}))return!1}return e.rehypePlugins===t.rehypePlugins&&e.remarkPlugins===t.remarkPlugins});sg.displayName="Block";var sv=["github-light","github-dark"],sb=(0,k.memo)(e=>{let{children:t,mode:r="streaming",parseIncompleteMarkdown:i=!0,components:a,rehypePlugins:o=sp,remarkPlugins:s=sf,className:l,shikiTheme:u=sv,mermaid:c,controls:d=!0,isAnimating:h=!1,BlockComponent:p=sg,parseMarkdownIntoBlocksFn:f=sd,...m}=e,g=(0,k.useId)(),[v,b]=(0,k.useTransition)(),[y,E]=(0,k.useState)([]),T=(0,k.useMemo)(()=>f("string"==typeof t?t:""),[t,f]);(0,k.useEffect)(()=>{"streaming"===r?b(()=>{E(T)}):E(T)},[T,r]);let _="streaming"===r?y:T,A=(0,k.useMemo)(()=>_.map((e,t)=>"".concat(g,"-").concat(t)),[_.length,g]),x=(0,k.useMemo)(()=>
1168({shikiTheme:u,controls:d,isAnimating:h,mode:r,mermaid:c}),[u,d,h,r,c]),w=(0,k.useMemo)(()=>({...o9,...a}),[a]);return(0,k.useEffect)(()=>{if(!(Array.isArray(o)&&o.some(e=>Array.isArray(e)?e[0]===eF:e===eF)))return;let e=!1;if(Array.isArray(s)){let t=s.find(e=>Array.isArray(e)?e[0]===iw:e===iw);t&&Array.isArray(t)&&t[1]&&(e=!0===t[1].singleDollarTextMath)}let r="string"==typeof t?t:"",i=r.includes("$$"),a=e&&(/[^$]\$[^$]/.test(r)||/^\$[^$]/.test(r)||/[^$]\$$/.test(r));(i||a)&&Promise.all([n.e(2682),n.e(6105)]).then(n.t.bind(n,76105,19))},[o,s,t]),"static"===r?(0,i7.jsx)(sm.Provider,{value:x,children:(0,i7.jsx)("div",{className:ol("space-y-4 whitespace-normal",l),children:(0,i7.jsx)(se,{components:w,rehypePlugins:o,remarkPlugins:s,...m,children:t})})}):(0,i7.jsx)(sm.Provider,{value:x,children:(0,i7.jsx)("div",{className:ol("space-y-4 whitespace-normal",l),children:_.map((e,t)=>(0,i7.jsx)(p,{components:w,content:e,index:t,rehypePlugins:o,remarkPlugins:s,shouldParseIncompleteMarkdown:i,...m},A[t]))})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.mode===t.mode);sb.displayName="Streamdown";var sy=e=>{let{children:t,className:n,minZoom:r=.5,maxZoom:i=3,zoomStep:a=.1,showControls:o=!0,initialZoom:s=1,fullscreen:l=!1}=e,u=(0,k.useRef)(null),c=(0,k.useRef)(null),[d,h]=(0,k.useState)(s),[p,f]=(0,k.useState)({x:0,y:0}),[m,g]=(0,k.useState)(!1),[v,b]=(0,k.useState)({x:0,y:0}),[y,E]=(0,k.useState)({x:0,y:0}),T=(0,k.useCallback)(e=>{h(t=>Math.max(r,Math.min(i,t+e)))},[r,i]),_=(0,k.useCallback)(()=>{T(a)},[T,a]),A=(0,k.useCallback)(()=>{T(-a)},[T,a]),x=(0,k.useCallback)(()=>{h(s),f({x:0,y:0})},[s]),w=(0,k.useCallback)(e=>{e.preventDefault(),T(e.deltaY>0?-a:a)},[T,a]),S=(0,k.useCallback)(e=>{if(0!==e.button||!1===e.isPrimary)return;g(!0),b({x:e.clientX,y:e.clientY}),E(p);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[p]),C=(0,k.useCallback)(e=>{if(!m)return;e.preventDefault();let t=e.clientX-v.x,n=e.clientY-v.y;f({x:y.x+t,y:y.y+n})},[m,v,y]),I=(0,k.useCallback)(e=>{g(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,k.useEffect)(()=>{let e=u.current;if(e)return e.addEventListener("wheel",w,{passive:!1}),()=>{e.removeEventListener("wheel",w)}},[w]),(0,k.useEffect)(()=>{let e=c.current;if(e&&m)return document.body.style.userSelect="none",e.addEventListener("pointermove",C,{passive:!1}),e.addEventListener("pointerup",I),e.addEventListener("pointercancel",I),()=>{document.body.style.userSelect="",e.removeEventListener("pointermove",C),e.removeEventListener("pointerup",I),e.removeEventListener("pointercancel",I)}},[m,C,I]),(0,i7.jsxs)("div",{className:ol("relative",l?"h-full w-full":"w-full",n),ref:u,style:{cursor:m?"grabbing":"grab"},children:[o&&(0,i7.jsxs)("div",{className:ol("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",l?"bottom-4 left-4":"bottom-2 left-2"),children:[(0,i7.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:d>=i,onClick:_,title:"Zoom in",type:"button",children:(0,i7.jsx)(i4,{size:16})}),(0,i7.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:d<=r,onClick:A,title:"Zoom out",type:"button",children:(0,i7.jsx)(i9,{size:16})}),(0,i7.jsx)("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:x,title:"Reset zoom and pan",type:"button",children:(0,i7.jsx)(i5,{size:16})})]}),(0,i7.jsx)("div",{className:ol("origin-center transition-transform duration-150 ease-out",l&&"flex w-full items-center justify-center"),onPointerDown:S,ref:c,role:"application",style:{transform:"translate(".concat(p.x,"px, ").concat(p.y,"px) scale(").concat(d,")"),transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:t})]})},sE=e=>{let{chart:t,className:n,config:r,fullscreen:i=!1,showControls:a=!0}=e,[o,s]=(0,k.useState)(null),[l,u]=(0,k.useState)(!0),[c,d]=(0,k.useState)(""),[h,p]=(0,k.useState)(""),[f,m]=(0,k.useState)(0),{mermaid:g}=(0,k.useContext)(sm),v=null==g?void 0:g.errorComponent;return((0,k.useEffect)(()=>{(async()=>{try{s(null),u(!0);let e=await ov(r),n=t.split("").reduce((e,t)=>
1168(e<<5)-e+t.charCodeAt(0)|0,0),i="mermaid-".concat(Math.abs(n),"-").concat(Date.now(),"-").concat(Math.random().toString(36).substring(2,9)),{svg:a}=await e.render(i,t);d(a),p(a)}catch(e){h||c||s(e instanceof Error?e.message:"Failed to render Mermaid chart")}finally{u(!1)}})()},[t,r,f]),!l||c||h)?!o||c||h?(0,i7.jsx)(sy,{className:ol(i?"h-full w-full overflow-hidden":"my-4 overflow-hidden",n),fullscreen:i,maxZoom:3,minZoom:.5,showControls:a,zoomStep:.1,children:(0,i7.jsx)("div",{"aria-label":"Mermaid chart",className:ol("flex justify-center",i&&"h-full w-full items-center"),dangerouslySetInnerHTML:{__html:c||h},role:"img"})}):v?(0,i7.jsx)(v,{chart:t,error:o,retry:()=>m(e=>e+1)}):(0,i7.jsxs)("div",{className:ol("rounded-lg border border-red-200 bg-red-50 p-4",n),children:[(0,i7.jsxs)("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",o]}),(0,i7.jsxs)("details",{className:"mt-2",children:[(0,i7.jsx)("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),(0,i7.jsx)("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:t})]})]}):(0,i7.jsx)("div",{className:ol("my-4 flex justify-center p-4",n),children:(0,i7.jsxs)("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[(0,i7.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),(0,i7.jsx)("span",{className:"text-sm",children:"Loading diagram..."})]})})}},73545:(e,t,n)=>{n.d(t,{G1:()=>o,PW:()=>i,Y:()=>r});let r=a("end"),i=a("start");function a(e){return function(t){let 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 o(e){let t=i(e),n=r(e);if(t&&n)return{start:t,end:n}}},73694:(e,t,n)=>{n.d(t,{y:()=>i});var r=n(39097);function i(e){return(0,r.T)(null==e?void 0:e.then)}},74073:(e,t,n)=>{n.d(t,{T:()=>i});var r=n(39097);function i(e){return Symbol.asyncIterator&&(0,r.T)(null==e?void 0:e[Symbol.asyncIterator])}},75016:(e,t,n)=>{n.d(t,{R:()=>i,v:()=>r});let r="sse",i="intelligence"},75164:(e,t,n)=>{n.d(t,{A:()=>i});let r={}.hasOwnProperty;function i(e,t){let n=t||{};function i(t,...n){let a=i.invalid,o=i.handlers;if(t&&r.call(t,e)){let n=String(t[e]);a=r.call(o,n)?o[n]:i.unknown}if(a)return a.call(this,t,...n)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}},75165:(e,t,n)=>{n.d(t,{BN:()=>o,Sr:()=>s,kr:()=>a,y6:()=>i});var r=n(12115);n(65695).Wp;let i=(0,r.createContext)(null),a=()=>{let e=(0,r.useContext)(i),[,t]=(0,r.useReducer)(e=>e+1,0);if(!e)throw Error("useCopilotKit must be used within CopilotKitProvider");return(0,r.useEffect)(()=>{let n=e.copilotkit.subscribe({onRuntimeConnectionStatusChanged:()=>{t()},onHeadersChanged:()=>{t()}});return()=>{n.unsubscribe()}},[]),e},o=(0,r.createContext)({status:null,license:null,checkFeature:()=>!0,getLimit:()=>null}),s=()=>(0,r.useContext)(o)},75433:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(12115),i=n(47650),a=n(97602),o=n(4129),s=n(95155),l=r.forwardRef((e,t)=>{var n,l;let{container:u,...c}=e,[d,h]=r.useState(!1);(0,o.N)(()=>h(!0),[]);let p=u||d&&(null==(l=globalThis)||null==(n=l.document)?void 0:n.body);return p?i.createPortal((0,s.jsx)(a.sG.div,{...c,ref:t}),p):null});l.displayName="Portal"},75889:(e,t,n)=>{n.d(t,{QP:()=>eE,zu:()=>ey});let r=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),i=[],a=(e,t,n)=>{if(0==e.length-t)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=a(e,t+1,i);if(n)return n}let o=n.validators;if(null===o)return;let s=0===t?e.join("-"):e.slice(t).join("-"),l=o.length;for(let e=0;e<l;e++){let t=o[e];if(t.validator(s))return t.classGroupId}},o=(e,t)=>{let n=r();for(let r in e)s(e[r],n,r,t);return n},s=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++)l(e[a],t,n,r)},l=(e,t,n,r)=>"string"==typeof e?void u(e,t,n):"function"==typeof e?void c(e,t,n,r):void d(e,t,n,r),u=(e,t,n)=>{(""===e?t:h(t,e)).classGroupId=n},c=(e,t,n,r)=>{if(p(e))return void s(e(r),t,n,r);null===t.validators&&(t.validators=[]),t.validators.push({classGroupId:n,validator:e})},d=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];s(o,h(t,a),n,r)}},h=(e,t)=>{let n=e,i=t.split("-"),a=i.length;for(let e=0;e<a;e++){let t=i[e],a=n.nextPart.get(t);a||(a=r(),n.nextPart.set(t,a)),n=a}return n},p=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,f=[],m=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),g=/\s+/,v=e=>{let t;if("string"==typeof e)return e;let n="";for(let r=0;r<e.length;r++)e[r]&&(t=v(e[r]))&&(n&&(n+=" "),n+=t);return n},b=(e,...t)=>{let n,r,s,l,u=e=>{let t=r(e);if(t)return t;let i=((e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],l=e.trim().split(g),u="";for(let e=l.length-1;e>=0;e-=1){let t,c=l[e],{isExternal:d,modifiers:h,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:m}=n(c);if(d){u=c+(u.length>0?" "+u:u);continue}let g=!!m;if(g){let e=(t=r(f.substring(0,m)))&&o[t]?r(f):void 0;e&&e!==t&&(t=e,g=!1)}else t=r(f);if(!t){if(!g||!(t=r(f))){u=c+(u.length>0?" "+u:u);continue}g=!1}let v=0===h.length?"":1===h.length?h[0]:a(h).join(":"),b=p?v+"!":v,y=b+t;if(s.indexOf(y)>-1)continue;s.push(y);let E=i(t,g);for(let e=0;e<E.length;++e){let t=E[e];s.push(b+t)}u=c+(u.length>0?" "+u:u)}return u}
1168)(e,n);return s(e,i),i};return l=c=>(r=(n=(e=>({cache:(e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,++t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(i(e,t),t):void 0},set(e,t){e in n?n[e]=t:i(e,t)}}})(e.cacheSize),parseClassName:(e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t,n=[],r=0,i=0,a=0,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(0===r&&0===i){if(":"===o){n.push(e.slice(a,s)),a=s+1;continue}if("/"===o){t=s;continue}}"["===o?r++:"]"===o?r--:"("===o?i++:")"===o&&i--}let s=0===n.length?e:e.slice(a),l=s,u=!1;return s.endsWith("!")?(l=s.slice(0,-1),u=!0):s.startsWith("!")&&(l=s.slice(1),u=!0),m(n,u,l,t&&t>a?t-a:void 0)};if(t){let e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):m(f,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r})(e),sortModifiers:(e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o="["===a[0],s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}})(e),postfixLookupClassGroupIds:(e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t})(e),...(e=>{let t=(e=>{let{theme:t,classGroups:n}=e;return o(n,t)})(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return(e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})())(e);let n=e.split("-"),r=+(""===n[0]&&n.length>1);return a(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],a=n[e];return t?a?((e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(a,t):t:a||i}return n[e]||i}}})(e)}))(t.reduce((e,t)=>t(e),e()))).cache.get,s=n.cache.set,l=u,u(c)),(...e)=>l(((...e)=>{let t,n,r=0,i="";for(;r<e.length;)(t=e[r++])&&(n=v(t))&&(i&&(i+=" "),i+=n);return i})(...e))},y=[],E=e=>{let t=t=>t[e]||y;return t.isThemeGetter=!0,t},T=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,k=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,A=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,x=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,w=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,S=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,C=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,I=e=>_.test(e),N=e=>!!e&&!Number.isNaN(Number(e)),O=e=>!!e&&Number.isInteger(Number(e)),R=e=>e.endsWith("%")&&N(e.slice(0,-1)),D=e=>A.test(e),L=()=>!0,P=e=>x.test(e)&&!w.test(e),M=()=>!1,F=e=>S.test(e),B=e=>C.test(e),j=e=>!$(e)&&!Z(e),U=e=>e.startsWith("@container")&&("/"===e[10]&&void 0!==e[11]||"s"===e[11]&&void 0!==e[16]&&e.startsWith("-size/",10)||"n"===e[11]&&void 0!==e[18]&&e.startsWith("-normal/",10)),H=e=>ei(e,el,M),$=e=>T.test(e),z=e=>ei(e,eu,P),G=e=>ei(e,ec,N),Y=e=>ei(e,eh,L),q=e=>ei(e,ed,M),V=e=>ei(e,eo,M),W=e=>ei(e,es,B),K=e=>ei(e,ep,F),Z=e=>k.test(e),X=e=>ea(e,eu),Q=e=>ea(e,ed),J=e=>ea(e,eo),ee=e=>ea(e,el),et=e=>ea(e,es),en=e=>ea(e,ep,!0),er=e=>ea(e,eh,!0),ei=(e,t,n)=>{let r=T.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},ea=(e,t,n=!1)=>{let r=k.exec(e);return!!r&&(r[1]?t(r[1]):n)},eo=e=>"position"===e||"percentage"===e,es=e=>"image"===e||"url"===e,el=e=>"length"===e||"size"===e||"bg-size"===e,eu=e=>"length"===e,ec=e=>"number"===e,ed=e=>"family-name"===e,eh=e=>"number"===e||"weight"===e,ep=e=>"shadow"===e;Symbol.toStringTag;let ef=()=>{let e=E("color"),t=E("font"),n=E("text"),r=E("font-weight"),i=E("tracking"),a=E("leading"),o=E("breakpoint"),s=E("container"),l=E("spacing"),u=E("radius"),c=E("shadow"),d=E("inset-shadow"),h=E("text-shadow"),p=E("drop-shadow"),f=E("blur"),m=E("perspective"),g=E("aspect"),v=E("ease"),b=E("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...T(),Z,$],_=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],x=()=>[Z,$,l],w=()=>[I,"full","auto",...x()],S=()=>[O,"none","subgrid",Z,$],C=()=>["auto",{span:["full",O,Z,$]},O,Z,$],P=()=>[O,"auto",Z,$],M=()=>["auto","min","max","fr",Z,$],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],ei=()=>["auto",...x()],ea=()=>[I,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],eo=()=>[I,"screen","full","dvw","lvw","svw","min","max","fit",...x()],es=()=>[I,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],el=()=>[e,Z,$],eu=()=>[...T(),J,V,{position:[Z,$]}],ec=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ed=()=>["auto","cover","contain",ee,H,{size:[Z,$]}],eh=()=>[R,X,z],ep=()=>["","none","full",u,Z,$],ef=()=>["",N,X,z],em=()=>["solid","dashed","dotted","double"],eg=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ev=()=>[N,R,J,V],eb=()=>["","none",f,Z,$],ey=()=>["none",N,Z,$],eE=()=>["none",N,Z,$],eT=()=>[N,Z,$],ek=()=>[I,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[D],breakpoint:[D],color:[L],container:[D],"drop-shadow":[D],ease:["in","out","in-out"],font:[j],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[D],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[D],shadow:[D],spacing:["px",N],text:[D],"text-shadow":[D],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",I,$,Z,g]}],container:["container"],"container-type":[{"@container":["","normal","size",Z,$]}
vendor: 6,093 bytes, line 1168
1168],"container-named":[U],columns:[{columns:[N,$,Z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[O,"auto",Z,$]}],basis:[{basis:[I,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[N,I,"auto","initial","none",$]}],grow:[{grow:["",N,Z,$]}],shrink:[{shrink:["",N,Z,$]}],order:[{order:[O,"first","last","none",Z,$]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:ei()}],mx:[{mx:ei()}],my:[{my:ei()}],ms:[{ms:ei()}],me:[{me:ei()}],mbs:[{mbs:ei()}],mbe:[{mbe:ei()}],mt:[{mt:ei()}],mr:[{mr:ei()}],mb:[{mb:ei()}],ml:[{ml:ei()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:ea()}],"inline-size":[{inline:["auto",...eo()]}],"min-inline-size":[{"min-inline":["auto",...eo()]}],"max-inline-size":[{"max-inline":["none",...eo()]}],"block-size":[{block:["auto",...es()]}],"min-block-size":[{"min-block":["auto",...es()]}],"max-block-size":[{"max-block":["none",...es()]}],w:[{w:[s,"screen",...ea()]}],"min-w":[{"min-w":[s,"screen","none",...ea()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...ea()]}],h:[{h:["screen","lh",...ea()]}],"min-h":[{"min-h":["screen","lh","none",...ea()]}],"max-h":[{"max-h":["screen","lh",...ea()]}],"font-size":[{text:["base",n,X,z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,er,Y]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",R,$]}],"font-family":[{font:[Q,q,t]}],"font-features":[{"font-features":[$]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Z,$]}],"line-clamp":[{"line-clamp":[N,"none",Z,G]}],leading:[{leading:[a,...x()]}],"list-image":[{"list-image":["none",Z,$]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Z,$]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:el()}],"text-color":[{text:el()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...em(),"wavy"]}],"text-decoration-thickness":[{decoration:[N,"from-font","auto",Z,z]}],"text-decoration-color":[{decoration:el()}],"underline-offset":[{"underline-offset":[N,"auto",Z,$]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"tab-size":[{tab:[O,Z,$]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Z,$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Z,$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:eu()}],"bg-repeat":[{bg:ec()}],"bg-size":[{bg:ed()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},O,Z,$],radial:["",Z,$],conic:[O,Z,$]},et,W]}],"bg-color":[{bg:el()}],"gradient-from-pos":[{from:eh()}
vendor: 7,384 bytes, line 1168
1168],"gradient-via-pos":[{via:eh()}],"gradient-to-pos":[{to:eh()}],"gradient-from":[{from:el()}],"gradient-via":[{via:el()}],"gradient-to":[{to:el()}],rounded:[{rounded:ep()}],"rounded-s":[{"rounded-s":ep()}],"rounded-e":[{"rounded-e":ep()}],"rounded-t":[{"rounded-t":ep()}],"rounded-r":[{"rounded-r":ep()}],"rounded-b":[{"rounded-b":ep()}],"rounded-l":[{"rounded-l":ep()}],"rounded-ss":[{"rounded-ss":ep()}],"rounded-se":[{"rounded-se":ep()}],"rounded-ee":[{"rounded-ee":ep()}],"rounded-es":[{"rounded-es":ep()}],"rounded-tl":[{"rounded-tl":ep()}],"rounded-tr":[{"rounded-tr":ep()}],"rounded-br":[{"rounded-br":ep()}],"rounded-bl":[{"rounded-bl":ep()}],"border-w":[{border:ef()}],"border-w-x":[{"border-x":ef()}],"border-w-y":[{"border-y":ef()}],"border-w-s":[{"border-s":ef()}],"border-w-e":[{"border-e":ef()}],"border-w-bs":[{"border-bs":ef()}],"border-w-be":[{"border-be":ef()}],"border-w-t":[{"border-t":ef()}],"border-w-r":[{"border-r":ef()}],"border-w-b":[{"border-b":ef()}],"border-w-l":[{"border-l":ef()}],"divide-x":[{"divide-x":ef()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ef()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...em(),"hidden","none"]}],"divide-style":[{divide:[...em(),"hidden","none"]}],"border-color":[{border:el()}],"border-color-x":[{"border-x":el()}],"border-color-y":[{"border-y":el()}],"border-color-s":[{"border-s":el()}],"border-color-e":[{"border-e":el()}],"border-color-bs":[{"border-bs":el()}],"border-color-be":[{"border-be":el()}],"border-color-t":[{"border-t":el()}],"border-color-r":[{"border-r":el()}],"border-color-b":[{"border-b":el()}],"border-color-l":[{"border-l":el()}],"divide-color":[{divide:el()}],"outline-style":[{outline:[...em(),"none","hidden"]}],"outline-offset":[{"outline-offset":[N,Z,$]}],"outline-w":[{outline:["",N,X,z]}],"outline-color":[{outline:el()}],shadow:[{shadow:["","none",c,en,K]}],"shadow-color":[{shadow:el()}],"inset-shadow":[{"inset-shadow":["none",d,en,K]}],"inset-shadow-color":[{"inset-shadow":el()}],"ring-w":[{ring:ef()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:el()}],"ring-offset-w":[{"ring-offset":[N,z]}],"ring-offset-color":[{"ring-offset":el()}],"inset-ring-w":[{"inset-ring":ef()}],"inset-ring-color":[{"inset-ring":el()}],"text-shadow":[{"text-shadow":["none",h,en,K]}],"text-shadow-color":[{"text-shadow":el()}],opacity:[{opacity:[N,Z,$]}],"mix-blend":[{"mix-blend":[...eg(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":eg()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[N]}],"mask-image-linear-from-pos":[{"mask-linear-from":ev()}],"mask-image-linear-to-pos":[{"mask-linear-to":ev()}],"mask-image-linear-from-color":[{"mask-linear-from":el()}],"mask-image-linear-to-color":[{"mask-linear-to":el()}],"mask-image-t-from-pos":[{"mask-t-from":ev()}],"mask-image-t-to-pos":[{"mask-t-to":ev()}],"mask-image-t-from-color":[{"mask-t-from":el()}],"mask-image-t-to-color":[{"mask-t-to":el()}],"mask-image-r-from-pos":[{"mask-r-from":ev()}],"mask-image-r-to-pos":[{"mask-r-to":ev()}],"mask-image-r-from-color":[{"mask-r-from":el()}],"mask-image-r-to-color":[{"mask-r-to":el()}],"mask-image-b-from-pos":[{"mask-b-from":ev()}],"mask-image-b-to-pos":[{"mask-b-to":ev()}],"mask-image-b-from-color":[{"mask-b-from":el()}],"mask-image-b-to-color":[{"mask-b-to":el()}],"mask-image-l-from-pos":[{"mask-l-from":ev()}],"mask-image-l-to-pos":[{"mask-l-to":ev()}],"mask-image-l-from-color":[{"mask-l-from":el()}],"mask-image-l-to-color":[{"mask-l-to":el()}],"mask-image-x-from-pos":[{"mask-x-from":ev()}],"mask-image-x-to-pos":[{"mask-x-to":ev()}],"mask-image-x-from-color":[{"mask-x-from":el()}],"mask-image-x-to-color":[{"mask-x-to":el()}],"mask-image-y-from-pos":[{"mask-y-from":ev()}],"mask-image-y-to-pos":[{"mask-y-to":ev()}],"mask-image-y-from-color":[{"mask-y-from":el()}],"mask-image-y-to-color":[{"mask-y-to":el()}],"mask-image-radial":[{"mask-radial":[Z,$]}],"mask-image-radial-from-pos":[{"mask-radial-from":ev()}],"mask-image-radial-to-pos":[{"mask-radial-to":ev()}],"mask-image-radial-from-color":[{"mask-radial-from":el()}],"mask-image-radial-to-color":[{"mask-radial-to":el()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[N]}],"mask-image-conic-from-pos":[{"mask-conic-from":ev()}],"mask-image-conic-to-pos":[{"mask-conic-to":ev()}],"mask-image-conic-from-color":[{"mask-conic-from":el()}],"mask-image-conic-to-color":[{"mask-conic-to":el()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:eu()}],"mask-repeat":[{mask:ec()}],"mask-size":[{mask:ed()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,$]}],filter:[{filter:["","none",Z,$]}],blur:[{blur:eb()}],brightness:[{brightness:[N,Z,$]}],contrast:[{contrast:[N,Z,$]}],"drop-shadow":[{"drop-shadow":["","none",p,en,K]}],"drop-shadow-color":[{"drop-shadow":el()}],grayscale:[{grayscale:["",N,Z,$]}],"hue-rotate":[{"hue-rotate":[N,Z,$]}],invert:[{invert:["",N,Z,$]}],saturate:[{saturate:[N,Z,$]}],sepia:[{sepia:["",N,Z,$]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,$]}],"backdrop-blur":[{"backdrop-blur":eb()}],"backdrop-brightness":[{"backdrop-brightness":[N,Z,$]}],"backdrop-contrast":[{"backdrop-contrast":[N,Z,$]}],"backdrop-grayscale":[{"backdrop-grayscale":["",N,Z,$]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[N,Z,$]}],"backdrop-invert":[{"backdrop-invert":["",N,Z,$]}],"backdrop-opacity":[{"backdrop-opacity":[N,Z,$]}],"backdrop-saturate":[{"backdrop-saturate":[N,Z,$]}],"backdrop-sepia":[{"backdrop-sepia":["",N,Z,$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Z,$]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[N,"initial",Z,$]}],ease:[{ease:["linear","initial",v,Z,$]}],delay:[{delay:[N,Z,$]}],animate:[{animate:["none",b,Z,$]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Z,$]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ey()}],"rotate-x":[{"rotate-x":ey()}],"rotate-y":[{"rotate-y":ey()}],"rotate-z":[{"rotate-z":ey()}],scale:[{scale:eE()}],"scale-x":[{"scale-x":eE()}],"scale-y":[{"scale-y":eE()}],"scale-z":[{"scale-z":eE()}],"scale-3d":["scale-3d"],skew:[{skew:eT()}],"skew-x":[{"skew-x":eT()}],"skew-y":[{"skew-y":eT()}],transform:[{transform:[Z,$,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ek()}],"translate-x":[{"translate-x":ek()}],"translate-y":[{"translate-y":ek()}],"translate-z":[{"translate-z":ek()}],"translate-none":["translate-none"],zoom:[{zoom:[O,Z,$]}],accent:[{accent:el()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:el()}
vendor: 5,017 bytes, line 1168
1168],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Z,$]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":el()}],"scrollbar-track-color":[{"scrollbar-track":el()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Z,$]}],fill:[{fill:["none",...el()]}],"stroke-w":[{stroke:[N,X,z,G]}],stroke:[{stroke:["none",...el()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}
1168,em=(e,t,n)=>{void 0!==n&&(e[t]=n)},eg=(e,t)=>{if(t)for(let n in t)em(e,n,t[n])},ev=(e,t)=>{if(t)for(let n in t)eb(e,t,n)},eb=(e,t,n)=>{let r=t[n];void 0!==r&&(e[n]=e[n]?e[n].concat(r):r)},ey=(e,...t)=>"function"==typeof e?b(ef,e,...t):b(()=>((e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>(em(e,"cacheSize",t),em(e,"prefix",n),em(e,"experimentalParseClassName",r),eg(e.theme,a.theme),eg(e.classGroups,a.classGroups),eg(e.conflictingClassGroups,a.conflictingClassGroups),eg(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),em(e,"postfixLookupClassGroups",a.postfixLookupClassGroups),em(e,"orderSensitiveModifiers",a.orderSensitiveModifiers),ev(e.theme,i.theme),ev(e.classGroups,i.classGroups),ev(e.conflictingClassGroups,i.conflictingClassGroups),ev(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),eb(e,i,"postfixLookupClassGroups"),eb(e,i,"orderSensitiveModifiers"),e))(ef(),e),...t),eE=b(ef)},75968:(e,t,n)=>{n.d(t,{Y:()=>a,l:()=>o});var r=n(29846),i=null;function a(e){if(r.$.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var n=i,a=n.errorThrown,o=n.error;if(i=null,a)throw o}}else e()}function o(e){r.$.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},76318:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},76842:(e,t,n)=>{n.d(t,{C:()=>a});var r=n(12115),i=n(4129),a=e=>{let{present:t,children:n}=e,a=function(e){var t,n;let[a,o]=r.useState(),l=r.useRef(null),u=r.useRef(e),c=r.useRef("none"),[d,h]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},r.useReducer((e,t)=>{let r=n[e][t];return null!=r?r:e},t));return r.useEffect(()=>{let e=s(l.current);c.current="mounted"===d?e:"none"},[d]),(0,i.N)(()=>{let t=l.current,n=u.current;if(n!==e){let r=c.current,i=s(t);e?h("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?h("UNMOUNT"):n&&r!==i?h("ANIMATION_OUT"):h("UNMOUNT"),u.current=e}},[e,h]),(0,i.N)(()=>{if(a){var e;let t,n=null!=(e=a.ownerDocument.defaultView)?e:window,r=e=>{let r=s(l.current).includes(CSS.escape(e.animationName));if(e.target===a&&r&&(h("ANIMATION_END"),!u.current)){let e=a.style.animationFillMode;a.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===a.style.animationFillMode&&(a.style.animationFillMode=e)})}},i=e=>{e.target===a&&(c.current=s(l.current))};return a.addEventListener("animationstart",i),a.addEventListener("animationcancel",r),a.addEventListener("animationend",r),()=>{n.clearTimeout(t),a.removeEventListener("animationstart",i),a.removeEventListener("animationcancel",r),a.removeEventListener("animationend",r)}}h("ANIMATION_END")},[a,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:r.useCallback(e=>{l.current=e?getComputedStyle(e):null,o(e)},[])}}(t),l="function"==typeof n?n({present:a.isPresent}):r.Children.only(n),u=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let i=r.useRef(t);return i.current=t,r.useCallback(e=>{let t=i.current,n=!1,r=t.map(t=>{let r=o(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;e<r.length;e++){let n=r[e];"function"==typeof n?n():o(t[e],null)}}},[])}(a.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,i=r&&"isReactWarning"in r&&r.isReactWarning;return i?e.ref:(i=(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get)&&"isReactWarning"in r&&r.isReactWarning)?e.props.ref:e.props.ref||e.ref}(l));return"function"==typeof n||a.isPresent?r.cloneElement(l,{ref:u}):null};function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function s(e){return(null==e?void 0:e.animationName)||"none"}a.displayName="Presence"},76854:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]])}
1168,77133:(e,t,n)=>{n.d(t,{W:()=>function e(t){return(0,a.N)(function(n,a){var o,s=null,l=!1;s=n.subscribe((0,i._)(a,void 0,void 0,function(i){o=(0,r.Tg)(t(i,e(t)(n))),s?(s.unsubscribe(),s=null,o.subscribe(a)):l=!0})),l&&(s.unsubscribe(),s=null,o.subscribe(a))})}});var r=n(8286),i=n(28400),a=n(96948)},77163:(e,t,n)=>{n.d(t,{D:()=>r});function r(e){return e}},77241:(e,t,n)=>{n.d(t,{u:()=>l});var r=n(71450),i=n(8286),a=n(31536),o=n(28786),s=n(96948);function l(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new a.B}:t,r=e.resetOnError,l=void 0===r||r,c=e.resetOnComplete,d=void 0===c||c,h=e.resetOnRefCountZero,p=void 0===h||h;return function(e){var t,r,a,c=0,h=!1,f=!1,m=function(){null==r||r.unsubscribe(),r=void 0},g=function(){m(),t=a=void 0,h=f=!1},v=function(){var e=t;g(),null==e||e.unsubscribe()};return(0,s.N)(function(e,s){c++,f||h||m();var b=a=null!=a?a:n();s.add(function(){0!=--c||f||h||(r=u(v,p))}),b.subscribe(s),!t&&c>0&&(t=new o.Ms({next:function(e){return b.next(e)},error:function(e){f=!0,m(),r=u(g,l,e),b.error(e)},complete:function(){h=!0,m(),r=u(g,d),b.complete()}}),(0,i.Tg)(e).subscribe(t))})(e)}}function u(e,t){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];if(!0===t)return void e();if(!1!==t){var s=new o.Ms({next:function(){s.unsubscribe(),e()}});return(0,i.Tg)(t.apply(void 0,(0,r.fX)([],(0,r.zs)(n)))).subscribe(s)}}},78242:(e,t,n)=>{n.d(t,{v:()=>a});var r=n(45037),i=n(8286);function a(e){return new r.c(function(t){(0,i.Tg)(e()).subscribe(t)})}},78526:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]])},78842:(e,t,n)=>{n.d(t,{H:()=>y});var r=n(8286),i=n(41423),a=n(96948);function o(e,t){return void 0===t&&(t=0),(0,a.N)(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}var s=n(45037),l=n(69899),u=n(39097),c=n(20437);function d(e,t){if(!e)throw Error("Iterable cannot be null");return new s.c(function(n){(0,c.N)(n,t,function(){var r=e[Symbol.asyncIterator]();(0,c.N)(n,t,function(){r.next().then(function(e){e.done?n.complete():n.next(e.value)})},0,!0)})})}var h=n(99455),p=n(73694),f=n(82241),m=n(45907),g=n(74073),v=n(50933),b=n(31590);function y(e,t){return t?function(e,t){if(null!=e){if((0,h.l)(e))return(0,r.Tg)(e).pipe(o(t),(0,i.Q)(t));if((0,f.X)(e))return new s.c(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})});if((0,p.y)(e))return(0,r.Tg)(e).pipe(o(t),(0,i.Q)(t));if((0,g.T)(e))return d(e,t);if((0,m.x)(e))return new s.c(function(n){var r;return(0,c.N)(n,t,function(){r=e[l.l](),(0,c.N)(n,t,function(){var e,t,i;try{t=(e=r.next()).value,i=e.done}catch(e){n.error(e);return}i?n.complete():n.next(t)},0,!0)}),function(){return(0,u.T)(null==r?void 0:r.return)&&r.return()}});if((0,b.U)(e))return d((0,b.C)(e),t)}throw(0,v.L)(e)}(e,t):(0,r.Tg)(e)}},79024:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;let r=(0,i.default)(e),a="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;let{property:r,value:i}=e;a?t(r,i,e):i&&((n=n||{})[r]=i)}),n};let i=r(n(51592))},79168:(e,t,n)=>{n.d(t,{N:()=>i});var r=n(3407);function i(e,t,n,i){let a=i?i-1:1/0,o=0;return function(i){return(0,r.On)(i)?(e.enter(n),function i(s){return(0,r.On)(s)&&o++<a?(e.consume(s),i):(e.exit(n),t(s))}(i)):t(i)}}},79572:(e,t,n)=>{n.d(t,{jH:()=>r.i});var r=n(73431)},81933:(e,t,n)=>{n.d(t,{U:()=>a});var r=n(64354),i=n(77163);function a(e){return void 0===e&&(e=1/0),(0,r.Z)(i.D,e)}},82051:(e,t,n)=>{n.d(t,{QH:()=>r,U6:()=>i,kv:()=>o,my:()=>a});let r="https://api.cloud.copilotkit.ai",i=`${r}/copilotkit/v1`,a="X-CopilotCloud-Public-Api-Key",o="default"},82241:(e,t,n)=>{n.d(t,{X:()=>r});var r=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},83101:(e,t,n)=>{n.d(t,{F:()=>o});var r=n(2821);let i=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=r.$,o=(e,t)=>n=>{var r;if((null==t?void 0:t.variants)==null)return a(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(e=>{let t=null==n?void 0:n[e],r=null==s?void 0:s[e];if(null===t)return null;let a=i(t)||i(r);return o[e][a]}),u=n&&Object.entries(n).reduce((e,t)=>
1168{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return a(e,l,null==t||null==(r=t.compoundVariants)?void 0:r.reduce((e,t)=>{let{class:n,className:r,...i}=t;return Object.entries(i).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...s,...u}[t]):({...s,...u})[t]===n})?[...e,n,r]:e},[]),null==n?void 0:n.class,null==n?void 0:n.className)}},84151:(e,t,n)=>{n.d(t,{d:()=>i});let r={};function i(e,t){let n=t||r;return a(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function a(e,t,n){var r;if((r=e)&&"object"==typeof r){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 o(e.children,t,n)}return Array.isArray(e)?o(e,t,n):""}function o(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=a(e[i],t,n);return r.join("")}},84288:(e,t,n)=>{n.d(t,{X:()=>a});var r=n(12115),i=n(4129);function a(e){let[t,n]=r.useState(void 0);return(0,i.N)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,i;if(!Array.isArray(t)||!t.length)return;let a=t[0];if("borderBoxSize"in a){let e=a.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,i=t.blockSize}else r=e.offsetWidth,i=e.offsetHeight;n({width:r,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}},84701:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])},85245:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]])},85591:(e,t,n)=>{n.d(t,{HJ:()=>o,j:()=>a,qF:()=>i});var r=n(14764);function i(e,t="unset"){try{return JSON.parse(e)}catch{return"unset"===t?null:t}}function a(e){try{let t=r.parse(e);if(t&&"object"==typeof t&&!Array.isArray(t))return t;return{}}catch{return{}}}function o(e,t){return n=>Math.min(e*2**(n-1),t)}},85755:(e,t,n)=>{n.d(t,{of:()=>a});var r=n(95868),i=n(78842);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(0,r.lI)(e);return(0,i.H)(e,n)}},87325:(e,t,n)=>{n.d(t,{b:()=>r});let r=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"]},87501:(e,t,n)=>{let r,i,a,o,s,l,u,c;n.d(t,{FQ:()=>nH,FB:()=>nq,Xs:()=>nV,WC:()=>ex,AO:()=>n0,O3:()=>nW,CE:()=>nZ,U3:()=>nK,SJ:()=>nX,NZ:()=>nJ,QG:()=>nQ,Mf:()=>n$,p6:()=>nz,YT:()=>n1});var d=n(12115);class h{constructor(e,t){this.dataListeners=[],this.propsListeners=[],this.currentProps={},this.isConnected=!1,this.context=e,this.behaviorTree=function e(t,n){let r=t;for(;"ZodOptional"===r._def.typeName||"ZodNullable"===r._def.typeName||"ZodDefault"===r._def.typeName;)r=r._def.innerType;if("checks"===n)return{type:"CHECKABLE"};if("ZodUnion"===r._def.typeName){let e=r._def.options;if(e.some(e=>"ZodObject"===e._def.typeName&&e._def.shape().event))return{type:"ACTION"};if(e.some(e=>"ZodObject"===e._def.typeName&&e._def.shape().path&&!e._def.shape().componentId))return{type:"DYNAMIC"};if(e.some(e=>"ZodObject"===e._def.typeName&&e._def.shape().componentId&&e._def.shape().path))return{type:"STRUCTURAL"}}else r._def.typeName;if("ZodArray"===r._def.typeName)return{type:"ARRAY",element:e(r._def.type)};if("ZodObject"===r._def.typeName){let t={};for(let[n,i]of Object.entries(r._def.shape()))t[n]=e(i,n);return{type:"OBJECT",shape:t}}return{type:"STATIC"}}(t),"OBJECT"!==this.behaviorTree.type&&(this.behaviorTree={type:"OBJECT",shape:{}}),this.resolveInitialProps()}resolveInitialProps(){let e=this.context.componentModel.properties,t=this.resolveAndBind(e,this.behaviorTree,[],!0);this.currentProps={...this.currentProps,...t}}connect(){if(this.isConnected)return;this.isConnected=!0;let e=this.context.componentModel.onUpdated.subscribe(()=>{this.rebuildAllBindings()});this.compUnsub=()=>e.unsubscribe(),this.rebuildAllBindings()}rebuildAllBindings(){this.dataListeners.forEach(e=>e()),this.dataListeners=[];let e=this.context.componentModel.properties,t=this.resolveAndBind(e,this.behaviorTree,[],!1);this.currentProps={...this.currentProps,...t},this.notify()}resolveAndBind(e,t,n,r){if(null==e)return e;switch(t.type){case"DYNAMIC":{let t=this.context.dataContext.subscribeDynamicValue(e,e=>{this.updateDeepValue(n,e),this.notify()});return r?t.unsubscribe():this.dataListeners.push(()=>t.unsubscribe()),t.value}case"ACTION":return()=>{let t=e=>{if("object"!=typeof e||null===e)return e;if("path"in e||"call"in e)return this.context.dataContext.resolveDynamicValue(e);if(Array.isArray(e))return e.map(t);let n={};for(let[r,i]of Object.entries(e))n[r]=t(i);return n};this.context.dispatchAction(t(e))};case"STRUCTURAL":if(e&&"object"==typeof e&&e.path&&e.componentId){let t=this.context.dataContext.subscribeDynamicValue({path:e.path},t=>{let r=Array.isArray(t)?t:[],i=this.context.dataContext.nested(e.path),a=r.map((t,n)=>({id:e.componentId,basePath:i.nested(String(n)).path}));this.updateDeepValue(n,a),this.notify()});r?t.unsubscribe():this.dataListeners.push(()=>t.unsubscribe());let i=Array.isArray(t.value)?t.value:[],a=this.context.dataContext.nested(e.path);return i.map((t,n)=>({id:e.componentId,basePath:a.nested(String(n)).path}))}return e;case"CHECKABLE":{let t=Array.isArray(e)?e:[],i=t.map(()=>({valid:!0,message:""})),a=n.slice(0,-1),o=()=>{let e=i.filter(e=>!e.valid).map(e=>e.message);this.updateDeepValue([...a,"isValid"],0===e.length),this.updateDeepValue([...a,"validationErrors"],e),this.notify()};t.forEach((e,t)=>{let n=e.condition||e,a=e.message||"Validation failed";i[t].message=a;let s=this.context.dataContext.subscribeDynamicValue(n,e=>{i[t].valid=!!e,o()});r?s.unsubscribe():this.dataListeners.push(()=>s.unsubscribe()),i[t].valid=!!s.value});let s=i.filter(e=>!e.valid).map(e=>e.message);return this.updateDeepValue([...a,"isValid"],0===s.length),this.updateDeepValue([...a,"validationErrors"],s),e}case"STATIC":return e;case"ARRAY":if(!Array.isArray(e))return e;return e.map((e,i)=>this.resolveAndBind(e,t.element,[...n,i.toString()],r));case"OBJECT":{if("object"!=typeof e)return e;let i={};for(let[a,o]of Object.entries(e)){let e=t.shape[a]||{type:"STATIC"};i[a]=this.resolveAndBind(o,e,[...n,a],r)}for(let[n,r]of Object.entries(t.shape))if("DYNAMIC"===r.type){let t=`set${n.charAt(0).toUpperCase()+n.slice(1)}`,r=e[n];i[t]=e=>{r&&"object"==typeof r&&"path"in r&&this.context.dataContext.set(r.path,e)}}return i}}}updateDeepValue(e,t){this.currentProps=this.cloneAndUpdate(this.currentProps,e,t)}cloneAndUpdate(e,t,n){if(0===t.length)return n;let[r,...i]=t;if(!Array.isArray(e))return{...e||{},[r]:this.cloneAndUpdate((e||{})[r],i,n)};{let t=[...e];return t[Number(r)]=this.cloneAndUpdate(t[Number(r)],i,n),t}}dispose(){this.isConnected&&(this.isConnected=!1,this.dataListeners.forEac
1168h(e=>e()),this.dataListeners=[],this.compUnsub&&(this.compUnsub(),this.compUnsub=void 0))}notify(){this.propsListeners.forEach(e=>e(this.currentProps))}subscribe(e){return 0===this.propsListeners.length&&this.connect(),this.propsListeners.push(e),{unsubscribe:()=>{this.propsListeners=this.propsListeners.filter(t=>t!==e),0===this.propsListeners.length&&this.dispose()}}}get snapshot(){return this.currentProps}}var p=n(95155);function f(e,t){let n=(0,d.memo)(t,(e,t)=>e.props===t.props&&e.context.componentModel.id===t.context.componentModel.id&&e.context.dataContext.path===t.context.dataContext.path);return{name:e.name,schema:e.schema,render:({context:t,buildChild:r})=>{let i=(0,d.useRef)(null);i.current?i.current.context!==t&&(i.current.dispose(),i.current=new h(t,e.schema)):i.current=new h(t,e.schema);let a=i.current,o=(0,d.useSyncExternalStore)((0,d.useCallback)(e=>{let t=a.subscribe(e);return()=>t.unsubscribe()},[a]),(0,d.useCallback)(()=>a.snapshot,[a]));return(0,d.useEffect)(()=>()=>a.dispose(),[a]),(0,p.jsx)(n,{props:o||{},buildChild:r,context:t})}}}let m="1px solid #ccc",g=e=>{switch(e){case"center":return"center";case"end":return"flex-end";case"spaceAround":return"space-around";case"spaceBetween":return"space-between";case"spaceEvenly":return"space-evenly";case"start":default:return"flex-start";case"stretch":return"stretch"}},v=e=>{switch(e){case"start":return"flex-start";case"center":return"center";case"end":return"flex-end";default:return"stretch"}},b=()=>({margin:"8px",boxSizing:"border-box"});var y=n(98734);let E=y.Ik({path:y.Yj().describe("A JSON Pointer path to a value in the data model.")}).describe("REF:common_types.json#/$defs/DataBinding|A JSON Pointer path to a value in the data model."),T=y.Ik({call:y.Yj().describe("The name of the function to call."),args:y.g1(y.bz()).describe("Arguments passed to the function."),returnType:y.k5(["string","number","boolean","array","object","any","void"]).default("boolean")}).describe("REF:common_types.json#/$defs/FunctionCall|Invokes a named function on the client."),k=y.KC([y.zM(),E,T]).describe("REF:common_types.json#/$defs/DynamicBoolean|A boolean value that can be a literal, a path, or a function call returning a boolean."),_=y.KC([y.Yj(),E,T]).describe("REF:common_types.json#/$defs/DynamicString|Represents a string"),A=y.KC([y.ai(),E,T]).describe("REF:common_types.json#/$defs/DynamicNumber|Represents a value that can be either a literal number, a path to a number in the data model, or a function call returning a number."),x=y.KC([y.YO(y.Yj()),E,T]).describe("REF:common_types.json#/$defs/DynamicStringList|Represents a value that can be either a literal array of strings, a path to a string array in the data model, or a function call returning a string array."),w=y.KC([y.Yj(),y.ai(),y.zM(),y.YO(y.bz()),E,T]).describe("REF:common_types.json#/$defs/DynamicValue|A value that can be a literal, a path, or a function call returning any type."),S=y.Yj().describe("REF:common_types.json#/$defs/ComponentId|The unique identifier for a component."),C=y.KC([y.YO(S).describe("A static list of child component IDs."),y.Ik({componentId:S,path:y.Yj().describe("The path to the list of component property objects in the data model.")}).describe("A template for generating a dynamic list of children.")]).describe("REF:common_types.json#/$defs/ChildList"),I=y.KC([y.Ik({event:y.Ik({name:y.Yj(),context:y.g1(w).optional()})}).describe("Triggers a server-side event."),y.Ik({functionCall:T}).describe("Executes a local client-side function.")]).describe("REF:common_types.json#/$defs/Action"),N=y.Ik({condition:k,message:y.Yj().describe("The error message to display if the check fails.")}).describe("REF:common_types.json#/$defs/CheckRule|A check rule consisting of a condition and an error message."),O=y.Ik({checks:y.YO(N).optional().describe("A list of checks to perform.")}).describe("REF:common_types.json#/$defs/Checkable|Properties for components that support client-side checks."),R=y.Ik({label:_.optional().describe("REF:common_types.json#/$defs/DynamicString|A short string used by assistive technologies to convey the purpose of an element."),description:_.optional().describe("REF:common_types.json#/$defs/DynamicString|Additional information provided by assistive technologies about an element.")}).describe("REF:common_types.json#/$defs/AccessibilityAttributes|Attributes to enhance accessibility."),D=(y.Ik({component:y.Yj().describe("The type name of the component."),id:S.optional(),weight:y.ai().optional()}).passthrough().describe("A generic A2UI component definition."),{ComponentId:S,ChildList:C,DynamicString:_,Action:I}),L={accessibility:R.optional(),weight:y.ai().describe("The relative weight of this component within a Row or Column. This is similar to the CSS 'flex-grow' property. Note: this may ONLY be set when the component is a direct descendant of a Row or Column.").optional()},P={name:"Text",schema:y.Ik({...L,text:_.describe("The text content to display. While simple Markdown formatting is supported (i.e. without HTML, images, or links), utilizing dedicated UI components is generally preferred for a richer and more structured presentation."),variant:y.k5(["h1","h2","h3","h4","h5","caption","body"]).default("body").describe("A hint for the base text style.").optional()}).strict()},M={name:"Image",schema:y.Ik({...L,url:_.describe("The URL of the image to display."),description:_.describe("The accessibility description of the image.").optional(),fit:y.k5(["contain","cover","fill","none","scaleDown"]).default("fill").describe("Specifies how the image should be resized to fit its container. This corresponds to the CSS 'object-fit' property.").optional(),variant:y.k5(["icon","avatar","smallFeature","mediumFeature","largeFeature","header"]).default("mediumFeature").describe("A hint for the image size and style.").optional()}).strict()},F={name:"Icon",schema:y.Ik({...L,name:y.KC([y.k5(["accountCircle","add","arrowBack","arrowForward","attachFile","calendarToday","call","camera","check","close","delete","download","edit","event","error","fastForward","favorite","favoriteOff","folder","help","home","info","locationOn","lock","lockOpen","mail","menu","moreVert","moreHoriz","notificationsOff","notifications","pause","payment","person","phone","photo","play","print","refresh","rewind","search","send","settings","share","shoppingCart","skipNext","skipPrevious","star","starHalf","starOff","stop","upload","visibility","visibilityOff","volumeDown","volumeMute","volumeOff","volumeUp","warning"]),y.Ik({svgPath:y.Yj().describe("Custom SVG path data")}).strict(),y.Ik({path:y.Yj()}).strict()]).describe("The name of the icon to display.")}
1168).strict()},B={name:"Video",schema:y.Ik({...L,url:_.describe("The URL of the video to display.")}).strict()},j={name:"AudioPlayer",schema:y.Ik({...L,url:_.describe("The URL of the audio to be played."),description:_.describe("A description of the audio, such as a title or summary.").optional()}).strict()},U={name:"Row",schema:y.Ik({...L,children:C.describe("Defines the children. Use an array of strings for a fixed set of children, or a template object to generate children from a data list. Children cannot be defined inline, they must be referred to by ID."),justify:y.k5(["center","end","spaceAround","spaceBetween","spaceEvenly","start","stretch"]).default("start").describe("Defines the arrangement of children along the main axis (horizontally). Use 'spaceBetween' to push items to the edges, or 'start'/'end'/'center' to pack them together.").optional(),align:y.k5(["start","center","end","stretch"]).default("stretch").describe("Defines the alignment of children along the cross axis (vertically). This is similar to the CSS 'align-items' property, but uses camelCase values (e.g., 'start').").optional()}).strict().describe("A layout component that arranges its children horizontally. To create a grid layout, nest Columns within this Row.")},H={name:"Column",schema:y.Ik({...L,children:C.describe("Defines the children. Use an array of strings for a fixed set of children, or a template object to generate children from a data list. Children cannot be defined inline, they must be referred to by ID."),justify:y.k5(["start","center","end","spaceBetween","spaceAround","spaceEvenly","stretch"]).default("start").describe("Defines the arrangement of children along the main axis (vertically). Use 'spaceBetween' to push items to the edges (e.g. header at top, footer at bottom), or 'start'/'end'/'center' to pack them together.").optional(),align:y.k5(["center","end","start","stretch"]).default("stretch").describe("Defines the alignment of children along the cross axis (horizontally). This is similar to the CSS 'align-items' property.").optional()}).strict().describe("A layout component that arranges its children vertically. To create a grid layout, nest Rows within this Column.")},$={name:"List",schema:y.Ik({...L,children:C.describe("Defines the children. Use an array of strings for a fixed set of children, or a template object to generate children from a data list."),direction:y.k5(["vertical","horizontal"]).default("vertical").describe("The direction in which the list items are laid out.").optional(),align:y.k5(["start","center","end","stretch"]).default("stretch").describe("Defines the alignment of children along the cross axis.").optional(),listStyle:y.k5(["ordered","unordered","none"]).describe("The style of the list (ordered, unordered, or none).").optional()}).strict()},z={name:"Card",schema:y.Ik({...L,child:S.describe("The ID of the single child component to be rendered inside the card. To display multiple elements, you MUST wrap them in a layout component (like Column or Row) and pass that container's ID here. Do NOT pass multiple IDs or a non-existent ID. Do NOT define the child component inline.")}).strict()},G={name:"Tabs",schema:y.Ik({...L,tabs:y.YO(y.Ik({title:_.describe("The tab title."),child:S.describe("The ID of the child component. Do NOT define the component inline.")}).strict()).min(1).describe("An array of objects, where each object defines a tab with a title and a child component.")}).strict()},Y={name:"Modal",schema:y.Ik({...L,trigger:S.describe("The ID of the component that opens the modal when interacted with (e.g., a button). Do NOT define the component inline."),content:S.describe("The ID of the component to be displayed inside the modal. Do NOT define the component inline.")}).strict()},q={name:"Divider",schema:y.Ik({...L,axis:y.k5(["horizontal","vertical"]).default("horizontal").describe("The orientation of the divider.").optional()}).strict()},V={name:"Button",schema:y.Ik({...L,child:S.describe("The ID of the child component. Use a 'Text' component for a labeled button. Only use an 'Icon' if the requirements explicitly ask for an icon-only button. Do NOT define the child component inline."),variant:y.k5(["default","primary","borderless"]).default("default").describe("A hint for the button style. If omitted, a default button style is used. 'primary' indicates this is the main call-to-action button. 'borderless' means the button has no visual border or background, making its child content appear like a clickable link.").optional(),action:I,checks:O.shape.checks}
1168).strict()},W={name:"TextField",schema:y.Ik({...L,label:_.describe("The text label for the input field."),value:_.describe("The value of the text field.").optional(),variant:y.k5(["longText","number","shortText","obscured"]).default("shortText").describe("The type of input field to display.").optional(),validationRegexp:y.Yj().describe("A regular expression used for client-side validation of the input.").optional(),checks:O.shape.checks}).strict()},K={name:"CheckBox",schema:y.Ik({...L,label:_.describe("The text to display next to the checkbox."),value:k.describe("The current state of the checkbox (true for checked, false for unchecked)."),checks:O.shape.checks}).strict()},Z={name:"ChoicePicker",schema:y.Ik({...L,label:_.describe("The label for the group of options.").optional(),variant:y.k5(["multipleSelection","mutuallyExclusive"]).default("mutuallyExclusive").describe("A hint for how the choice picker should be displayed and behave.").optional(),options:y.YO(y.Ik({label:_.describe("The text to display for this option."),value:y.Yj().describe("The stable value associated with this option.")}).strict()).describe("The list of available options to choose from."),value:x.describe("The list of currently selected values. This should be bound to a string array in the data model."),displayStyle:y.k5(["checkbox","chips"]).default("checkbox").describe("The display style of the component.").optional(),filterable:y.zM().default(!1).describe("If true, displays a search input to filter the options.").optional(),checks:O.shape.checks}).strict().describe("A component that allows selecting one or more options from a list.")},X={name:"Slider",schema:y.Ik({...L,label:_.describe("The label for the slider.").optional(),min:y.ai().default(0).describe("The minimum value of the slider.").optional(),max:y.ai().describe("The maximum value of the slider."),step:y.ai().describe("The granularity or step size of the slider.").optional(),value:A.describe("The current value of the slider."),checks:O.shape.checks}).strict()},Q={name:"DateTimeInput",schema:y.Ik({...L,value:_.describe("The selected date and/or time value in ISO 8601 format. If not yet set, initialize with an empty string."),enableDate:y.zM().default(!1).describe("If true, allows the user to select a date.").optional(),enableTime:y.zM().default(!1).describe("If true, allows the user to select a time.").optional(),min:y.KC([_,y.Yj().date(),y.Yj().time(),y.Yj().datetime()]).describe("The minimum allowed date/time in ISO 8601 format.").optional(),max:y.KC([_,y.Yj().date(),y.Yj().time(),y.Yj().datetime()]).describe("The maximum allowed date/time in ISO 8601 format.").optional(),label:_.describe("The text label for the input field.").optional(),checks:O.shape.checks}).strict()},J=f(P,({props:e})=>{let t=e.text??"",n={...b(),display:"inline-block"};switch(e.variant){case"h1":return(0,p.jsx)("h1",{style:n,children:t});case"h2":return(0,p.jsx)("h2",{style:n,children:t});case"h3":return(0,p.jsx)("h3",{style:n,children:t});case"h4":return(0,p.jsx)("h4",{style:n,children:t});case"h5":return(0,p.jsx)("h5",{style:n,children:t});case"caption":return(0,p.jsx)("small",{style:{...n,color:"#666",textAlign:"left"},children:t});default:return(0,p.jsx)("span",{style:n,children:t})}}),ee=f(M,({props:e})=>{let t={...b(),objectFit:(e=>"scaleDown"===e?"scale-down":e||"fill")(e.fit),width:"100%",height:"auto",display:"block"};
1168return"icon"===e.variant?(t.width="24px",t.height="24px"):"avatar"===e.variant?(t.width="40px",t.height="40px",t.borderRadius="50%"):"smallFeature"===e.variant?t.maxWidth="100px":"largeFeature"===e.variant?t.maxHeight="400px":"header"===e.variant&&(t.height="200px",t.objectFit="cover"),(0,p.jsx)("img",{src:e.url,alt:e.description||"",style:t})}),et=f(F,({props:e})=>{let t="string"==typeof e.name?e.name:e.name?.path;return(0,p.jsx)("span",{className:"material-symbols-outlined",style:{...b(),fontSize:"24px",width:"24px",height:"24px",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:t})}),en=f(B,({props:e})=>{let t={...b(),width:"100%",aspectRatio:"16/9"};return(0,p.jsx)("video",{src:e.url,controls:!0,style:t})}),er=f(j,({props:e})=>{let t={...b(),width:"100%"};return(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"4px",width:"100%"},children:[e.description&&(0,p.jsx)("span",{style:{fontSize:"12px",color:"#666"},children:e.description}),(0,p.jsx)("audio",{src:e.url,controls:!0,style:t})]})}),ei=({childList:e,buildChild:t})=>Array.isArray(e)?(0,p.jsx)(p.Fragment,{children:e.map((e,n)=>e&&"object"==typeof e&&"id"in e?(0,p.jsx)(d.Fragment,{children:t(e.id,e.basePath)},`${e.id}-${n}`):"string"==typeof e?(0,p.jsx)(d.Fragment,{children:t(e)},`${e}-${n}`):null)}):null,ea=f(U,({props:e,buildChild:t,context:n})=>(0,p.jsx)("div",{style:{display:"flex",flexDirection:"row",justifyContent:g(e.justify),alignItems:v(e.align),width:"100%",margin:0,padding:0},children:(0,p.jsx)(ei,{childList:e.children,buildChild:t,context:n})})),eo=f(H,({props:e,buildChild:t,context:n})=>(0,p.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:g(e.justify),alignItems:v(e.align),width:"100%",margin:0,padding:0},children:(0,p.jsx)(ei,{childList:e.children,buildChild:t,context:n})})),es=f($,({props:e,buildChild:t,context:n})=>{let r="horizontal"===e.direction;return(0,p.jsx)("div",{style:{display:"flex",flexDirection:r?"row":"column",alignItems:v(e.align),overflowX:r?"auto":"hidden",overflowY:r?"hidden":"auto",width:"100%",margin:0,padding:0},children:(0,p.jsx)(ei,{childList:e.children,buildChild:t,context:n})})}),el=f(z,({props:e,buildChild:t})=>(0,p.jsx)("div",{style:{margin:"8px",padding:"16px",border:m,borderRadius:"8px",boxSizing:"border-box",backgroundColor:"#fff",boxShadow:"0 2px 4px rgba(0,0,0,0.1)",width:"100%"},children:e.child?t(e.child):null})),eu=f(G,({props:e,buildChild:t})=>{let[n,r]=(0,d.useState)(0),i=e.tabs||[],a=i[n];return(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",width:"100%",margin:"8px"},children:[(0,p.jsx)("div",{style:{display:"flex",borderBottom:"1px solid #ccc",marginBottom:"8px"},children:i.map((e,t)=>(0,p.jsx)("button",{onClick:()=>r(t),style:{padding:"8px 16px",border:"none",background:"none",borderBottom:n===t?"2px solid var(--a2ui-primary-color, #007bff)":"none",fontWeight:n===t?"bold":"normal",cursor:"pointer",color:n===t?"var(--a2ui-primary-color, #007bff)":"inherit"},children:e.title},t))}),(0,p.jsx)("div",{style:{flex:1},children:a?t(a.child):null})]})}),ec=f(q,({props:e})=>{let t="vertical"===e.axis,n={margin:"8px",border:"none",backgroundColor:"#ccc"};return t?(n.width="1px",n.height="100%"):(n.width="100%",n.height="1px"),(0,p.jsx)("div",{style:n})}),ed=f(Y,({props:e,buildChild:t})=>{let[n,r]=(0,d.useState)(!1);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{onClick:()=>r(!0),style:{display:"inline-block"},children:e.trigger?t(e.trigger):null}),n&&(0,p.jsx)("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3},onClick:()=>r(!1),children:(0,p.jsxs)("div",{style:{backgroundColor:"#fff",padding:"24px",borderRadius:"8px",maxWidth:"90%",maxHeight:"90%",overflow:"auto",display:"flex",flexDirection:"column"},onClick:e=>e.stopPropagation(),children:[(0,p.jsx)("div",{style:{display:"flex",justifyContent:"flex-end"},children:(0,p.jsx)("button",{onClick:()=>r(!1),style:{border:"none",background:"none",fontSize:"20px",cursor:"pointer",padding:"4px"},children:"\xd7"})}),(0,p.jsx)("div",{style:{flex:1},children:e.content?t(e.content):null})]})})]})}),eh=f(V,({props:e,buildChild:t})=>(0,p.jsx)("button",{style:{margin:"8px",padding:"8px 16px",cursor:"pointer",border:"borderless"===e.variant?"none":"1px solid #ccc",backgroundColor:"primary"===e.variant?"var(--a2ui-primary-color, #007bff)":"borderless"===e.variant?"transparent":"#fff",color:"primary"===e.variant?"#fff":"inherit",borderRadius:"4px",display:"inline-flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box"},onClick:e.action,disabled:!1===e.isValid,children:e.child?t(e.child):null})),ep=f(W,({props:e})=>{let t=t=>{e.setValue(t.target.value)},n="longText"===e.variant,r="number"===e.variant?"number":"obscured"===e.variant?"password":"text",i={padding:"8px",width:"100%",border:m,borderRadius:"8px",boxSizing:"border-box"},a=d.useId(),o=e.validationErrors&&e.validationErrors.length>0;return(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"4px",width:"100%",margin:"8px"},children:[e.label&&(0,p.jsx)("label",{htmlFor:a,style:{fontSize:"14px",fontWeight:"bold"},children:e.label}
1168),n?(0,p.jsx)("textarea",{id:a,style:{...i,border:o?"1px solid red":m},value:e.value||"",onChange:t}):(0,p.jsx)("input",{id:a,type:r,style:{...i,border:o?"1px solid red":m},value:e.value||"",onChange:t}),o&&(0,p.jsx)("span",{style:{fontSize:"12px",color:"red"},children:e.validationErrors[0]})]})}),ef=f(K,({props:e})=>{let t=d.useId(),n=e.validationErrors&&e.validationErrors.length>0;return(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",margin:"8px"},children:[(0,p.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,p.jsx)("input",{id:t,type:"checkbox",checked:!!e.value,onChange:t=>{e.setValue(t.target.checked)},style:{cursor:"pointer",outline:n?"1px solid red":"none"}}),e.label&&(0,p.jsx)("label",{htmlFor:t,style:{cursor:"pointer",color:n?"red":"inherit"},children:e.label})]}),n&&(0,p.jsx)("span",{style:{fontSize:"12px",color:"red",marginTop:"4px"},children:e.validationErrors?.[0]})]})}),em=f(Z,({props:e,context:t})=>{let[n,r]=(0,d.useState)(""),i=Array.isArray(e.value)?e.value:[],a="mutuallyExclusive"===e.variant,o=t=>{if(a)e.setValue([t]);else{let n=i.includes(t)?i.filter(e=>e!==t):[...i,t];e.setValue(n)}},s=(e.options||[]).filter(t=>!e.filterable||""===n||String(t.label).toLowerCase().includes(n.toLowerCase())),l={display:"flex",flexDirection:"chips"===e.displayStyle?"row":"column",flexWrap:"chips"===e.displayStyle?"wrap":"nowrap",gap:"8px"};return(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"8px",margin:"8px",width:"100%"},children:[e.label&&(0,p.jsx)("strong",{style:{fontSize:"14px"},children:e.label}),e.filterable&&(0,p.jsx)("input",{type:"text",placeholder:"Filter options...",value:n,onChange:e=>r(e.target.value),style:{padding:"4px 8px",border:m,borderRadius:"8px"}}),(0,p.jsx)("div",{style:l,children:s.map((n,r)=>{let s=i.includes(n.value);return"chips"===e.displayStyle?(0,p.jsx)("button",{onClick:()=>o(n.value),style:{padding:"4px 12px",borderRadius:"16px",border:s?"1px solid var(--a2ui-primary-color, #007bff)":m,backgroundColor:s?"var(--a2ui-primary-color, #007bff)":"#fff",color:s?"#fff":"inherit",cursor:"pointer",fontSize:"12px"},children:n.label},r):(0,p.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer"},children:[(0,p.jsx)("input",{type:a?"radio":"checkbox",checked:s,onChange:()=>o(n.value),name:a?`choice-${t.componentModel.id}`:void 0}),(0,p.jsx)("span",{style:{fontSize:"14px"},children:n.label})]},r)})})]})}),eg=f(X,({props:e})=>{let t=d.useId();return(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"4px",margin:"8px",width:"100%"},children:[(0,p.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[e.label&&(0,p.jsx)("label",{htmlFor:t,style:{fontSize:"14px",fontWeight:"bold"},children:e.label}),(0,p.jsx)("span",{style:{fontSize:"12px",color:"#666"},children:e.value})]}),(0,p.jsx)("input",{id:t,type:"range",min:e.min??0,max:e.max,value:e.value??0,onChange:t=>{e.setValue(Number(t.target.value))},style:{width:"100%",cursor:"pointer"}})]})}),ev=f(Q,({props:e})=>{let t=d.useId(),n="datetime-local";return e.enableDate&&!e.enableTime&&(n="date"),!e.enableDate&&e.enableTime&&(n="time"),(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"4px",width:"100%",margin:"8px"},children:[e.label&&(0,p.jsx)("label",{htmlFor:t,style:{fontSize:"14px",fontWeight:"bold"},children:e.label}),(0,p.jsx)("input",{id:t,type:n,style:{padding:"8px",width:"100%",border:m,borderRadius:"8px",boxSizing:"border-box"},value:e.value||"",onChange:t=>{e.setValue(t.target.value)},min:"string"==typeof e.min?e.min:void 0,max:"string"==typeof e.max?e.max:void 0})]})});var eb=n(44193);class ey extends Error{constructor(e,t="UNKNOWN_ERROR"){super(e),this.name=this.constructor.name,this.code=t,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class eE extends ey{constructor(e,t){super(e,"VALIDATION_ERROR"),this.details=t}}class eT extends ey{constructor(e,t){super(e,"DATA_ERROR"),this.path=t}}class ek extends ey{constructor(e,t,n){super(e,"EXPRESSION_ERROR"),this.expression=t,this.details=n}}class e_ extends ey{constructor(e){super(e,"STATE_ERROR")}}function eA(e,t){return{name:e.name,returnType:e.returnType,schema:e.schema,execute:t}}class ex{constructor(e,t,n=[],r){this.id=e;let i=new Map;for(let e of t)i.set(e.name,e);this.components=i;let a=new Map;for(let e of n)a.set(e.name,e);this.functions=a,this.themeSchema=r,this.invoker=(e,t,n,r)=>{let i=this.functions.get(e);
1168if(!i)throw new ek(`Function not found in catalog '${this.id}': ${e}`,e);try{let e=i.schema.parse(t);return i.execute(e,n,r)}catch(t){if(t?.name==="ZodError"||t instanceof eb.G)throw new ek(`Validation failed for function '${e}': ${t.message}`,e,t.errors??t.issues);throw t}}}}class ew{static{this.MAX_DEPTH=10}parse(e,t=0){if(t>ew.MAX_DEPTH)throw new ek("Max recursion depth reached in parse");if(!e||!e.includes("${"))return[e];let n=[],r=new eS(e);for(;!r.isAtEnd();)if(r.matches("${")){r.advance(2);let e=this.extractInterpolationContent(r),i=this.parseExpression(e,t+1);null!==i&&n.push(i)}else if("\\"===r.peek()&&"$"===r.peek(1)&&"{"===r.peek(2))r.advance(),n.push("${"),r.advance(2);else{let e=r.pos;for(;!r.isAtEnd()&&!r.matches("${")&&("\\"!==r.peek()||"$"!==r.peek(1)||"{"!==r.peek(2));)r.advance();n.push(r.input.substring(e,r.pos))}return n.filter(e=>null!==e&&""!==e)}extractInterpolationContent(e){let t=e.pos,n=1;for(;!e.isAtEnd()&&n>0;){let t=e.advance();if("{"===t)n++;else if("}"===t)n--;else if("'"===t||'"'===t)for(;!e.isAtEnd();){let n=e.advance();if("\\"===n)e.advance();else if(n===t)break}}if(n>0)throw new ek("Unclosed interpolation: missing '}'");return e.input.substring(t,e.pos-1)}parseExpression(e,t=0){if(!(e=e.trim()))return"";let n=new eS(e),r=this.parseExpressionInternal(n,t);if(!n.isAtEnd())throw new ek(`Unexpected characters at end of expression: '${n.input.substring(n.pos)}'`);return r}parseExpressionInternal(e,t){if(e.skipWhitespace(),e.isAtEnd())return"";if(e.matches("${")){e.advance(2);let n=this.extractInterpolationContent(e);return this.parseExpression(n,t+1)}if(e.matchesString("'")||e.matchesString('"'))return this.parseStringLiteral(e);if(this.isDigit(e.peek()))return this.parseNumberLiteral(e);if(e.matchesKeyword("true"))return!0;if(e.matchesKeyword("false"))return!1;if(e.matchesKeyword("null"))return"";let n=this.scanPathOrIdentifier(e);return(e.skipWhitespace(),"("===e.peek())?this.parseFunctionCall(n,e,t):n?{path:n}:""}scanPathOrIdentifier(e){let t=e.pos;for(;!e.isAtEnd();){let t=e.peek();if(this.isAlnum(t)||"/"===t||"."===t||"_"===t||"-"===t)e.advance();else break}return e.input.substring(t,e.pos)}parseFunctionCall(e,t,n){t.match("("),t.skipWhitespace();let r={};for(;!t.isAtEnd()&&")"!==t.peek();){let i=this.scanIdentifier(t);if(t.skipWhitespace(),!t.match(":"))throw new ek(`Expected ':' after argument name '${i}' in function '${e}'`);t.skipWhitespace(),r[i]=this.parseExpressionInternal(t,n),t.skipWhitespace(),","===t.peek()&&(t.advance(),t.skipWhitespace())}if(!t.match(")"))throw new ek(`Expected ')' after function arguments for '${e}'`);return{call:e,args:r,returnType:"any"}}scanIdentifier(e){let t=e.pos;for(;!e.isAtEnd()&&(this.isAlnum(e.peek())||"_"===e.peek());)e.advance();return e.input.substring(t,e.pos)}parseStringLiteral(e){let t=e.advance(),n="";for(;!e.isAtEnd();){let r=e.advance();if("\\"===r){let t=e.advance();"n"===t?n+="\n":"t"===t?n+="	":"r"===t?n+="\r":n+=t}else if(r===t)break;else n+=r}return n}parseNumberLiteral(e){let t=e.pos;for(;!e.isAtEnd()&&(this.isDigit(e.peek())||"."===e.peek());)e.advance();return Number(e.input.substring(t,e.pos))}isAlnum(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"}isDigit(e){return e>="0"&&e<="9"}}class eS{constructor(e){this.input=e,this.pos=0}isAtEnd(){return this.pos>=this.input.length}peek(e=0){return this.pos+e>=this.input.length?"\0":this.input[this.pos+e]}advance(e=1){let t=this.input.substring(this.pos,this.pos+e);return this.pos+=e,t}match(e){return this.peek()===e&&(this.advance(),!0)}matches(e){return!!this.input.startsWith(e,this.pos)}matchesString(e){return this.peek()===e}matchesKeyword(e){if(this.input.startsWith(e,this.pos)){let t=this.peek(e.length);if(!/[a-zA-Z0-9_]/.test(t))return this.advance(e.length),!0}return!1}skipWhitespace(){for(;!this.isAtEnd()&&/\s/.test(this.peek());)this.advance()}}var eC=Symbol.for("preact-signals");function eI(){if(eL>1)eL--;else{var e,t=!1,n=eB;for(eB=void 0;void 0!==n;){var r=n.S;if(r.v===n.v)for(var i=r.t;void 0!==i;i=i.x)i.i===n.i&&(i.i=r.i);n=n.o}for(;void 0!==eD;){var a=eD;for(eD=void 0,eP++;void 0!==a;){var o=a.u;if(a.u=void 0,a.f&=-3,!(8&a.f)&&e$(a))try{a.c()}catch(n){t||(e=n,t=!0)}a=o}}if(eP=0,eL--,t)throw e}}var eN,eO=void 0;function eR(e){var t=eO,n=eN;eO=void 0,eN=void 0;try{return e()}finally{eO=t,eN=n}}var eD=void 0,eL=0,eP=0,eM=0,eF=0,eB=void 0,ej=0;function eU(e){if(void 0!==eO){var t=e.n;if(void 0===t||t.t!==eO)return t={i:0,S:e,p:eO.s,n:void 0,t:eO,e:void 0,x:void 0,r:t},void 0!==eO.s&&(eO.s.n=t),eO.s=t,e.n=t,32&eO.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=eO.s,t.n=void 0,eO.s.n=t,eO.s=t),t}}function eH(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function e$(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ez(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function eG(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function eY(e,t){eH.call(this,void 0,t),this.x=e,this.s=void 0,this.g=ej-1,this.f=4}function eq(e){var t=e.m;if(e.m=void 0,"function"==typeof t){eL++;var n=eO;eO=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,eV(e),t}finally{eO=n,eI()}}}function eV(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,eq(e)}function eW(e){if(eO!==this)throw Error("Out-of-order effect");
1168eG(this),eO=e,this.f&=-2,8&this.f&&eV(this),eI()}function eK(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name,eN&&eN.push(this)}function eZ(e,t){var n=new eK(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}eH.prototype.brand=eC,eH.prototype.h=function(){return!0},eH.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:eR(function(){var e;null==(e=t.W)||e.call(t)}))},eH.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&eR(function(){var e;null==(e=t.Z)||e.call(t)}))}},eH.prototype.subscribe=function(e){var t=this;return eZ(function(){var n=t.value;eR(function(){return e(n)})},{name:"sub"})},eH.prototype.valueOf=function(){return this.value},eH.prototype.toString=function(){return this.value+""},eH.prototype.toJSON=function(){return this.value},eH.prototype.peek=function(){var e=this;return eR(function(){return e.value})},Object.defineProperty(eH.prototype,"value",{get:function(){var e=eU(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(eP>100)throw Error("Cycle detected");0!==eL&&0===eP&&this.l!==eF&&(this.l=eF,eB={S:this,v:this.v,i:this.i,o:eB}),this.v=e,this.i++,ej++,eL++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{eI()}}}}),eY.prototype=new eH,eY.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f)||(this.f&=-5,this.g===ej))return!0;if(this.g=ej,this.f|=1,this.i>0&&!e$(this))return this.f&=-2,!0;var e=eO;try{ez(this),eO=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return eO=e,eG(this),this.f&=-2,!0},eY.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}eH.prototype.S.call(this,e)},eY.prototype.U=function(e){if(void 0!==this.t&&(eH.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},eY.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(eY.prototype,"value",{get:function(){if(1&this.f)throw Error("Cycle detected");var e=eU(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),eK.prototype.c=function(){var e=this.S();try{if(8&this.f||void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},eK.prototype.S=function(){if(1&this.f)throw Error("Cycle detected");this.f|=1,this.f&=-9,eq(this),ez(this),eL++;var e=eO;return eO=this,eW.bind(this,e)},eK.prototype.N=function(){2&this.f||(this.f|=2,this.u=eD,eD=this)},eK.prototype.d=function(){this.f|=8,1&this.f||eV(this)},eK.prototype.dispose=function(){this.d()},!function(e){r=e.signal,i=e.computed,a=e.effect,o=e.batchWrite,s=e.isSignal,l=e.getValue,u=e.setValue,c=e.peekValue}({signal:function(e,t){return new eH(e,t)},computed:function(e,t){return new eY(e,t)},effect:eZ,batchWrite:function(e){if(eL>0)return e();eF=++eM,eL++;try{return e()}finally{eI()}},isSignal:e=>!!e&&"object"==typeof e&&"value"in e&&"peek"in e,getValue:e=>e.value,setValue:(e,t)=>{e instanceof eY||(e.value=t)},peekValue:e=>e.peek()});let eX={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function eQ(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}let eJ={date:eQ({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:eQ({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:eQ({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},e0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function e1(e){return(t,n)=>{let r;if("formatting"===((null==n?void 0:n.context)?String(n.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,i=(null==n?void 0:n.width)?String(n.width):t;r=e.formattingValues[i]||e.formattingValues[t]}else{let t=e.defaultWidth,i=(null==n?void 0:n.width)?String(n.width):e.defaultWidth;r=e.values[i]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function e2(e){return function(t){let n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.width,a=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(a);if(!o)return null;let s=o[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(l,e=>e.test(s)):function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(l,e=>e.test(s));return n=e.valueCallback?e.valueCallback(u):u,{value:n=r.valueCallback?r.valueCallback(n):n,rest:t.slice(s.length)}}}let e3={code:"en-US",formatDistance:(e,t,n)=>{let r,i=eX[e];if(r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null==n?void 0:n.addSuffix)if(n.comparison&&n.comparison>0)return"in "+r;else return r+" ago";return r},formatLong:eJ,formatRelative:(e,t,n,r)=>e0[e],localize:{ordinalNumber:(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:e1({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:e1({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:e1({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:e1({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1168ay","Saturday"]},defaultWidth:"wide"}),dayPeriod:e1({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:function(e){return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;let i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];return{value:o=n.valueCallback?n.valueCallback(o):o,rest:t.slice(i.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:e2({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:e2({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:e2({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:e2({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:e2({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},e4={},e9=Symbol.for("constructDateFrom");function e5(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&e9 in e?e[e9](t):e instanceof Date?new e.constructor(t):new Date(t)}function e8(e,t){return e5(t||e,e)}function e6(e){let t=e8(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),e-n}function e7(e,t){let n=e8(e,null==t?void 0:t.in);return n.setHours(0,0,0,0),n}function te(e,t){var n,r,i,a,o,s,l,u;let c=null!=(u=null!=(l=null!=(s=null!=(o=null==t?void 0:t.weekStartsOn)?o:null==t||null==(r=t.locale)||null==(n=r.options)?void 0:n.weekStartsOn)?s:e4.weekStartsOn)?l:null==(a=e4.locale)||null==(i=a.options)?void 0:i.weekStartsOn)?u:0,d=e8(e,null==t?void 0:t.in),h=d.getDay();return d.setDate(d.getDate()-(7*(h<c)+h-c)),d.setHours(0,0,0,0),d}function tt(e,t){return te(e,{...t,weekStartsOn:1})}function tn(e,t){let n=e8(e,null==t?void 0:t.in),r=n.getFullYear(),i=e5(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let a=tt(i),o=e5(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);let s=tt(o);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function tr(e,t){var n,r,i,a,o,s,l,u;let c=e8(e,null==t?void 0:t.in),d=c.getFullYear(),h=null!=(u=null!=(l=null!=(s=null!=(o=null==t?void 0:t.firstWeekContainsDate)?o:null==t||null==(r=t.locale)||null==(n=r.options)?void 0:n.firstWeekContainsDate)?s:e4.firstWeekContainsDate)?l:null==(a=e4.locale)||null==(i=a.options)?void 0:i.firstWeekContainsDate)?u:1,p=e5((null==t?void 0:t.in)||e,0);p.setFullYear(d+1,0,h),p.setHours(0,0,0,0);let f=te(p,t),m=e5((null==t?void 0:t.in)||e,0);m.setFullYear(d,0,h),m.setHours(0,0,0,0);let g=te(m,t);return+c>=+f?d+1:+c>=+g?d:d-1}function ti(e,t){let n=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+n}let ta={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return ti("yy"===t?r%100:r,t.length)},M(e,t){let n=e.getMonth();return"M"===t?String(n+1):ti(n+1,2)},d:(e,t)=>ti(e.getDate(),t.length),a(e,t){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];
1168default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>ti(e.getHours()%12||12,t.length),H:(e,t)=>ti(e.getHours(),t.length),m:(e,t)=>ti(e.getMinutes(),t.length),s:(e,t)=>ti(e.getSeconds(),t.length),S(e,t){let n=t.length;return ti(Math.trunc(e.getMilliseconds()*Math.pow(10,n-3)),t.length)}},to={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ts={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){let t=e.getFullYear();return n.ordinalNumber(t>0?t:1-t,{unit:"year"})}return ta.y(e,t)},Y:function(e,t,n,r){let i=tr(e,r),a=i>0?i:1-i;return"YY"===t?ti(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):ti(a,t.length)},R:function(e,t){return ti(tn(e),t.length)},u:function(e,t){return ti(e.getFullYear(),t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ti(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ti(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){let r=e.getMonth();switch(t){case"M":case"MM":return ta.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ti(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){let i=function(e,t){let n=e8(e,null==t?void 0:t.in);return Math.round((te(n,t)-function(e,t){var n,r,i,a,o,s,l,u;let c=null!=(u=null!=(l=null!=(s=null!=(o=null==t?void 0:t.firstWeekContainsDate)?o:null==t||null==(r=t.locale)||null==(n=r.options)?void 0:n.firstWeekContainsDate)?s:e4.firstWeekContainsDate)?l:null==(a=e4.locale)||null==(i=a.options)?void 0:i.firstWeekContainsDate)?u:1,d=tr(e,t),h=e5((null==t?void 0:t.in)||e,0);return h.setFullYear(d,0,c),h.setHours(0,0,0,0),te(h,t)}(n,t))/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):ti(i,t.length)},I:function(e,t,n){let r=function(e,t){let n=e8(e,void 0);return Math.round((tt(n)-function(e,t){let n=tn(e,void 0),r=e5(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),tt(r)}(n))/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):ti(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):ta.d(e,t)},D:function(e,t,n){let r=function(e,t){let n=e8(e,void 0);return function(e,t,n){let[r,i]=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let i=e5.bind(null,e||n.find(e=>"object"==typeof e));return n.map(i)}(void 0,e,t),a=e7(r),o=e7(i);return Math.round((a-e6(a)-(o-e6(o)))/864e5)}(n,function(e,t){let n=e8(e,void 0);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):ti(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ti(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){let i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ti(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){let r=e.getDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return ti(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){let r,i=e.getHours();switch(r=12===i?to.noon:0===i?to.midnight:i/12>
1168=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){let r,i=e.getHours();switch(r=i>=17?to.evening:i>=12?to.afternoon:i>=4?to.morning:to.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return ta.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):ta.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):ti(r,t.length)},k:function(e,t,n){let r=e.getHours();return(0===r&&(r=24),"ko"===t)?n.ordinalNumber(r,{unit:"hour"}):ti(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ta.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ta.s(e,t)},S:function(e,t){return ta.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return tu(r);case"XXXX":case"XX":return tc(r);default:return tc(r,":")}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"x":return tu(r);case"xxxx":case"xx":return tc(r);default:return tc(r,":")}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+tl(r,":");default:return"GMT"+tc(r,":")}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+tl(r,":");default:return"GMT"+tc(r,":")}},t:function(e,t,n){return ti(Math.trunc(e/1e3),t.length)},T:function(e,t,n){return ti(+e,t.length)}};function tl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return 0===a?n+String(i):n+String(i)+t+ti(a,2)}function tu(e,t){return e%60==0?(e>0?"-":"+")+ti(Math.abs(e)/60,2):tc(e,t)}function tc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=Math.abs(e);return(e>0?"-":"+")+ti(Math.trunc(n/60),2)+t+ti(n%60,2)}let td=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},th=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},tp={p:th,P:(e,t)=>{let n,r=e.match(/(P+)(p+)?/)||[],i=r[1],a=r[2];if(!a)return td(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",td(i,t)).replace("{{time}}",th(a,t))}},tf=/^D+$/,tm=/^Y+$/,tg=["D","DD","YY","YYYY"],tv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ty=/^'([^]*?)'?$/,tE=/''/g,tT=/[a-zA-Z]/,tk={name:"add",returnType:"number",schema:y.Ik({a:y.vk(e=>null===e?void 0:e,y.au.number()),b:y.vk(e=>null===e?void 0:e,y.au.number())})},t_={name:"subtract",returnType:"number",schema:y.Ik({a:y.vk(e=>null===e?void 0:e,y.au.number()),b:y.vk(e=>null===e?void 0:e,y.au.number())})},tA={name:"multiply",returnType:"number",schema:y.Ik({a:y.vk(e=>null===e?void 0:e,y.au.number()),b:y.vk(e=>null===e?void 0:e,y.au.number())})},tx={name:"divide",returnType:"number",schema:y.Ik({a:y.vk(e=>null===e?void 0:e,y.au.number()),b:y.vk(e=>null===e?void 0:e,y.au.number())})},tw={name:"equals",returnType:"boolean",schema:y.Ik({a:y.bz().refine(e=>void 0!==e,"Required"),b:y.bz().refine(e=>void 0!==e,"Required")})},tS={name:"not_equals",returnType:"boolean",schema:y.Ik({a:y.bz().refine(e=>void 0!==e,"Required"),b:y.bz().refine(e=>void 0!==e,"Required")})},tC={name:"greater_than",returnType:"boolean",schema:y.Ik({a:y.vk(e=>null===e?void 0:e,y.au.number()),b:y.vk(e=>null===e?void 0:e,y.au.number())})},tI={name:"less_than",returnType:"boolean",schema:y.Ik({a:y.vk(e=>null===e?void 0:e,y.au.number()),b:y.vk(e=>null===e?void 0:e,y.au.number())})},tN={name:"and",returnType:"boolean",schema:y.Ik({values:y.YO(y.bz()).min(2)})},tO={name:"or",returnType:"boolean",schema:y.Ik({values:y.YO(y.bz()).min(2)})},tR={name:"not",returnType:"boolean",schema:y.Ik({value:y.bz().refine(e=>void 0!==e,"Required")})},tD={name:"contains",returnType:"boolean",schema:y.Ik({string:y.vk(e=>void 0===e?void 0:String(e),y.Yj()),substring:y.vk(e=>void 0===e?void 0:String(e),y.Yj())})},tL={name:"starts_with",returnType:"boolean",schema:y.Ik({string:y.vk(e=>void 0===e?void 0:String(e),y.Yj()),prefix:y.vk(e=>void 0===e?void 0:String(e),y.Yj())})}
1168,tP={name:"ends_with",returnType:"boolean",schema:y.Ik({string:y.vk(e=>void 0===e?void 0:String(e),y.Yj()),suffix:y.vk(e=>void 0===e?void 0:String(e),y.Yj())})},tM={name:"required",returnType:"boolean",schema:y.Ik({value:y.bz().refine(e=>void 0!==e,"Required")})},tF={name:"regex",returnType:"boolean",schema:y.Ik({value:y.vk(e=>void 0===e?void 0:String(e),y.Yj()),pattern:y.vk(e=>void 0===e?void 0:String(e),y.Yj())})},tB={name:"length",returnType:"boolean",schema:y.Ik({value:y.bz().refine(e=>void 0!==e,"Required"),min:y.au.number().optional(),max:y.au.number().optional()}).refine(e=>void 0!==e.min||void 0!==e.max,{message:"Must provide either 'min' or 'max'"})},tj={name:"numeric",returnType:"boolean",schema:y.Ik({value:y.au.number(),min:y.au.number().optional(),max:y.au.number().optional()}).refine(e=>void 0!==e.min||void 0!==e.max,{message:"Must provide either 'min' or 'max'"})},tU={name:"email",returnType:"boolean",schema:y.Ik({value:y.vk(e=>void 0===e?void 0:String(e),y.Yj())})},tH={name:"formatString",returnType:"any",schema:y.Ik({value:y.au.string()})},t$={name:"formatNumber",returnType:"string",schema:y.Ik({value:y.au.number(),decimals:y.au.number().optional(),grouping:y.zM().default(!0)})},tz={name:"formatCurrency",returnType:"string",schema:y.Ik({value:y.au.number(),currency:y.au.string(),decimals:y.au.number().optional(),grouping:y.zM().default(!0)})},tG={name:"formatDate",returnType:"string",schema:y.Ik({value:y.bz().refine(e=>void 0!==e,"Required"),format:y.au.string()})},tY={name:"pluralize",returnType:"string",schema:y.Ik({value:y.au.number(),zero:y.au.string().optional(),one:y.au.string().optional(),two:y.au.string().optional(),few:y.au.string().optional(),many:y.au.string().optional(),other:y.au.string()})},tq={name:"openUrl",returnType:"void",schema:y.Ik({url:y.vk(e=>void 0===e?void 0:String(e),y.Yj())})},tV=eA(tk,e=>e.a+e.b),tW=eA(t_,e=>e.a-e.b),tK=eA(tA,e=>e.a*e.b),tZ=eA(tx,e=>{let t=e.a,n=e.b;if(null==t||null==n)return NaN;let r=Number(t),i=Number(n);return Number.isNaN(r)||Number.isNaN(i)?NaN:0===i?1/0:r/i}),tX=eA(tw,e=>e.a===e.b),tQ=eA(tS,e=>e.a!==e.b),tJ=eA(tC,e=>e.a>e.b),t0=eA(tI,e=>e.a<e.b),t1=eA(tN,e=>e.values.every(e=>!!e)),t2=eA(tO,e=>e.values.some(e=>!!e)),t3=eA(tR,e=>!e.value),t4=eA(tD,e=>e.string.includes(e.substring)),t9=eA(tL,e=>e.string.startsWith(e.prefix)),t5=eA(tP,e=>e.string.endsWith(e.suffix)),t8=eA(tM,e=>{let t=e.value;return!(null==t||"string"==typeof t&&""===t||Array.isArray(t)&&0===t.length)}),t6=eA(tF,e=>{try{return new RegExp(e.pattern).test(e.value)}catch(t){throw new ek(`Invalid regex pattern: ${e.pattern}`,"regex",t)}}),t7=eA(tB,e=>{let t=e.value,n=0;return("string"==typeof t||Array.isArray(t))&&(n=t.length),(void 0===e.min||!!isNaN(e.min)||!(n<e.min))&&(void 0===e.max||!!isNaN(e.max)||!(n>e.max))}),ne=eA(tj,e=>!isNaN(e.value)&&(void 0===e.min||!!isNaN(e.min)||!(e.value<e.min))&&(void 0===e.max||!!isNaN(e.max)||!(e.value>e.max))),nt=eA(tU,e=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e.value)),nn=eA(tH,(e,t)=>{let n=e.value,r=new ew().parse(n);if(0===r.length)return"";let a=r.map(e=>"object"!=typeof e||null===e||Array.isArray(e)?e:t.resolveSignal(e));return i(()=>a.map(e=>(function(e){if(null==e)return"";if("object"==typeof e)try{return JSON.stringify(e)??String(e)}catch{}return String(e)})(s(e)?l(e):e)).join(""))}),nr=new Map;function ni(e){return eA(t$,t=>{if(isNaN(t.value))return"";try{return(function(e,t,n){let r=`${e??"default"}:${t??"undef"}:${n??"true"}`,i=nr.get(r);return i||(i=new Intl.NumberFormat(e,{minimumFractionDigits:t,maximumFractionDigits:t,useGrouping:n}),nr.set(r,i)),i})(e,t.decimals,t.grouping).format(t.value)}catch(e){return console.warn("Error formatting number:",e),void 0!==t.decimals?t.value.toFixed(t.decimals):String(t.value)}})}ni();let na=new Map;function no(e){return eA(tz,t=>{if(isNaN(t.value))return"";try{return(function(e,t,n,r){let i=`${e??"default"}:${t}:${n??"undef"}:${r??"true"}`,a=na.get(i);return a||(a=new Intl.NumberFormat(e,{style:"currency",currency:t,minimumFractionDigits:n,maximumFractionDigits:n,useGrouping:r}),na.set(i,a)),a})(e,t.currency,t.decimals,t.grouping).format(t.value)}catch(e){return console.warn("Error formatting currency:",e),t.value.toFixed(t.decimals??2)}})}no();let ns=eA(tG,e=>
1168{if(!e.value)return"";let t=new Date(e.value);if(isNaN(t.getTime()))return"";try{if("ISO"===e.format)return t.toISOString();return function(e,t,n){var r,i,a,o,s,l,u,c,d,h,p,f,m,g,v,b,y;let E=null!=(d=e4.locale)?d:e3,T=null!=(m=null!=(f=null!=(p=(h=void 0,null==n||null==(i=n.locale)||null==(r=i.options)?void 0:r.firstWeekContainsDate))?p:e4.firstWeekContainsDate)?f:null==(o=e4.locale)||null==(a=o.options)?void 0:a.firstWeekContainsDate)?m:1,k=null!=(y=null!=(b=null!=(v=null!=(g=null==n?void 0:n.weekStartsOn)?g:null==n||null==(l=n.locale)||null==(s=l.options)?void 0:s.weekStartsOn)?v:e4.weekStartsOn)?b:null==(c=e4.locale)||null==(u=c.options)?void 0:u.weekStartsOn)?y:0,_=e8(e,null==n?void 0:n.in);if(!(_ instanceof Date||"object"==typeof _&&"[object Date]"===Object.prototype.toString.call(_))&&"number"!=typeof _||isNaN(+e8(_)))throw RangeError("Invalid time value");let A=t.match(tb).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,tp[t])(e,E.formatLong):e}).join("").match(tv).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t)return{isToken:!1,value:function(e){let t=e.match(ty);return t?t[1].replace(tE,"'"):e}(e)};if(ts[t])return{isToken:!0,value:e};if(t.match(tT))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});E.localize.preprocessor&&(A=E.localize.preprocessor(_,A));let x={firstWeekContainsDate:T,weekStartsOn:k,locale:E};return A.map(r=>{if(!r.isToken)return r.value;let i=r.value;return(!(null==n?void 0:n.useAdditionalWeekYearTokens)&&tm.test(i)||!(null==n?void 0:n.useAdditionalDayOfYearTokens)&&tf.test(i))&&function(e,t,n){let r=function(e,t,n){let r="Y"===e[0]?"years":"days of the month";return"Use `".concat(e.toLowerCase(),"` instead of `").concat(e,"` (in `").concat(t,"`) for formatting ").concat(r," to the input `").
1168concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")}(e,t,n);if(console.warn(r),tg.includes(e))throw RangeError(r)}(i,t,String(e)),(0,ts[i[0]])(_,i,E.localize,x)}).join("")}(t,e.format)}catch(e){return console.warn("Error formatting date:",e),t.toISOString()}}),nl=new Map;function nu(e){return eA(tY,t=>{try{let n=(function(e){let t=e??"default",n=nl.get(t);return n||(n=new Intl.PluralRules(e),nl.set(t,n)),n})(e).select(t.value);return String(t[n]??t.other??"")}catch(e){return console.warn("Error in pluralize:",e),String(t.other??"")}})}nu();let nc=eA(tq,e=>{if(e.url&&"undefined"!=typeof window&&window.open){let t,n=void 0!==window.location&&window.location.href?window.location.href:void 0;try{t=n?new URL(e.url,n):new URL(e.url)}catch(t){throw new ek(`Invalid URL specified: ${e.url}`,"openUrl",t)}if("https:"!==t.protocol&&"http:"!==t.protocol)throw new ek(`Unsupported URL scheme: ${t.protocol}`,"openUrl");window.open(t.href,"_blank","noopener,noreferrer")}}),nd=new ex("https://a2ui.org/specification/v0_9/basic_catalog.json",[J,ee,et,en,er,ea,eo,es,el,eu,ec,ed,eh,ep,ef,em,eg,ev],function(e){let t=void 0;return[tV,tW,tK,tZ,tX,tQ,tJ,t0,t1,t2,t3,t4,t9,t5,t8,t6,t7,ne,nt,nn,ni(t),no(t),ns,nu(t),nc]}()),nh=(0,d.createContext)(void 0);function np({theme:e,children:t}){return(0,p.jsx)(nh.Provider,{value:e??{},children:t})}class nf{constructor(e,t){this.surface=e,this.path=t,this.dataModel=e.dataModel,this.functionInvoker=e.catalog.invoker}set(e,t){let n=this.resolvePath(e);this.dataModel.set(n,t)}resolveDynamicValue(e){if(null===e||"object"!=typeof e||Array.isArray(e))return e;if("path"in e){let t=this.resolvePath(e.path);return this.dataModel.get(t)}if("call"in e){let t={};for(let[n,r]of Object.entries(e.args))t[n]=this.resolveDynamicValue(r);let n=new AbortController,r=this.evaluateFunctionReactive(e.call,t,n.signal);if(void 0===r)return;return s(r)?c(r):r}return e}subscribeDynamicValue(e,t){let n=this.resolveSignal(e),r=!0,i=c(n),o=a(()=>{let e=l(n);i=e,r||t(e)});return r=!1,{get value(){return i},unsubscribe:()=>{o(),n.unsubscribe?.()}}}resolveSignal(e){if("object"!=typeof e||null===e||Array.isArray(e))return r(e);if("path"in e){let t=this.resolvePath(e.path);return this.dataModel.getSignal(t)}if("call"in e){var t;let n,o,c={};for(let[t,n]of Object.entries(e.args))c[t]=this.resolveSignal(n);if(0===Object.keys(c).length){let t=new AbortController,n=this.evaluateFunctionReactive(e.call,{},t.signal),i=s(n)?n:r(n);return i.unsubscribe=()=>t.abort(),i}let d=Object.keys(c),h=r(void 0),p=i(()=>{let e={};for(let n=0;n<d.length;n++){var t;e[d[n]]=(t=c[d[n]],l(t))}return e}),f=(t=()=>{try{let t=l(p);n&&n.abort(),o&&(o(),o=void 0),n=new AbortController;let r=this.evaluateFunctionReactive(e.call,t,n.signal);s(r)?o=a(()=>{var e;e=l(r),u(h,e)}):u(h,r)}catch(t){this.dispatchExpressionError(t,e.call),u(h,void 0)}},a(t));return h.unsubscribe=()=>{f(),o&&o(),n&&n.abort();for(let e=0;e<d.length;e++)c[d[e]].unsubscribe?.()},h}return r(e)}resolveAction(e){if("event"in e){let t={};if(e.event.context)for(let[n,r]of Object.entries(e.event.context))t[n]=this.resolveDynamicValue(r);return{event:{...e.event,context:t}}}return"functionCall"in e?this.resolveDynamicValue(e.functionCall):e}evaluateFunctionReactive(e,t,n){try{return this.functionInvoker(e,t,this,n)}catch(t){this.dispatchExpressionError(t,e);return}}dispatchExpressionError(e,t){if(e?.name==="ZodError"||e instanceof eb.G){let n=new ek(`Validation failed for function '${t}': ${e.message}`,t,e.errors??e.issues);this.surface.dispatchError({code:"EXPRESSION_ERROR",message:n.message,expression:t,details:n.details})}else e instanceof ek?this.surface.dispatchError({code:"EXPRESSION_ERROR",message:e.message,expression:e.expression,details:e.details}):this.surface.dispatchError({code:"EXPRESSION_ERROR",message:e.message??`An unexpected error occurred in function ${t}.`,expression:t,details:{stack:e.stack}})}nested(e){let t=this.resolvePath(e);return new nf(this.surface,t)}resolvePath(e){if(e.startsWith("/"))return e;if(""===e||"."===e)return this.path;let t=this.path;return t.endsWith("/")&&t.length>
11681&&(t=t.slice(0,-1)),"/"===t&&(t=""),`${t}/${e}`}}class nm{constructor(e,t,n="/"){let r=e.componentsModel.get(t);if(!r)throw new e_(`Component not found: ${t}`);this.componentModel=r,this.surfaceComponents=e.componentsModel,this.theme=e.theme,this.dataContext=new nf(e,n),this._actionDispatcher=t=>e.dispatchAction(t,this.componentModel.id)}dispatchAction(e){return this._actionDispatcher(e)}}let ng=(0,d.memo)(({surface:e,id:t,basePath:n,compImpl:r,componentModel:i})=>{let a=r.render,o=(0,d.useMemo)(()=>new nm(e,t,n),[e,t,n,i]);return(0,p.jsx)(a,{context:o,buildChild:(0,d.useCallback)((t,n)=>{let r=n||o.dataContext.path;return(0,p.jsx)(nv,{surface:e,id:t,basePath:r},`${t}-${r}`)},[e,o.dataContext.path])})});ng.displayName="ResolvedChild";let nv=(0,d.memo)(({surface:e,id:t,basePath:n})=>{let r=(0,d.useMemo)(()=>{let n=0;return{subscribe:r=>{let i=e.componentsModel.onCreated.subscribe(e=>{e.id===t&&(n++,r())}),a=e.componentsModel.onDeleted.subscribe(e=>{e===t&&(n++,r())});return()=>{i.unsubscribe(),a.unsubscribe()}},getSnapshot:()=>{let r=e.componentsModel.get(t);return r?`${r.type}-${n}`:`missing-${n}`}}},[e,t]);(0,d.useSyncExternalStore)(r.subscribe,r.getSnapshot);let i=e.componentsModel.get(t);if(!i)return(0,p.jsx)("div",{style:{padding:"12px 16px",borderRadius:"8px",background:"linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%)",backgroundSize:"200% 100%",animation:"a2ui-shimmer 1.5s ease-in-out infinite",minHeight:"2rem"},children:(0,p.jsx)("style",{children:"@keyframes a2ui-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }"})});let a=e.catalog.components.get(i.type);return a?(0,p.jsx)(ng,{surface:e,id:t,basePath:n,componentModel:i,compImpl:a}):(0,p.jsxs)("div",{style:{color:"red"},children:["Unknown component: ",i.type]})});nv.displayName="DeferredChild";let nb=({surface:e})=>(0,p.jsx)(nv,{surface:e,id:"root",basePath:"/"}),ny=f({name:"Text",schema:y.Ik({text:D.DynamicString,variant:y.k5(["h1","h2","h3","h4","h5","caption","body"]).optional()})},({props:e})=>{let t=e.text??"";switch(e.variant){case"h1":return(0,p.jsx)("h1",{children:t});case"h2":return(0,p.jsx)("h2",{children:t});case"h3":return(0,p.jsx)("h3",{children:t});case"h4":return(0,p.jsx)("h4",{children:t});case"h5":return(0,p.jsx)("h5",{children:t});case"caption":return(0,p.jsx)("small",{children:t});default:return(0,p.jsx)("span",{children:t})}}),nE=f({name:"Button",schema:y.Ik({child:D.ComponentId,action:D.Action,variant:y.k5(["primary","borderless"]).optional()})},({props:e,buildChild:t})=>(0,p.jsx)("button",{style:{padding:"8px 16px",cursor:"pointer",border:"borderless"===e.variant?"none":"1px solid #ccc",backgroundColor:"primary"===e.variant?"#007bff":"transparent",color:"primary"===e.variant?"#fff":"inherit",borderRadius:"4px"},onClick:e.action,children:e.child?t(e.child):null})),nT=({childList:e,buildChild:t})=>Array.isArray(e)?(0,p.jsx)(p.Fragment,{children:e.map((e,n)=>e&&"object"==typeof e&&"id"in e?(0,p.jsx)(d.Fragment,{children:t(e.id,e.basePath)},`${e.id}-${n}`):"string"==typeof e?(0,p.jsx)(d.Fragment,{children:t(e)},`${e}-${n}`):null)}):null,nk=f({name:"Row",schema:y.Ik({children:D.ChildList,justify:y.k5(["center","end","spaceAround","spaceBetween","spaceEvenly","start","stretch"]).optional(),align:y.k5(["start","center","end","stretch"]).optional()})},({props:e,buildChild:t})=>(0,p.jsx)("div",{style:{display:"flex",flexDirection:"row",justifyContent:(e=>{switch(e){case"center":return"center";case"end":return"flex-end";case"spaceAround":return"space-around";case"spaceBetween":return"space-between";case"spaceEvenly":return"space-evenly";case"start":default:return"flex-start";case"stretch":return"stretch"}})(e.justify),alignItems:(e=>{switch(e){case"start":return"flex-start";case"center":return"center";case"end":return"flex-end";default:return"stretch"}})(e.align)},children:(0,p.jsx)(nT,{childList:e.children,buildChild:t})})),n_=f({name:"Column",schema:y.Ik({children:D.ChildList,justify:y.k5(["start","center","end","spaceBetween","spaceAround","spaceEvenly","stretch"]).optional(),align:y.k5(["center","end","start","stretch"]).optional()})},({props:e,buildChild:t})=>(0,p.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:(e=>{switch(e){case"center":return"center";case"end":return"flex-end";case"spaceAround":return"space-around";case"spaceBetween":return"space-between";case"spaceEvenly":return"space-evenly";case"start":default:return"flex-start";case"stretch":return"stretch"}})(e.justify),alignItems:(e=>{switch(e){case"start":return"flex-start";case"center":return"center";case"end":return"flex-end";default:return"stretch"}})(e.align),gap:"8px"},children:(0,p.jsx)(nT,{childList:e.children,buildChild:t})}));function nA(e){return/^\d+$/.test(e)}new ex("https://a2ui.org/specification/v0_9/catalogs/minimal/minimal_catalog.json",[ny,nE,nk,n_,f({name:"TextField",
1168schema:y.Ik({label:D.DynamicString,value:D.DynamicString,variant:y.k5(["longText","number","shortText","obscured"]).optional(),validationRegexp:y.Yj().optional()})},({props:e,context:t})=>{let n=t=>{e.setValue&&e.setValue(t.target.value)},r="longText"===e.variant,i="number"===e.variant?"number":"obscured"===e.variant?"password":"text",a={padding:"8px",width:"100%",border:"1px solid #ccc",borderRadius:"4px",boxSizing:"border-box"},o=`textfield-${t.componentModel.id}`;return(0,p.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"4px",width:"100%"},children:[e.label&&(0,p.jsx)("label",{htmlFor:o,style:{fontSize:"14px",fontWeight:"bold"},children:e.label}),r?(0,p.jsx)("textarea",{id:o,style:a,value:e.value||"",onChange:n}):(0,p.jsx)("input",{id:o,type:i,style:a,value:e.value||"",onChange:n})]})})],[eA({name:"capitalize",returnType:"string",schema:y.Ik({value:y.L5()})},e=>{let t=e.value;return"string"==typeof t?t.toUpperCase():t})]);class nx{constructor(e={}){this.data={},this.signals=new Map,this.subscriptions=new Set,this.data=e}getSignal(e){var t;let n=this.normalizePath(e);return this.signals.has(n)||this.signals.set(n,(t=this.get(n),r(t))),this.signals.get(n)}set(e,t){if(null==e)throw new eT("Path cannot be null or undefined.");if("/"===e||""===e)return this.data=t,this.notifyAllSignals(),this;let n=this.parsePath(e),r=n.pop();this.data||(this.data={});let i=this.data;for(let t=0;t<n.length;t++){let a=n[t];if(Array.isArray(i)&&!nA(a))throw new eT(`Cannot use non-numeric segment '${a}' on an array in path '${e}'.`,e);if(void 0!==i[a]&&null!==i[a]&&"object"!=typeof i[a])throw new eT(`Cannot set path '${e}': segment '${a}' is a primitive value.`,e);if(void 0===i[a]||null===i[a]){let e=t<n.length-1?n[t+1]:r;i[a]=nA(e)?[]:{}}i=i[a]}if(Array.isArray(i)&&!nA(r))throw new eT(`Cannot use non-numeric segment '${r}' on an array in path '${e}'.`,e);return void 0===t?Array.isArray(i)?i[parseInt(r,10)]=void 0:delete i[r]:i[r]=t,this.notifySignals(e),this}get(e){if(null==e)throw new eT("Path cannot be null or undefined.");if("/"===e||""===e)return this.data;let t=this.parsePath(e),n=this.data;for(let e of t){if(null==n)return;n=n[e]}return n}subscribe(e,t){let n=this.getSignal(e),r=!0,i=c(n),o=a(()=>{let e=l(n);i=e,r||t(e)});return r=!1,this.subscriptions.add(o),{get value(){return i},unsubscribe:()=>{o(),this.subscriptions.delete(o)}}}dispose(){for(let e of this.subscriptions)e();this.subscriptions.clear(),this.signals.clear()}normalizePath(e){return e.length>1&&e.endsWith("/")?e.slice(0,-1):e||"/"}parsePath(e){return e.split("/").filter(e=>e.length>0).map(e=>e.replace(/~([01])/g,(e,t)=>"1"===t?"/":"~"))}notifySignals(e){let t=this.normalizePath(e);o(()=>{this.updateSignal(t);let e=t;for(;"/"!==e&&""!==e;)e=e.substring(0,e.lastIndexOf("/"))||"/",this.updateSignal(e);for(let e of this.signals.keys())this.isDescendant(e,t)&&this.updateSignal(e)})}updateSignal(e){let t=this.signals.get(e);if(t){var n,r;let i=this.get(e);Array.isArray(i)?(n=[...i],u(t,n)):"object"==typeof i&&null!==i?(r={...i},u(t,r)):u(t,i)}}notifyAllSignals(){o(()=>{for(let e of this.signals.keys())this.updateSignal(e)})}isDescendant(e,t){return"/"===t||""===t?"/"!==e:e.startsWith(t+"/")}}class nw{constructor(){this.listeners=new Set}subscribe(e){return this.listeners.add(e),{unsubscribe:()=>this.listeners.delete(e)}}async emit(e){for(let t of this.listeners)try{await t(e)}catch(e){console.error("EventEmitter error:",e)}}dispose(){this.listeners.clear()}}class nS{constructor(){this.components=new Map,this._onCreated=new nw,this._onDeleted=new nw,this.onCreated=this._onCreated,this.onDeleted=this._onDeleted}get(e){return this.components.get(e)}get entries(){return this.components.entries()}addComponent(e){if(this.components.has(e.id))throw new e_(`Component with id '${e.id}' already exists.`);this.components.set(e.id,e),this._onCreated.emit(e)}removeComponent(e){let t=this.components.get(e);t&&(this.components.delete(e),t.dispose(),this._onDeleted.emit(e))}dispose(){for(let e of this.components.values())e.dispose();this.components.clear(),this._onCreated.dispose(),this._onDeleted.dispose()}}let nC=y.Ik({name:y.Yj().describe("The name of the action, taken from the component's action.event.name property."),surfaceId:y.Yj().describe("The id of the surface where the event originated."),sourceComponentId:y.Yj().describe("The id of the component that triggered the event."),timestamp:y.Yj().datetime().describe("An ISO 8601 timestamp of when the event occurred."),context:y.g1(y.bz()).describe("A JSON object c
1168ontaining the key-value pairs from the component's action.event.context, after resolving all data bindings.")}).strict(),nI=y.Ik({code:y.eu("VALIDATION_FAILED"),surfaceId:y.Yj().describe("The id of the surface where the error occurred."),path:y.Yj().describe("The JSON pointer to the field that failed validation (e.g. '/components/0/text')."),message:y.Yj().describe("A short one or two sentence description of why validation failed.")}).strict(),nN=y.Ik({code:y.Yj().refine(e=>"VALIDATION_FAILED"!==e),message:y.Yj().describe("A short one or two sentence description of why the error occurred."),surfaceId:y.Yj().describe("The id of the surface where the error occurred.")}).passthrough(),nO=y.KC([nI,nN]),nR=y.Ik({version:y.eu("v0.9")}).and(y.KC([y.Ik({action:nC}),y.Ik({error:nO})]));y.Ik({version:y.eu("v0.9"),surfaces:y.g1(y.Ik({}).passthrough()).describe("A map of surface IDs to their current data models.")}).strict();let nD=y.YO(nR).describe("A list of client messages.");y.Ik({messages:nD}).strict().describe("An object wrapping a list of client messages.");class nL{constructor(e,t,n={},r=!1){this.id=e,this.catalog=t,this.theme=n,this.sendDataModel=r,this._onAction=new nw,this._onError=new nw,this.onAction=this._onAction,this.onError=this._onError,this.dataModel=new nx({}),this.componentsModel=new nS}async dispatchAction(e,t){if(e&&"object"==typeof e&&"event"in e&&e.event){let n={name:e.event.name,surfaceId:this.id,sourceComponentId:t,timestamp:new Date().toISOString(),context:e.event.context||{}},r=nC.safeParse(n);r.success?await this._onAction.emit(r.data):console.error("A2UI: Invalid action payload dispatched.",r.error.format())}}async dispatchError(e){await this._onError.emit({...e,surfaceId:this.id})}dispose(){this.dataModel.dispose(),this.componentsModel.dispose(),this._onAction.dispose(),this._onError.dispose()}}class nP{constructor(){this.surfaces=new Map,this.surfaceUnsubscribers=new Map,this._onSurfaceCreated=new nw,this._onSurfaceDeleted=new nw,this._onAction=new nw,this.onSurfaceCreated=this._onSurfaceCreated,this.onSurfaceDeleted=this._onSurfaceDeleted,this.onAction=this._onAction}addSurface(e){if(this.surfaces.has(e.id))return void console.warn(`Surface ${e.id} already exists. Ignoring.`);this.surfaces.set(e.id,e);let t=e.onAction.subscribe(e=>this._onAction.emit(e));this.surfaceUnsubscribers.set(e.id,t),this._onSurfaceCreated.emit(e)}deleteSurface(e){let t=this.surfaces.get(e);if(t){let n=this.surfaceUnsubscribers.get(e);n&&(n.unsubscribe(),this.surfaceUnsubscribers.delete(e)),this.surfaces.delete(e),t.dispose(),this._onSurfaceDeleted.emit(e)}}getSurface(e){return this.surfaces.get(e)}get surfacesMap(){return this.surfaces}dispose(){for(let e of Array.from(this.surfaces.keys()))this.deleteSurface(e);this._onSurfaceCreated.dispose(),this._onSurfaceDeleted.dispose(),this._onAction.dispose()}}class nM{constructor(e,t,n){this.id=e,this.type=t,this._onUpdated=new nw,this.onUpdated=this._onUpdated,this._properties=n}get properties(){return this._properties}set properties(e){this._properties=e,this._onUpdated.emit(this)}dispose(){this._onUpdated.dispose()}
1168get componentTree(){return{id:this.id,type:this.type,...this._properties}}}var nF=n(22220);class nB{constructor(e,t){this.catalogs=e,this.actionHandler=t,this.model=new nP,this.actionHandler&&this.model.onAction.subscribe(this.actionHandler)}getClientCapabilities(e){let t={"v0.9":{supportedCatalogIds:this.catalogs.map(e=>e.id)}};return e?.includeInlineCatalogs&&(t["v0.9"].inlineCatalogs=this.catalogs.map(e=>this.generateInlineCatalog(e))),t}generateInlineCatalog(e){let t,n={};for(let[t,r]of e.components.entries()){let e=(0,nF.Ik)(r.schema,{target:"jsonSchema2019-09"});this.processRefs(e),n[t]={allOf:[{$ref:"common_types.json#/$defs/ComponentCommon"},{properties:{component:{const:t},...e.properties},required:["component",...e.required||[]]}]}}let r=[];for(let t of e.functions.values()){let e=(0,nF.Ik)(t.schema,{target:"jsonSchema2019-09"});this.processRefs(e),r.push({name:t.name,description:t.schema.description,returnType:t.returnType,parameters:e})}if(e.themeSchema){let n=(0,nF.Ik)(e.themeSchema,{target:"jsonSchema2019-09"});this.processRefs(n),t=n.properties}return{catalogId:e.id,components:n,functions:r.length>0?r:void 0,theme:t}}processRefs(e){if("object"==typeof e&&null!==e){if("string"==typeof e.description&&e.description.startsWith("REF:")){let t=e.description.substring(4).split("|"),n=t[0],r=t[1]||"";for(let t of Object.keys(e))delete e[t];e.$ref=n,r&&(e.description=r);return}if(Array.isArray(e))for(let t of e)this.processRefs(t);else for(let t of Object.keys(e))this.processRefs(e[t])}}getClientDataModel(){let e={};for(let t of this.model.surfacesMap.values())t.sendDataModel&&(e[t.id]=t.dataModel.get("/"));if(0!==Object.keys(e).length)return{version:"v0.9",surfaces:e}}onSurfaceCreated(e){return this.model.onSurfaceCreated.subscribe(e)}onSurfaceDeleted(e){return this.model.onSurfaceDeleted.subscribe(e)}processMessages(e){for(let t of Array.isArray(e)?e:e.messages)this.processMessage(t)}processMessage(e){let t=["createSurface","updateComponents","updateDataModel","deleteSurface"].filter(t=>t in e);if(t.length>1)throw new eE(`Message contains multiple update types: ${t.join(", ")}.`);return"createSurface"in e?void this.processCreateSurfaceMessage(e):"deleteSurface"in e?void this.processDeleteSurfaceMessage(e):"updateComponents"in e?void this.processUpdateComponentsMessage(e):"updateDataModel"in e?void this.processUpdateDataModelMessage(e):void 0}processCreateSurfaceMessage(e){let{surfaceId:t,catalogId:n,theme:r,sendDataModel:i}=e.createSurface,a=this.catalogs.find(e=>e.id===n);if(!a)throw new e_(`Catalog not found: ${n}`);if(this.model.getSurface(t))throw new e_(`Surface ${t} already exists.`);let o=new nL(t,a,r,i??!1);this.model.addSurface(o)}processDeleteSurfaceMessage(e){let t=e.deleteSurface;t.surfaceId&&this.model.deleteSurface(t.surfaceId)}processUpdateComponentsMessage(e){let t=e.updateComponents;if(!t.surfaceId)return;let n=this.model.getSurface(t.surfaceId);if(!n)throw new e_(`Surface not found for message: ${t.surfaceId}`);for(let e of t.components){let{id:t,component:r,...i}=e;if(!t)throw new eE(`Component '${r}' is missing an 'id'.`);let a=n.componentsModel.get(t);if(a)if(r&&r!==a.type){n.componentsModel.removeComponent(t);let e=new nM(t,r,i);n.componentsModel.addComponent(e)}else a.properties=i;else{if(!r)throw new eE(`Cannot create component ${t} without a type.`);let e=new nM(t,r,i);n.componentsModel.addComponent(e)}}}processUpdateDataModelMessage(e){let t=e.updateDataModel;if(!t.surfaceId)return;let n=this.model.getSurface(t.surfaceId);if(!n)throw new e_(`Surface not found for message: ${t.surfaceId}`);let r=t.path||"/",i=t.value;n.dataModel.set(r,i)}resolvePath(e,t){if(e.startsWith("/"))return e;if(t){let n=t.endsWith("/")?t:`${t}/`;return`${n}${e}`}return`/${e}`}}let nj=(0,d.createContext)(null),nU=(0,d.createContext)(null);function nH({onAction:e,theme:t,catalog:n,children:r}){let i=(0,d.useRef)(e??null);i.current=e??null;let a=(0,d.useRef)(null);a.current||(a.current=new nB([n??nd],e=>{if(i.current){let t={userAction:{name:e?.name??"unknown",surfaceId:e?.surfaceId??"default",sourceComponentId:e?.sourceComponentId,context:e?.context,timestamp:e?.timestamp??new Date().toISOString()}};i.current(t)}}));let o=a.current,[s,l]=(0,d.useState)(0),[u,c]=(0,d.useState)(null),h=(0,d.useRef)(null);h.current||(h.current={processMessages:e=>{try{o.processMessages(e)}catch(e){console.warn("[A2UI] processMessages error:",e),c(e instanceof Error?e.message:String(e));return}c(null),l(e=>e+1)},dispatch:e=>{i.current&&i.current(e)},getSurface:e=>o.model.getSurface(e),clearSurfaces:()=>{for(let[e]of o.model.surfacesMap)o.processMessages([{version:"v0.9",deleteSurface:{surfaceId:e}}]);l(e=>e+1)}});let f=h.current,m=(0,d.useMemo)(()=>({version:s,error:u}),[s,u]);return(0,p.jsx)(nj.Provider,{value:f,children:(0,p.jsx)(nU.Provider,{value:m,children:(0,p.jsx)(np,{theme:t,children:r})})})}function n$(){let e=(0,d.useContext)(nj);if(!e)throw Error("useA2UIActions must be used within an A2UIProvider");return e}function nz(){return(0,d.useContext)(nU)?.error??null}var nG=n(2821);let nY=(0,d.memo)(function(){return(0,p.jsx)("div",{className:"a2ui-loading",style:{padding:"16px",o
1168pacity:.5},children:"Loading..."})}),nq=(0,d.memo)(function({surfaceId:e,className:t,fallback:n=null,loadingFallback:r}){let{getSurface:i,version:a}=function(){let e=n$(),t=function(){let e=(0,d.useContext)(nU);if(!e)throw Error("useA2UIState must be used within an A2UIProvider");return e}();return{processMessages:e.processMessages,getSurface:e.getSurface,clearSurfaces:e.clearSurfaces,version:t.version}}(),o=i(e);if(!o)return(0,p.jsx)(p.Fragment,{children:n});let s=r??(0,p.jsx)(nY,{});return(0,p.jsx)("div",{className:function(...e){return(0,nG.$)(e)}("a2ui-surface",t),"data-surface-id":e,"data-version":a,children:(0,p.jsx)(d.Suspense,{fallback:s,children:(0,p.jsx)(nb,{surface:o})})})}),nV="A2UI Component Schema — available components for generating UI surfaces. Use these component names and properties when creating A2UI operations.";function nW(e){let t=e??nd,n=[];if(n.push("Available A2UI catalog:"),"https://a2ui.org/specification/v0_9/basic_catalog.json"===t.id)return n.push(`- ${t.id} (basic catalog)`),n.join("\n");let r=function(e){for(let t of nd.components.keys())if(!e.components.has(t))return!1;return!0}(t),i=function(e){let t=[];for(let n of e.components.keys())nd.components.has(n)||t.push(n);return t}(t);for(let e of(n.push(`- ${t.id}`),r?n.push("  Extends the basic catalog with all standard components plus:"):(n.push("  Custom catalog (does NOT include all basic components)."),n.push("  Custom components:")),i)){let r=t.components.get(e);if(!r)continue;let i=(0,nF.Ik)(r.schema);n.push(`  - ${e}:`),n.push(`    ${JSON.stringify(i,null,2).split("\n").join("\n    ")}`)}return n.join("\n")}function nK(e){let t=e??nd,n={};for(let[e,r]of t.components){let t=(0,nF.Ik)(r.schema,{target:"jsonSchema2019-09"});n[e]={allOf:[{$ref:"common_types.json#/$defs/ComponentCommon"},{properties:{component:{const:e},...t.properties??{}},required:["component",...t.required??[]]}]}}return{catalogId:t.id,components:n}}function nZ(e,t,n){let r=n?.catalogId??"copilotkit://custom-catalog",i=n?.includeBasicCatalog===!0,a=[];for(let[n,r]of Object.entries(e)){let e={name:n,schema:r.props},i=t[n],o=f(e,({props:e,buildChild:t,context:n})=>{let r=e=>n.dispatchAction(e);return(0,p.jsx)(i,{props:e,children:t,dispatch:r})});a.push(o)}return new ex(r,i?[...Array.from(nd.components.values()),...a]:a,i?Array.from(nd.functions.values()):[])}function nX(e,t){let n=[];for(let[r,i]of e.components)t(r)&&n.push(i);let r=Array.from(e.functions.values());return new ex(e.id,n,r,e.themeSchema)}function nQ(){}function nJ(){}let n0="default",n1={}},88658:(e,t,n)=>{var r,i;n.d(t,{CR:()=>o,ZS:()=>r,Zp:()=>a}),function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw Error()},e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(r||(r={})),(i||(i={})).mergeShapes=(e,t)=>({...e,...t});let a=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),o=e=>{switch(typeof e){case"undefined":return a.undefined;case"string":return a.string;case"number":return Number.isNaN(e)?a.nan:a.number;case"boolean":return a.boolean;case"function":return a.function;case"bigint":return a.bigint;case"symbol":return a.symbol;case"object":if(Array.isArray(e))return a.array;if(null===e)return a.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return a.promise;if("undefined"!=typeof Map&&e instanceof Map)return a.map;if("undefined"!=typeof Set&&e instanceof Set)return a.set;if("undefined"!=typeof Date&&e instanceof Date)return a.date;return a.object;default:return a.unknown}}},89526:(e,t,n)=>{n.d(t,{m:()=>i});var r=n(39097);function i(e){return e&&(0,r.T)(e.schedule)}},89577:(e,t,n)=>{n.d(t,{F:()=>i,m:()=>a});var r=n(77163);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a(e)}function a(e){return 0===e.length?r.D:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}},91007:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(12115);let i=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},a=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];
1168return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let s=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:u="",children:c,iconNode:d,...h}=e;return(0,r.createElement)("svg",{ref:t,...o,width:i,height:i,stroke:n,strokeWidth:l?24*Number(s)/Number(i):s,className:a("lucide",u),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(h)&&{"aria-hidden":"true"},...h},[...d.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(c)?c:[c]])}),l=(e,t)=>{let n=(0,r.forwardRef)((n,o)=>{let{className:l,...u}=n;return(0,r.createElement)(s,{ref:o,iconNode:t,className:a("lucide-".concat(i(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),l),...u})});return n.displayName=i(e),n}},91239:(e,t,n)=>{n.d(t,{U:()=>r});var r={now:function(){return(r.delegate||Date).now()},delegate:void 0}},91436:(e,t,n)=>{n.d(t,{n:()=>o});var r=n(8286),i=n(96948),a=n(28400);function o(e,t){return(0,i.N)(function(n,i){var o=null,s=0,l=!1,u=function(){return l&&!o&&i.complete()};n.subscribe((0,a._)(i,function(n){null==o||o.unsubscribe();var l=0,c=s++;(0,r.Tg)(e(n,c)).subscribe(o=(0,a._)(i,function(e){return i.next(t?t(n,e,c,l++):e)},function(){o=null,u()}))},function(){l=!0,u()}))})}},91494:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]])},92172:(e,t,n)=>{n.d(t,{$:()=>i,b:()=>r});let r=`\
1169Generate A2UI v0.9 JSON.
1170
1171## A2UI Protocol Instructions
1172
1173A2UI (Agent to UI) is a protocol for rendering rich UI surfaces from agent responses.
1174
1175CRITICAL: You MUST call the render_a2ui tool with ALL of these arguments:
1176- surfaceId: A unique ID for the surface (e.g. "product-comparison")
1177- components: REQUIRED — the A2UI component array. NEVER omit this. Only use
1178  components listed in the Available Components schema provided as context.
1179- data: OPTIONAL — a JSON object written to the root of the surface data model.
1180  Use for pre-filling form values or providing data for path-bound components.
1181- every component must have the "component" field specifying the component type.
1182  ONLY use component names from the Available Components schema — do NOT invent
1183  component names or use names not in the schema.
1184
1185COMPONENT ID RULES:
1186- Exactly one component MUST have id="root". This is the surface's entry
1187  point — the renderer begins at "root" and walks the child/children tree
1188  from there. Every other component must be reachable from "root". If no
1189  component has id="root", the surface renders an empty loading placeholder
1190  and none of your components will be shown.
1191- Every component ID must be unique within the surface.
1192- A component MUST NOT reference itself as child/children. This causes a
1193  circular dependency error. For example, if a component has id="avatar",
1194  its child must be a DIFFERENT id (e.g. "avatar-img"), never "avatar".
1195- The child/children tree must be a DAG — no cycles allowed.
1196
1197REPEATING CONTENT (TEMPLATES):
1198To repeat a component for each item in an array, use the structural children format:
1199  children: { componentId: "card-id", path: "/items" }
1200This tells the renderer to create one instance of "card-id" per item in the "/items" array.
1201
1202PATH RULES FOR TEMPLATES:
1203Components inside a repeating template use RELATIVE paths (no leading slash).
1204The path is resolved relative to each array item automatically.
1205If a container has children: { componentId: "card", path: "/items" } and each item
1206has a key "name", use { "path": "name" } (NO leading slash — relative to item).
1207CRITICAL: Do NOT use "/name" (absolute) inside templates — use "name" (relative).
1208The container's path ("/items") uses a leading slash (absolute), but all
1209components INSIDE the template use paths WITHOUT leading slash.
1210
1211COMPONENT VALUES — DEFAULT RULE:
1212Use inline literal values for ALL component properties. Pass strings, numbers,
1213arrays, and objects directly on the component. Do NOT use { "path": "..." }
1214objects unless the property's schema explicitly allows it (see exception below).
1215CRITICAL: USING { "path": "..." } ON A PROPERTY THAT DOES NOT DECLARE PATH
1216SUPPORT IN ITS SCHEMA WILL CAUSE A RUNTIME CRASH AND BREAK THE ENTIRE UI.
1217ALWAYS CHECK THE COMPONENT SCHEMA FIRST — IF THE PROPERTY ONLY ACCEPTS A
1218PLAIN TYPE, YOU MUST USE A LITERAL VALUE.
1219VERY IMPORTANT: THE APPLICATION WILL BREAK IF YOU DO NOT FOLLOW THIS RULE!
1220
1221For example, a chart's "data" must always be an inline array:
1222  "data": [{"label": "Jan", "value": 100}, {"label": "Feb", "value": 200}]
1223A metric's "value" must always be an inline string:
1224  "value": "$1,200"
1225
1226PATH BINDING EXCEPTION — SCHEMA-DRIVEN:
1227A few properties accept { "path": "/some/path" } as an alternative to a literal
1228value. You can identify these in the Available Components schema: the property
1229will list BOTH a literal type AND an object-with-path option. If a property only
1230shows a single type (string, number, array, etc.), it does NOT support path
1231binding — use a literal value only.
1232
1233Path binding is typically used for editable form inputs so the client can write
1234user input back to the data model. When building forms:
1235- Bind input "value" to a data model path: "value": { "path": "/form/name" }
1236- Pre-fill via the "data" tool argument: "data": { "form": { "name": "Alice" } }
1237- Capture values on submit via button action context:
1238    "action": { "event": { "name": "submit", "context": { "name": { "path": "/form/name" } } } }
1239
1240REPEATING CONTENT uses a structural children format (not the same as value binding):
1241  children: { componentId: "card-id", path: "/items" }
1242Components inside templates use RELATIVE paths (no leading slash): { "path": "name" }.`,i=`\
1243Create polished, visually appealing interfaces. ONLY use components listed in the
1244Available Components schema — do NOT use component names that are not in the schema.
1245
1246Design principles:
1247- Create clear visual hierarchy within cards and layouts.
1248- Keep cards clean — avoid clutter. Whitespace is good.
1249- Use consistent surfaceIds (lowercase, hyphenated).
1250- NEVER use the same ID for a component and its child — this creates a
1251  circular dependency. E.g. if id="avatar", child must NOT be "avatar".
1252- For side-by-side comparisons, use a container with structural children
1253  (children: { componentId, path }) to repeat a card template per data item.
1254- Include images when relevant (logos, icons, product photos):
1255  - Prefer company logos via Google favicons: https://www.google.com/s2/favicons?domain=example.com&sz=128
1256  - Do NOT invent Unsplash photo-IDs — they will 404. Only use real, known URLs.
1257- For buttons: action MUST use this exact nested format:
1258    "action": { "event": { "name": "myAction", "context": { "key": "value" } } }
1259  The "event" key holds an OBJECT with "name" (required) and "context" (optional).
1260  Do NOT use a flat format like {"event": "name"} — "event" must be an object.
1261- For forms: check the component schema — if an input's "value" property
1262  supports path binding, use it for editable fields. The submit button's
1263  action context should reference the same paths to capture user input.
1264
1265Use the SAME surfaceId as the main surface. Match action names to button action event names.`},92453:(e,t,n)=>{n.d(t,{$:()=>s});var r=n(71450),i=n(28400),a=n(45037),o=n(8286);function s(e,t){void 0===t&&(t={});var n=t.selector,s=(0,r.Tt)(t,["selector"]);return new a.c(function(t){var a=new AbortController,l=a.signal,u=!0,c=s.signal;if(c)if(c.aborted)a.abort();else{var d=function(){l.aborted||a.abort()};c.addEventListener("abort",d),t.add(function(){return c.removeEventListener("abort",d)})}var h=(0,r.Cl)((0,r.Cl)({},s),{signal:l}),p=function(e){u=!1,t.error(e)};return fetch(e,h).then(function(e){n?(0,o.Tg)(n(e)).subscribe((0,i._)(t,void 0,function(){u=!1,t.complete()},p)):(u=!1,t.next(e),t.complete())}).catch(p),function(){u&&a.abort()}})}},92556:(e,t,n)=>{function r(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}n.d(t,{mK:()=>r}),"undefined"!=typeof window&&window.document&&window.document.createElement},94446:(e,t,n)=>{n.d(t,{s:()=>o,t:()=>a});var r=n(12115);function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function a(...e){return t=>{let n=!1,r=e.map(e=>{let r=i(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof n?n():i(e[t],null)}}}}function o(...e){return r.useCallback(a(...e),e)}}
1265,95139:(e,t,n)=>{n.d(t,{YR:()=>i});var r=n(56522);function i(e,t,n,i){let a,o,s;"function"==typeof t&&"function"!=typeof n?(o=void 0,s=t,a=n):(o=t,s=n,a=i),(0,r.VG)(e,o,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return s(e,r,n)},a)}},95502:(e,t,n)=>{n.d(t,{C:()=>r});let r=function(e){var t,n;if(null==e)return a;if("function"==typeof e)return i(e);if("object"==typeof e){return Array.isArray(e)?function(e){let t=[],n=-1;for(;++n<e.length;)t[n]=r(e[n]);return i(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}(e):(t=e,i(function(e){let n;for(n in t)if(e[n]!==t[n])return!1;return!0}))}if("string"==typeof e){return n=e,i(function(e){return e&&e.type===n})}throw Error("Expected function, string, or object as test")};function i(e){return function(t,n,r){return!!(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 a(){return!0}},95578:(e,t,n)=>{n.d(t,{D:()=>r});function r(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if("string"!=typeof t)throw TypeError("Expected substring");for(;-1!==r;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}},95736:(e,t,n)=>{n.d(t,{UC:()=>tn,q7:()=>tr,ZL:()=>tt,bL:()=>e7,wv:()=>ti,Pb:()=>ta,G5:()=>ts,ZP:()=>to,l9:()=>te});var r=n(12115),i=n(92556),a=n(94446),o=n(3468),s=n(23558),l=n(97602),u=n(49972),c=n(66218),d=n(44831),h=n(19526),p=n(69666),f=n(68946),m=n(66093),g=n(75433),v=n(76842),b=n(70222),y=n(95155),E="rovingFocusGroup.onEntryFocus",T={bubbles:!1,cancelable:!0},k="RovingFocusGroup",[_,A,x]=(0,u.N)(k),[w,S]=(0,o.A)(k,[x]),[C,I]=w(k),N=r.forwardRef((e,t)=>(0,y.jsx)(_.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,y.jsx)(_.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,y.jsx)(O,{...e,ref:t})})}));N.displayName=k;var O=r.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:o,loop:u=!1,dir:d,currentTabStopId:h,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:f,onEntryFocus:m,preventScrollOnEntryFocus:g=!1,...v}=e,_=r.useRef(null),x=(0,a.s)(t,_),w=(0,c.jH)(d),[S,I]=(0,s.i)({prop:h,defaultProp:null!=p?p:null,onChange:f,caller:k}),[N,O]=r.useState(!1),R=(0,b.c)(m),D=A(n),L=r.useRef(!1),[M,F]=r.useState(0);return r.useEffect(()=>{let e=_.current;if(e)return e.addEventListener(E,R),()=>e.removeEventListener(E,R)},[R]),(0,y.jsx)(C,{scope:n,orientation:o,dir:w,loop:u,currentTabStopId:S,onItemFocus:r.useCallback(e=>I(e),[I]),onItemShiftTab:r.useCallback(()=>O(!0),[]),onFocusableItemAdd:r.useCallback(()=>F(e=>e+1),[]),onFocusableItemRemove:r.useCallback(()=>F(e=>e-1),[]),children:(0,y.jsx)(l.sG.div,{tabIndex:N||0===M?-1:0,"data-orientation":o,...v,ref:x,style:{outline:"none",...e.style},onMouseDown:(0,i.mK)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,i.mK)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!N){let t=new CustomEvent(E,T);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=D().filter(e=>e.focusable);P([e.find(e=>e.active),e.find(e=>e.id===S),...e].filter(Boolean).map(e=>e.ref.current),g)}}L.current=!1}),onBlur:(0,i.mK)(e.onBlur,()=>O(!1))})})}),R="RovingFocusGroupItem",D=r.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:a=!0,active:o=!1,tabStopId:s,children:u,...c}=e,d=(0,f.B)(),h=s||d,p=I(R,n),m=p.currentTabStopId===h,g=A(n),{onFocusableItemAdd:v,onFocusableItemRemove:b,currentTabStopId:E}=p;return r.useEffect(()=>{if(a)return v(),()=>b()},[a,v,b]),(0,y.jsx)(_.ItemSlot,{scope:n,id:h,focusable:a,active:o,children:(0,y.jsx)(l.sG.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:(0,i.mK)(e.onMouseDown,e=>{a?p.onItemFocus(h):e.preventDefault()}),onFocus:(0,i.mK)(e.onFocus,()=>p.onItemFocus(h)),onKeyDown:(0,i.mK)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,n){var r;let i=(r=e.key,"rtl"!==n?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return L[i]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=g().filter(e=>
1265e.focusable).map(e=>e.ref.current);if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?function(e,t){return e.map((n,r)=>e[(t+r)%e.length])}(n,r+1):n.slice(r+1)}setTimeout(()=>P(n))}}),children:"function"==typeof u?u({isCurrentTabStop:m,hasTabStop:null!=E}):u})})});D.displayName=R;var L={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function P(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}var M=n(32467),F=n(97745),B=n(14432),j=["Enter"," "],U=["ArrowUp","PageDown","End"],H=["ArrowDown","PageUp","Home",...U],$={ltr:[...j,"ArrowRight"],rtl:[...j,"ArrowLeft"]},z={ltr:["ArrowLeft"],rtl:["ArrowRight"]},G="Menu",[Y,q,V]=(0,u.N)(G),[W,K]=(0,o.A)(G,[V,m.Bk,S]),Z=(0,m.Bk)(),X=S(),[Q,J]=W(G),[ee,et]=W(G),en=e=>{let{__scopeMenu:t,open:n=!1,children:i,dir:a,onOpenChange:o,modal:s=!0}=e,l=Z(t),[u,d]=r.useState(null),h=r.useRef(!1),p=(0,b.c)(o),f=(0,c.jH)(a);return r.useEffect(()=>{let e=()=>{h.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>h.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),r.useEffect(()=>{if(!n)return;let e=()=>p(!1);return window.addEventListener("blur",e),()=>window.removeEventListener("blur",e)},[n,p]),(0,y.jsx)(m.bL,{...l,children:(0,y.jsx)(Q,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:(0,y.jsx)(ee,{scope:t,onClose:r.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:f,modal:s,children:i})})})};en.displayName=G;var er=r.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Z(n);return(0,y.jsx)(m.Mz,{...i,...r,ref:t})});er.displayName="MenuAnchor";var ei="MenuPortal",[ea,eo]=W(ei,{forceMount:void 0}),es=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=J(ei,t);return(0,y.jsx)(ea,{scope:t,forceMount:n,children:(0,y.jsx)(v.C,{present:n||a.open,children:(0,y.jsx)(g.Z,{asChild:!0,container:i,children:r})})})};es.displayName=ei;var el="MenuContent",[eu,ec]=W(el),ed=r.forwardRef((e,t)=>{let n=eo(el,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=J(el,e.__scopeMenu),o=et(el,e.__scopeMenu);return(0,y.jsx)(Y.Provider,{scope:e.__scopeMenu,children:(0,y.jsx)(v.C,{present:r||a.open,children:(0,y.jsx)(Y.Slot,{scope:e.__scopeMenu,children:o.modal?(0,y.jsx)(eh,{...i,ref:t}):(0,y.jsx)(ep,{...i,ref:t})})})})}),eh=r.forwardRef((e,t)=>{let n=J(el,e.__scopeMenu),o=r.useRef(null),s=(0,a.s)(t,o);return r.useEffect(()=>{let e=o.current;if(e)return(0,F.Eq)(e)},[]),(0,y.jsx)(em,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:(0,i.mK)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),ep=r.forwardRef((e,t)=>{let n=J(el,e.__scopeMenu);return(0,y.jsx)(em,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),ef=(0,M.TL)("MenuContent.ScrollLock"),em=r.forwardRef((e,t)=>{let{__scopeMenu:n,loop:o=!1,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:b,onInteractOutside:E,onDismiss:T,disableOutsideScroll:k,..._}=e,A=J(el,n),x=et(el,n),w=Z(n),S=X(n),C=q(n),[I,O]=r.useState(null),R=r.useRef(null),D=(0,a.s)(t,R,A.onContentChange),L=r.useRef(0),P=r.useRef(""),M=r.useRef(0),F=r.useRef(null),j=r.useRef("right"),$=r.useRef(0),z=k?B.A:r.Fragment;r.useEffect(()=>()=>window.clearTimeout(L.current),[]),(0,h.Oh)();let G=r.useCallback(e=>{var t,n;return j.current===(null==(t=F.current)?void 0:t.side)&&function(e,t){return!!t&&function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],l=o.x,u=o.y,c=s.x,d=s.y;u>r!=d>r&&n<(c-l)*(r-u)/(d-u)+l&&(i=!i)}return i}({x:e.clientX,y:e.clientY},t)}(e,null==(n=F.current)?void 0:n.area)},[]);return(0,y.jsx)(eu,{scope:n,searchRef:P,onItemEnter:r.useCallback(e=>{G(e)&&e.preventDefault()},[G]),onItemLeave:r.useCallback(e=>{var t;
1265G(e)||(null==(t=R.current)||t.focus(),O(null))},[G]),onTriggerLeave:r.useCallback(e=>{G(e)&&e.preventDefault()},[G]),pointerGraceTimerRef:M,onPointerGraceIntentChange:r.useCallback(e=>{F.current=e},[]),children:(0,y.jsx)(z,{...k?{as:ef,allowPinchZoom:!0}:void 0,children:(0,y.jsx)(p.n,{asChild:!0,trapped:s,onMountAutoFocus:(0,i.mK)(l,e=>{var t;e.preventDefault(),null==(t=R.current)||t.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:(0,y.jsx)(d.qW,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:b,onInteractOutside:E,onDismiss:T,children:(0,y.jsx)(N,{asChild:!0,...S,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:I,onCurrentTabStopIdChange:O,onEntryFocus:(0,i.mK)(f,e=>{x.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,y.jsx)(m.UC,{role:"menu","aria-orientation":"vertical","data-state":ez(A.open),"data-radix-menu-content":"",dir:x.dir,...w,..._,ref:D,style:{outline:"none",..._.style},onKeyDown:(0,i.mK)(_.onKeyDown,e=>{let t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;let r=P.current+e,i=C().filter(e=>!e.disabled),a=document.activeElement,o=null==(t=i.find(e=>
1265e.ref.current===a))?void 0:t.textValue,s=function(e,t,n){var r;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=n?e.indexOf(n):-1,o=(r=Math.max(a,0),e.map((t,n)=>e[(r+n)%e.length]));1===i.length&&(o=o.filter(e=>e!==n));let s=o.find(e=>e.toLowerCase().startsWith(i.toLowerCase()));return s!==n?s:void 0}(i.map(e=>e.textValue),r,o),l=null==(n=i.find(e=>e.textValue===s))?void 0:n.ref.current;!function e(t){P.current=t,window.clearTimeout(L.current),""!==t&&(L.current=window.setTimeout(()=>e(""),1e3))}(r),l&&setTimeout(()=>l.focus())})(e.key));let i=R.current;if(e.target!==i||!H.includes(e.key))return;e.preventDefault();let a=C().filter(e=>!e.disabled).map(e=>e.ref.current);U.includes(e.key)&&a.reverse(),function(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}(a)}),onBlur:(0,i.mK)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(L.current),P.current="")}),onPointerMove:(0,i.mK)(e.onPointerMove,eq(e=>{let t=e.target,n=$.current!==e.clientX;e.currentTarget.contains(t)&&n&&(j.current=e.clientX>$.current?"right":"left",$.current=e.clientX)}))})})})})})})});ed.displayName=el;var eg=r.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,y.jsx)(l.sG.div,{role:"group",...r,ref:t})});eg.displayName="MenuGroup";var ev=r.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,y.jsx)(l.sG.div,{...r,ref:t})});ev.displayName="MenuLabel";var eb="MenuItem",ey="menu.itemSelect",eE=r.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:o,...s}=e,u=r.useRef(null),c=et(eb,e.__scopeMenu),d=ec(eb,e.__scopeMenu),h=(0,a.s)(t,u),p=r.useRef(!1);return(0,y.jsx)(eT,{...s,ref:h,disabled:n,onClick:(0,i.mK)(e.onClick,()=>{let e=u.current;if(!n&&e){let t=new CustomEvent(ey,{bubbles:!0,cancelable:!0});e.addEventListener(ey,e=>null==o?void 0:o(e),{once:!0}),(0,l.hO)(e,t),t.defaultPrevented?p.current=!1:c.onClose()}}),onPointerDown:t=>{var n;null==(n=e.onPointerDown)||n.call(e,t),p.current=!0},onPointerUp:(0,i.mK)(e.onPointerUp,e=>{var t;p.current||null==(t=e.currentTarget)||t.click()}),onKeyDown:(0,i.mK)(e.onKeyDown,e=>{let t=""!==d.searchRef.current;n||t&&" "===e.key||j.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});eE.displayName=eb;var eT=r.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:o=!1,textValue:s,...u}=e,c=ec(eb,n),d=X(n),h=r.useRef(null),p=(0,a.s)(t,h),[f,m]=r.useState(!1),[g,v]=r.useState("");return r.useEffect(()=>{let e=h.current;if(e){var t;v((null!=(t=e.textContent)?t:"").trim())}},[u.children]),(0,y.jsx)(Y.ItemSlot,{scope:n,disabled:o,textValue:null!=s?s:g,children:(0,y.jsx)(D,{asChild:!0,...d,focusable:!o,children:(0,y.jsx)(l.sG.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...u,ref:p,onPointerMove:(0,i.mK)(e.onPointerMove,eq(e=>{o?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,i.mK)(e.onPointerLeave,eq(e=>c.onItemLeave(e))),onFocus:(0,i.mK)(e.onFocus,()=>m(!0)),onBlur:(0,i.mK)(e.onBlur,()=>m(!1))})})})}),ek=r.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...a}=e;return(0,y.jsx)(eN,{scope:e.__scopeMenu,checked:n,children:(0,y.jsx)(eE,{role:"menuitemcheckbox","aria-checked":eG(n)?"mixed":n,...a,ref:t,"data-state":eY(n),onSelect:(0,i.mK)(a.onSelect,()=>null==r?void 0:r(!!eG(n)||!n),{checkForDefaultPrevented:!1})})})});ek.displayName="MenuCheckboxItem";var e_="MenuRadioGroup",[eA,ex]=W(e_,{value:void 0,onValueChange:()=>{}}),ew=r.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=(0,b.c)(r);return(0,y.jsx)(eA,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,y.jsx)(eg,{...i,ref:t})})});ew.displayName=e_;var eS="MenuRadioItem",eC=r.forwardRef((e,t)=>{let{value:n,...r}=e,a=ex(eS,e.__scopeMenu),o=n===a.value;return(0,y.jsx)(eN,{scope:e.__scopeMenu,checked:o,children:(0,y.jsx)(eE,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":eY(o),onSelect:(0,i.mK)(r.onSelect,()=>{var e;return null==(e=a.onValueChange)?void 0:e.call(a,n)},{checkForDefaultPrevented:!1})})})});eC.displayName=eS;var eI="MenuItemIndicator",[eN,eO]=W(eI,{checked:!1}
1265),eR=r.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=eO(eI,n);return(0,y.jsx)(v.C,{present:r||eG(a.checked)||!0===a.checked,children:(0,y.jsx)(l.sG.span,{...i,ref:t,"data-state":eY(a.checked)})})});eR.displayName=eI;var eD=r.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,y.jsx)(l.sG.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});eD.displayName="MenuSeparator";var eL=r.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=Z(n);return(0,y.jsx)(m.i3,{...i,...r,ref:t})});eL.displayName="MenuArrow";var eP="MenuSub",[eM,eF]=W(eP),eB=e=>{let{__scopeMenu:t,children:n,open:i=!1,onOpenChange:a}=e,o=J(eP,t),s=Z(t),[l,u]=r.useState(null),[c,d]=r.useState(null),h=(0,b.c)(a);return r.useEffect(()=>(!1===o.open&&h(!1),()=>h(!1)),[o.open,h]),(0,y.jsx)(m.bL,{...s,children:(0,y.jsx)(Q,{scope:t,open:i,onOpenChange:h,content:c,onContentChange:d,children:(0,y.jsx)(eM,{scope:t,contentId:(0,f.B)(),triggerId:(0,f.B)(),trigger:l,onTriggerChange:u,children:n})})})};eB.displayName=eP;var ej="MenuSubTrigger",eU=r.forwardRef((e,t)=>{let n=J(ej,e.__scopeMenu),o=et(ej,e.__scopeMenu),s=eF(ej,e.__scopeMenu),l=ec(ej,e.__scopeMenu),u=r.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:d}=l,h={__scopeMenu:e.__scopeMenu},p=r.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return r.useEffect(()=>p,[p]),r.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),d(null)}},[c,d]),(0,y.jsx)(er,{asChild:!0,...h,children:(0,y.jsx)(eT,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?s.contentId:void 0,"data-state":ez(n.open),...e,ref:(0,a.t)(t,s.onTriggerChange),onClick:t=>{var r;null==(r=e.onClick)||r.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:(0,i.mK)(e.onPointerMove,eq(t=>{l.onItemEnter(t),!t.defaultPrevented&&(e.disabled||n.open||u.current||(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100)))})),onPointerLeave:(0,i.mK)(e.onPointerLeave,eq(e=>{var t,r;p();let i=null==(t=n.content)?void 0:t.getBoundingClientRect();if(i){let t=null==(r=n.content)?void 0:r.dataset.side,a="right"===t,o=i[a?"left":"right"],s=i[a?"right":"left"];l.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:o,y:i.top},{x:s,y:i.top},{x:s,y:i.bottom},{x:o,y:i.bottom}],side:t}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(e),e.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:(0,i.mK)(e.onKeyDown,t=>{let r=""!==l.searchRef.current;if(!e.disabled&&(!r||" "!==t.key)&&$[o.dir].includes(t.key)){var i;n.onOpenChange(!0),null==(i=n.content)||i.focus(),t.preventDefault()}})})})});eU.displayName=ej;var eH="MenuSubContent",e$=r.forwardRef((e,t)=>{let n=eo(el,e.__scopeMenu),{forceMount:o=n.forceMount,align:s="start",...l}=e,u=J(el,e.__scopeMenu),c=et(el,e.__scopeMenu),d=eF(eH,e.__scopeMenu),h=r.useRef(null),p=(0,a.s)(t,h);return(0,y.jsx)(Y.Provider,{scope:e.__scopeMenu,children:(0,y.jsx)(v.C,{present:o||u.open,children:(0,y.jsx)(Y.Slot,{scope:e.__scopeMenu,children:(0,y.jsx)(em,{id:d.contentId,"aria-labelledby":d.triggerId,...l,ref:p,align:s,side:"rtl"===c.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;c.isUsingKeyboardRef.current&&(null==(t=h.current)||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,i.mK)(e.onFocusOutside,e=>{e.target!==d.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:(0,i.mK)(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:(0,i.mK)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=z[c.dir].includes(e.key);if(t&&n){var r;u.onOpenChange(!1),null==(r=d.trigger)||r.focus(),e.preventDefault()}})})})})})});function ez(e){return e?"open":"closed"}function eG(e){return"indeterminate"===e}function eY(e){return eG(e)?"indeterminate":e?"checked":"unchecked"}function eq(e){return t=>"mouse"===t.pointerType?e(t):void 0}e$.displayName=eH;var eV="DropdownMenu",[eW,eK]=(0,o.A)(eV,[K]),eZ=K(),[eX,eQ]=eW(eV),eJ=e=>{let{__scopeDropdownMenu:t,children:n,dir:i,open:a,defaultOpen:o,onOpenChange:l,modal:u=!0}=e,c=eZ(t),d=r.useRef(null),[h,p]=(0,s.i)({prop:a,defaultProp:null!=o&&o,onChange:l,caller:eV});return(0,y.jsx)(eX,{scope:t,triggerId:(0,f.B)(),triggerRef:d,contentId:(0,f.B)(),open:h,onOpenChange:p,onOpenToggle:r.useCallback(()=>p(e=>!e),[p]),modal:u,children:(0,y.jsx)(en,{...c,open:h,onOpenChange:p,dir:i,modal:u,children:n})})};eJ.displayName=eV;var e0="DropdownMenuTrigger",e1=r.forwardRef((e,t)=>
1265{let{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=eQ(e0,n),u=eZ(n);return(0,y.jsx)(er,{asChild:!0,...u,children:(0,y.jsx)(l.sG.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:(0,a.t)(t,s.triggerRef),onPointerDown:(0,i.mK)(e.onPointerDown,e=>{!r&&0===e.button&&!1===e.ctrlKey&&(s.onOpenToggle(),s.open||e.preventDefault())}),onKeyDown:(0,i.mK)(e.onKeyDown,e=>{!r&&(["Enter"," "].includes(e.key)&&s.onOpenToggle(),"ArrowDown"===e.key&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});e1.displayName=e0;var e2=e=>{let{__scopeDropdownMenu:t,...n}=e,r=eZ(t);return(0,y.jsx)(es,{...r,...n})};e2.displayName="DropdownMenuPortal";var e3="DropdownMenuContent",e4=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...a}=e,o=eQ(e3,n),s=eZ(n),l=r.useRef(!1);return(0,y.jsx)(ed,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...a,ref:t,onCloseAutoFocus:(0,i.mK)(e.onCloseAutoFocus,e=>{var t;l.current||null==(t=o.triggerRef.current)||t.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:(0,i.mK)(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});e4.displayName=e3,r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(eg,{...i,...r,ref:t})}).displayName="DropdownMenuGroup",r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(ev,{...i,...r,ref:t})}).displayName="DropdownMenuLabel";var e9=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(eE,{...i,...r,ref:t})});e9.displayName="DropdownMenuItem",r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(ek,{...i,...r,ref:t})}).displayName="DropdownMenuCheckboxItem",r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(ew,{...i,...r,ref:t})}).displayName="DropdownMenuRadioGroup",r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(eC,{...i,...r,ref:t})}).displayName="DropdownMenuRadioItem",r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(eR,{...i,...r,ref:t})}).displayName="DropdownMenuItemIndicator";var e5=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(eD,{...i,...r,ref:t})});e5.displayName="DropdownMenuSeparator",r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(eL,{...i,...r,ref:t})}).displayName="DropdownMenuArrow";var e8=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(eU,{...i,...r,ref:t})});e8.displayName="DropdownMenuSubTrigger";var e6=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(e$,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});e6.displayName="DropdownMenuSubContent";var e7=eJ,te=e1,tt=e2,tn=e4,tr=e9,ti=e5,ta=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=eZ(t),[l,u]=(0,s.i)({prop:r,defaultProp:null!=a&&a,onChange:i,caller:"DropdownMenuSub"});return(0,y.jsx)(eB,{...o,open:l,onOpenChange:u,children:n})},to=e8,ts=e6},95868:(e,t,n)=>{n.d(t,{R0:()=>l,lI:()=>s,ms:()=>o});var r=n(39097),i=n(89526);function a(e){return e[e.length-1]}function o(e){return(0,r.T)(a(e))?e.pop():void 0}function s(e){return(0,i.m)(a(e))?e.pop():void 0}function l(e,t){return"number"==typeof a(e)?e.pop():t}}
1265,96441:(e,t,n)=>{n.d(t,{v:()=>r});let r=console},96948:(e,t,n)=>{n.d(t,{N:()=>i});var r=n(39097);function i(e){return function(t){if((0,r.T)(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}},97602:(e,t,n)=>{n.d(t,{hO:()=>l,sG:()=>s});var r=n(12115),i=n(47650),a=n(32467),o=n(95155),s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{let n=(0,a.TL)(`Primitive.${t}`),i=r.forwardRef((e,r)=>{let{asChild:i,...a}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,o.jsx)(i?n:t,{...a,ref:r})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function l(e,t){e&&i.flushSync(()=>e.dispatchEvent(t))}},97745:(e,t,n)=>{n.d(t,{Eq:()=>u});var r=new WeakMap,i=new WeakMap,a={},o=0,s=function(e){return e&&(e.host||s(e.parentNode))},l=function(e,t,n,l){var u=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=s(e);return n&&t.contains(n)?n:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)}).filter(function(e){return!!e});a[n]||(a[n]=new WeakMap);var c=a[n],d=[],h=new Set,p=new Set(u),f=function(e){!e||h.has(e)||(h.add(e),f(e.parentNode))};u.forEach(f);var m=function(e){!e||p.has(e)||Array.prototype.forEach.call(e.children,function(e){if(h.has(e))m(e);else try{var t=e.getAttribute(l),a=null!==t&&"false"!==t,o=(r.get(e)||0)+1,s=(c.get(e)||0)+1;r.set(e,o),c.set(e,s),d.push(e),1===o&&a&&i.set(e,!0),1===s&&e.setAttribute(n,"true"),a||e.setAttribute(l,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(t),h.clear(),o++,function(){d.forEach(function(e){var t=r.get(e)-1,a=c.get(e)-1;r.set(e,t),c.set(e,a),t||(i.has(e)||e.removeAttribute(l),i.delete(e)),a||e.removeAttribute(n)}),--o||(r=new WeakMap,r=new WeakMap,i=new WeakMap,a={})}},u=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||("undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),l(r,i,n,"aria-hidden")):function(){return null}}},98734:(e,t,n)=>{let r;n.d(t,{kY:()=>a,bz:()=>ex,YO:()=>eS,zM:()=>e_,au:()=>eM,gM:()=>eN,k5:()=>eD,eu:()=>eR,fc:()=>eL,ch:()=>eA,ai:()=>ek,Ik:()=>eC,vk:()=>eP,g1:()=>eO,Yj:()=>eT,KC:()=>eI,L5:()=>ew});var i,a,o=n(44193),s=n(88658);let l=(e,t)=>{let n;switch(e.code){case o.eq.invalid_type:n=e.received===s.Zp.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case o.eq.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,s.ZS.jsonStringifyReplacer)}`;break;case o.eq.unrecognized_keys:n=`Unrecognized key(s) in object: ${s.ZS.joinValues(e.keys,", ")}`;break;case o.eq.invalid_union:n="Invalid input";break;case o.eq.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${s.ZS.joinValues(e.options)}`;break;case o.eq.invalid_enum_value:n=`Invalid enum value. Expected ${s.ZS.joinValues(e.options)}, received '${e.received}'`;break;case o.eq.invalid_arguments:n="Invalid function arguments";break;case o.eq.invalid_return_type:n="Invalid function return type";break;case o.eq.invalid_date:n="Invalid date";break;case o.eq.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:s.ZS.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case o.eq.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case o.eq.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case o.eq.custom:n="Invalid input";break;
vendor: 7,184 bytes, line 1265
1265case o.eq.invalid_intersection_types:n="Intersection results could not be merged";break;case o.eq.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case o.eq.not_finite:n="Number must be finite";break;default:n=t.defaultError,s.ZS.assertNever(e)}return{message:n}};!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(i||(i={}));let u=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let s="";for(let e of r.filter(e=>!!e).slice().reverse())s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function c(e,t){let n=u({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,l,void 0].filter(e=>!!e)});e.common.issues.push(n)}class d{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let n=[];for(let r of t){if("aborted"===r.status)return h;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){let n=[];for(let e of t){let t=await e.key,r=await e.value;n.push({key:t,value:r})}return d.mergeObjectSync(e,n)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if("aborted"===t.status||"aborted"===i.status)return h;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}}let h=Object.freeze({status:"aborted"}),p=e=>({status:"dirty",value:e}),f=e=>({status:"valid",value:e}),m=e=>"undefined"!=typeof Promise&&e instanceof Promise;class g{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let v=(e,t)=>{if("valid"===t.status)return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new o.G(e.common.issues);return this._error=t,this._error}}};function b(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return"invalid_enum_value"===t.code?{message:a??i.defaultError}:void 0===i.data?{message:a??r??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:a??n??i.defaultError}},description:i}}class y{get description(){return this._def.description}_getType(e){return(0,s.CR)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,s.CR)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new d,ctx:{common:e.parent.common,data:e.data,parsedType:(0,s.CR)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(m(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,s.CR)(e)},r=this._parseSync({data:e,path:n.path,parent:n});return v(n,r)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,s.CR)(e)};if(!this["~standard"].async)try{let n=this._parseSync({data:e,path:[],parent:t});return"valid"===n.status?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>"valid"===e.status?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,s.CR)(e)},r=this._parse({data:e,path:n.path,parent:n});return v(n,await (m(r)?r:Promise.resolve(r)))}refine(e,t){return this._refinement((n,r)=>{let i=e(n),a=()=>r.addIssue({code:o.eq.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(n):t});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new eh({schema:this,typeName:a.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return ep.create(this,this._def)}nullable(){return ef.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return K.create(this)}promise(){return ed.create(this,this._def)}or(e){return X.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new eh({...b(this._def),schema:this,typeName:a.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new em({...b(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:a.ZodDefault})}brand(){return new eb({typeName:a.ZodBranded,type:this,...b(this._def)})}catch(e){return new eg({...b(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:a.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return ey.create(this,e)}readonly(){return eE.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let E=/^c[^\s-]{8,}
1265$/i,T=/^[0-9a-z]+$/,k=/^[0-9A-HJKMNP-TV-Z]{26}$/i,_=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,A=/^[a-z0-9_-]{21}$/i,x=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,w=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,S=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,C=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,I=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,N=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,O=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,R=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,D=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,L="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",P=RegExp(`^${L}$`);function M(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}class F extends y{_parse(e){var t,n,i,a;let l;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==s.Zp.string){let t=this._getOrReturnCtx(e);return c(t,{code:o.eq.invalid_type,expected:s.Zp.string,received:t.parsedType}),h}let u=new d;for(let d of this._def.checks)if("min"===d.kind)e.data.length<d.value&&(c(l=this._getOrReturnCtx(e,l),{code:o.eq.too_small,minimum:d.value,type:"string",inclusive:!0,exact:!1,message:d.message}),u.dirty());else if("max"===d.kind)e.data.length>d.value&&(c(l=this._getOrReturnCtx(e,l),{code:o.eq.too_big,maximum:d.value,type:"string",inclusive:!0,exact:!1,message:d.message}),u.dirty());else if("length"===d.kind){let t=e.data.length>d.value,n=e.data.length<d.value;(t||n)&&(l=this._getOrReturnCtx(e,l),t?c(l,{code:o.eq.too_big,maximum:d.value,type:"string",inclusive:!0,exact:!0,message:d.message}):n&&c(l,{code:o.eq.too_small,minimum:d.value,type:"string",inclusive:!0,exact:!0,message:d.message}),u.dirty())}else if("email"===d.kind)S.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{validation:"email",code:o.eq.invalid_string,message:d.message}),u.dirty());else if("emoji"===d.kind)r||(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{validation:"emoji",code:o.eq.invalid_string,message:d.message}),u.dirty());else if("uuid"===d.kind)_.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{validation:"uuid",code:o.eq.invali
vendor: 11,721 bytes, line 1265
1265d_string,message:d.message}),u.dirty());else if("nanoid"===d.kind)A.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{validation:"nanoid",code:o.eq.invalid_string,message:d.message}),u.dirty());else if("cuid"===d.kind)E.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{validation:"cuid",code:o.eq.invalid_string,message:d.message}),u.dirty());else if("cuid2"===d.kind)T.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{validation:"cuid2",code:o.eq.invalid_string,message:d.message}),u.dirty());else if("ulid"===d.kind)k.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{validation:"ulid",code:o.eq.invalid_string,message:d.message}),u.dirty());else if("url"===d.kind)try{new URL(e.data)}catch{c(l=this._getOrReturnCtx(e,l),{validation:"url",code:o.eq.invalid_string,message:d.message}),u.dirty()}else"regex"===d.kind?(d.regex.lastIndex=0,d.regex.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{validation:"regex",code:o.eq.invalid_string,message:d.message}),u.dirty())):"trim"===d.kind?e.data=e.data.trim():"includes"===d.kind?e.data.includes(d.value,d.position)||(c(l=this._getOrReturnCtx(e,l),{code:o.eq.invalid_string,validation:{includes:d.value,position:d.position},message:d.message}),u.dirty()):"toLowerCase"===d.kind?e.data=e.data.toLowerCase():"toUpperCase"===d.kind?e.data=e.data.toUpperCase():"startsWith"===d.kind?e.data.startsWith(d.value)||(c(l=this._getOrReturnCtx(e,l),{code:o.eq.invalid_string,validation:{startsWith:d.value},message:d.message}),u.dirty()):"endsWith"===d.kind?e.data.endsWith(d.value)||(c(l=this._getOrReturnCtx(e,l),{code:o.eq.invalid_string,validation:{endsWith:d.value},message:d.message}),u.dirty()):"datetime"===d.kind?(function(e){let t=`${L}T${M(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,RegExp(`^${t}$`)})(d).test(e.data)||(c(l=this._getOrReturnCtx(e,l),{code:o.eq.invalid_string,validation:"datetime",message:d.message}),u.dirty()):"date"===d.kind?P.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{code:o.eq.invalid_string,validation:"date",message:d.message}),u.dirty()):"time"===d.kind?RegExp(`^${M(d)}$`).test(e.data)||(c(l=this._getOrReturnCtx(e,l),{code:o.eq.invalid_string,validation:"time",message:d.message}),u.dirty()):"duration"===d.kind?w.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{validation:"duration",code:o.eq.invalid_string,message:d.message}),u.dirty()):"ip"===d.kind?(t=e.data,!(("v4"===(n=d.version)||!n)&&C.test(t)||("v6"===n||!n)&&N.test(t))&&1&&(c(l=this._getOrReturnCtx(e,l),{validation:"ip",code:o.eq.invalid_string,message:d.message}),u.dirty())):"jwt"===d.kind?!function(e,t){if(!x.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));if("object"!=typeof i||null===i||"typ"in i&&i?.typ!=="JWT"||!i.alg||t&&i.alg!==t)return!1;return!0}catch{return!1}}(e.data,d.alg)&&(c(l=this._getOrReturnCtx(e,l),{validation:"jwt",code:o.eq.invalid_string,message:d.message}),u.dirty()):"cidr"===d.kind?(i=e.data,!(("v4"===(a=d.version)||!a)&&I.test(i)||("v6"===a||!a)&&O.test(i))&&1&&(c(l=this._getOrReturnCtx(e,l),{validation:"cidr",code:o.eq.invalid_string,message:d.message}),u.dirty())):"base64"===d.kind?R.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{validation:"base64",code:o.eq.invalid_string,message:d.message}),u.dirty()):"base64url"===d.kind?D.test(e.data)||(c(l=this._getOrReturnCtx(e,l),{validation:"base64url",code:o.eq.invalid_string,message:d.message}),u.dirty()):s.ZS.assertNever(d);return{status:u.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:o.eq.invalid_string,...i.errToObj(n)})}_addCheck(e){return new F({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...i.errToObj(e)})}url(e){return this._addCheck({kind:"url",...i.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...i.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...i.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...i.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...i.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...i.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...i.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...i.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...i.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...i.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...i.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...i.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...i.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...i.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...i.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...i.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...i.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...i.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...i.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...i.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...i.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...i.errToObj(t)})}nonempty(e){return this.min(1,i.errToObj(e))}trim(){return new F({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new F({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new F({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}F.create=e=>new F({checks:[],typeName:a.ZodString,coerce:e?.coerce??!1,...b(e)});class B extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==s.Zp.number){let t=this._getOrReturnCtx(e);return c(t,{code:o.eq.invalid_type,expected:s.Zp.number,received:t.parsedType}),h}let n=new d;for(let r of this._def.checks)"int"===r.kind?s.ZS.isInteger(e.data)||(c(t=this._getOrReturnCtx(e,t),{code:o.eq.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty()):"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(c(t=this._getOrReturnCtx(e,t),{code:o.eq.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(c(t=this._getOrReturnCtx(e,t),{code:o.eq.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):"multipleOf"===r.kind?0!==function(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,r.value)&&(c(t=this._getOrReturnCtx(e,t),{code:o.eq.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(c(t=this._getOrReturnCtx(e,t),{code:o.eq.not_finite,message:r.message}),n.dirty()):s.ZS.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,i.toString(t))}gt(e,t){return this.setLimit("min",e,!1,i.toString(t))}lte(e,t){return this.setLimit("max",e,!0,i.toString(t))}lt(e,t){return this.setLimit("max",e,!1,i.toString(t))}setLimit(e,t,n,r){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:i.toString(r)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:i.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:i.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:i.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:i.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:i.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:i.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:i.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:i.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:i.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&s.ZS.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;else"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}}B.create=e=>new B({checks:[],typeName:a.ZodNumber,coerce:e?.coerce||!1,...b(e)});class j extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==s.Zp.bigint)return this._getInvalidInput(e);let n=new d;for(let r of this._def.checks)"min"===r.kind?(r.inclusive?e.data<r.value:e.data<=r.value)&&(c(t=this._getOrReturnCtx(e,t),{code:o.eq.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"max"===r.kind?(r.inclusive?e.data>r.value:e.data>=r.value)&&(c(t=this._getOrReturnCtx(e,t),{code:o.eq.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(c(t=this._getOrReturnCtx(e,t),{code:o.eq.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):s.ZS.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);
1265return c(t,{code:o.eq.invalid_type,expected:s.Zp.bigint,received:t.parsedType}),h}gte(e,t){return this.setLimit("min",e,!0,i.toString(t))}gt(e,t){return this.setLimit("min",e,!1,i.toString(t))}lte(e,t){return this.setLimit("max",e,!0,i.toString(t))}lt(e,t){return this.setLimit("max",e,!1,i.toString(t))}setLimit(e,t,n,r){return new j({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:i.toString(r)}]})}_addCheck(e){return new j({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:i.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:i.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:i.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:i.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:i.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}j.create=e=>new j({checks:[],typeName:a.ZodBigInt,coerce:e?.coerce??!1,...b(e)});class U extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==s.Zp.boolean){let t=this._getOrReturnCtx(e);return c(t,{code:o.eq.invalid_type,expected:s.Zp.boolean,received:t.parsedType}),h}return f(e.data)}}U.create=e=>new U({typeName:a.ZodBoolean,coerce:e?.coerce||!1,...b(e)});class H extends y{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==s.Zp.date){let t=this._getOrReturnCtx(e);return c(t,{code:o.eq.invalid_type,expected:s.Zp.date,received:t.parsedType}),h}if(Number.isNaN(e.data.getTime()))return c(this._getOrReturnCtx(e),{code:o.eq.invalid_date}),h;let n=new d;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(c(t=this._getOrReturnCtx(e,t),{code:o.eq.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(c(t=this._getOrReturnCtx(e,t),{code:o.eq.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):s.ZS.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new H({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:i.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:i.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}H.create=e=>new H({checks:[],coerce:e?.coerce||!1,typeName:a.ZodDate,...b(e)});class $ extends y{_parse(e){if(this._getType(e)!==s.Zp.symbol){let t=this._getOrReturnCtx(e);return c(t,{code:o.eq.invalid_type,expected:s.Zp.symbol,received:t.parsedType}),h}return f(e.data)}}$.create=e=>new $({typeName:a.ZodSymbol,...b(e)});class z extends y{_parse(e){if(this._getType(e)!==s.Zp.undefined){let t=this._getOrReturnCtx(e);return c(t,{code:o.eq.invalid_type,expected:s.Zp.undefined,received:t.parsedType}),h}return f(e.data)}}z.create=e=>new z({typeName:a.ZodUndefined,...b(e)});class G extends y{_parse(e){if(this._getType(e)!==s.Zp.null){let t=this._getOrReturnCtx(e);return c(t,{code:o.eq.invalid_type,expected:s.Zp.null,received:t.parsedType}),h}return f(e.data)}}G.create=e=>new G({typeName:a.ZodNull,...b(e)});class Y extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return f(e.data)}}Y.create=e=>new Y({typeName:a.ZodAny,...b(e)});class q extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return f(e.data)}}q.create=e=>new q({typeName:a.ZodUnknown,...b(e)});class V extends y{_parse(e){let t=this._getOrReturnCtx(e);
1265return c(t,{code:o.eq.invalid_type,expected:s.Zp.never,received:t.parsedType}),h}}V.create=e=>new V({typeName:a.ZodNever,...b(e)});class W extends y{_parse(e){if(this._getType(e)!==s.Zp.undefined){let t=this._getOrReturnCtx(e);return c(t,{code:o.eq.invalid_type,expected:s.Zp.void,received:t.parsedType}),h}return f(e.data)}}W.create=e=>new W({typeName:a.ZodVoid,...b(e)});class K extends y{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==s.Zp.array)return c(t,{code:o.eq.invalid_type,expected:s.Zp.array,received:t.parsedType}),h;if(null!==r.exactLength){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(c(t,{code:e?o.eq.too_big:o.eq.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(c(t,{code:o.eq.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(c(t,{code:o.eq.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new g(t,e,t.path,n)))).then(e=>d.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new g(t,e,t.path,n)));return d.mergeArray(n,i)}get element(){return this._def.type}min(e,t){return new K({...this._def,minLength:{value:e,message:i.toString(t)}})}max(e,t){return new K({...this._def,maxLength:{value:e,message:i.toString(t)}})}length(e,t){return new K({...this._def,exactLength:{value:e,message:i.toString(t)}})}nonempty(e){return this.min(1,e)}}K.create=(e,t)=>new K({type:e,minLength:null,maxLength:null,exactLength:null,typeName:a.ZodArray,...b(t)});class Z extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=s.ZS.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==s.Zp.object){let t=this._getOrReturnCtx(e);return c(t,{code:o.eq.invalid_type,expected:s.Zp.object,received:t.parsedType}),h}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof V&&"strip"===this._def.unknownKeys))for(let e in n.data)i.includes(e)||a.push(e);let l=[];for(let e of i){let t=r[e],i=n.data[e];l.push({key:{status:"valid",value:e},value:t._parse(new g(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof V){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)l.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)a.length>0&&(c(n,{code:o.eq.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];l.push({key:{status:"valid",value:t},value:e._parse(new g(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of l){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>d.mergeObjectSync(t,e)):d.mergeObjectSync(t,l)}get shape(){return this._def.shape()}strict(e){return i.errToObj,new Z({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{let r=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:i.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new Z({...this._def,unknownKeys:"strip"})}passthrough(){return new Z({...this._def,unknownKeys:"passthrough"})}extend(e){return new Z({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Z({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:a.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Z({...this._def,catchall:e})}pick(e){let t={};for(let n of s.ZS.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new Z({...this._def,shape:()=>t})}omit(e){let t={};for(let n of s.ZS.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new Z({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof Z){let n={};for(let r in t.shape){let i=t.shape[r];n[r]=ep.create(e(i))}return new Z({...t._def,shape:()=>n})}if(t instanceof K)return new K({...t._def,type:e(t.element)});if(t instanceof ep)return ep.create(e(t.unwrap()));if(t instanceof ef)return ef.create(e(t.unwrap()));if(t instanceof et)return et.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let n of s.ZS.objectKeys(this.shape)){let r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}return new Z({...this._def,shape:()=>t})}required(e){let t={};for(let n of s.ZS.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof ep;)e=e._def.innerType;t[n]=e}return new Z({...this._def,shape:()=>t})}keyof(){return el(s.ZS.objectKeys(this.shape))}}Z.create=(e,t)=>
1265new Z({shape:()=>e,unknownKeys:"strip",catchall:V.create(),typeName:a.ZodObject,...b(t)}),Z.strictCreate=(e,t)=>new Z({shape:()=>e,unknownKeys:"strict",catchall:V.create(),typeName:a.ZodObject,...b(t)}),Z.lazycreate=(e,t)=>new Z({shape:e,unknownKeys:"strip",catchall:V.create(),typeName:a.ZodObject,...b(t)});class X extends y{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new o.G(e.ctx.common.issues));return c(t,{code:o.eq.invalid_union,unionErrors:n}),h});{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new o.G(e));return c(t,{code:o.eq.invalid_union,unionErrors:i}),h}}get options(){return this._def.options}}X.create=(e,t)=>new X({options:e,typeName:a.ZodUnion,...b(t)});let Q=e=>{if(e instanceof eo)return Q(e.schema);if(e instanceof eh)return Q(e.innerType());if(e instanceof es)return[e.value];if(e instanceof eu)return e.options;if(e instanceof ec)return s.ZS.objectValues(e.enum);else if(e instanceof em)return Q(e._def.innerType);else if(e instanceof z)return[void 0];else if(e instanceof G)return[null];else if(e instanceof ep)return[void 0,...Q(e.unwrap())];else if(e instanceof ef)return[null,...Q(e.unwrap())];else if(e instanceof eb)return Q(e.unwrap());else if(e instanceof eE)return Q(e.unwrap());else if(e instanceof eg)return Q(e._def.innerType);else return[]};class J extends y{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.Zp.object)return c(t,{code:o.eq.invalid_type,expected:s.Zp.object,received:t.parsedType}),h;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(c(t,{code:o.eq.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),h)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){let r=new Map;for(let n of t){let t=Q(n.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(r.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);r.set(i,n)}}return new J({typeName:a.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...b(n)})}}class ee extends y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if("aborted"===e.status||"aborted"===r.status)return h;let i=function e(t,n){let r=(0,s.CR)(t),i=(0,s.CR)(n);if(t===n)return{valid:!0,data:t};if(r===s.Zp.object&&i===s.Zp.object){let r=s.ZS.objectKeys(n),i=s.ZS.objectKeys(t).filter(e=>-1!==r.indexOf(e)),a={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1};a[r]=i.data}return{valid:!0,data:a}}if(r===s.Zp.array&&i===s.Zp.array){if(t.length!==n.length)return{valid:!1};let r=[];for(let i=0;i<t.length;i++){let a=e(t[i],n[i]);if(!a.valid)return{valid:!1};r.push(a.data)}return{valid:!0,data:r}}if(r===s.Zp.date&&i===s.Zp.date&&+t==+n)return{valid:!0,data:t};return{valid:!1}}(e.value,r.value);return i.valid?(("dirty"===e.status||"dirty"===r.status)&&t.dirty(),{status:t.value,value:i.data}):(c(n,{code:o.eq.invalid_intersection_types}),h)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}
1265ee.create=(e,t,n)=>new ee({left:e,right:t,typeName:a.ZodIntersection,...b(n)});class et extends y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.Zp.array)return c(n,{code:o.eq.invalid_type,expected:s.Zp.array,received:n.parsedType}),h;if(n.data.length<this._def.items.length)return c(n,{code:o.eq.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),h;!this._def.rest&&n.data.length>this._def.items.length&&(c(n,{code:o.eq.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new g(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>d.mergeArray(t,e)):d.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new et({...this._def,rest:e})}}et.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new et({items:e,typeName:a.ZodTuple,rest:null,...b(t)})};class en extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.Zp.object)return c(n,{code:o.eq.invalid_type,expected:s.Zp.object,received:n.parsedType}),h;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new g(n,e,n.path,e)),value:a._parse(new g(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?d.mergeObjectAsync(t,r):d.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,n){return new en(t instanceof y?{keyType:e,valueType:t,typeName:a.ZodRecord,...b(n)}:{keyType:F.create(),valueType:e,typeName:a.ZodRecord,...b(t)})}}class er extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.Zp.map)return c(n,{code:o.eq.invalid_type,expected:s.Zp.map,received:n.parsedType}),h;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new g(n,e,n.path,[a,"key"])),value:i._parse(new g(n,t,n.path,[a,"value"]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if("aborted"===r.status||"aborted"===i.status)return h;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if("aborted"===r.status||"aborted"===i.status)return h;("dirty"===r.status||"dirty"===i.status)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}}er.create=(e,t,n)=>new er({valueType:t,keyType:e,typeName:a.ZodMap,...b(n)});class ei extends y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==s.Zp.set)return c(n,{code:o.eq.invalid_type,expected:s.Zp.set,received:n.parsedType}),h;let r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(c(n,{code:o.eq.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(c(n,{code:o.eq.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if("aborted"===r.status)return h;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let l=[...n.data.values()].map((e,t)=>i._parse(new g(n,e,n.path,t)));return n.common.async?Promise.all(l).then(e=>a(e)):a(l)}min(e,t){return new ei({...this._def,minSize:{value:e,message:i.toString(t)}})}max(e,t){return new ei({...this._def,maxSize:{value:e,message:i.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ei.create=(e,t)=>new ei({valueType:e,minSize:null,maxSize:null,typeName:a.ZodSet,...b(t)});class ea extends y{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);
1265if(t.parsedType!==s.Zp.function)return c(t,{code:o.eq.invalid_type,expected:s.Zp.function,received:t.parsedType}),h;function n(e,n){return u({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l,l].filter(e=>!!e),issueData:{code:o.eq.invalid_arguments,argumentsError:n}})}function r(e,n){return u({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l,l].filter(e=>!!e),issueData:{code:o.eq.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof ed){let e=this;return f(async function(...t){let s=new o.G([]),l=await e._def.args.parseAsync(t,i).catch(e=>{throw s.addIssue(n(t,e)),s}),u=await Reflect.apply(a,this,l);return await e._def.returns._def.type.parseAsync(u,i).catch(e=>{throw s.addIssue(r(u,e)),s})})}{let e=this;return f(function(...t){let s=e._def.args.safeParse(t,i);if(!s.success)throw new o.G([n(t,s.error)]);let l=Reflect.apply(a,this,s.data),u=e._def.returns.safeParse(l,i);if(!u.success)throw new o.G([r(l,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ea({...this._def,args:et.create(e).rest(q.create())})}returns(e){return new ea({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new ea({args:e||et.create([]).rest(q.create()),returns:t||q.create(),typeName:a.ZodFunction,...b(n)})}}class eo extends y{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}eo.create=(e,t)=>new eo({getter:e,typeName:a.ZodLazy,...b(t)});class es extends y{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:o.eq.invalid_literal,expected:this._def.value}),h}return{status:"valid",value:e.data}}get value(){return this._def.value}}function el(e,t){return new eu({values:e,typeName:a.ZodEnum,...b(t)})}es.create=(e,t)=>new es({value:e,typeName:a.ZodLiteral,...b(t)});class eu extends y{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return c(t,{expected:s.ZS.joinValues(n),received:t.parsedType,code:o.eq.invalid_type}),h}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return c(t,{received:t.data,code:o.eq.invalid_enum_value,options:n}),h}return f(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return eu.create(e,{...this._def,...t})}exclude(e,t=this._def){return eu.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}eu.create=el;class ec extends y{_parse(e){let t=s.ZS.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==s.Zp.string&&n.parsedType!==s.Zp.number){let e=s.ZS.objectValues(t);return c(n,{expected:s.ZS.joinValues(e),received:n.parsedType,code:o.eq.invalid_type}),h}if(this._cache||(this._cache=new Set(s.ZS.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=s.ZS.objectValues(t);return c(n,{received:n.data,code:o.eq.invalid_enum_value,options:e}),h}return f(e.data)}get enum(){return this._def.values}}ec.create=(e,t)=>new ec({values:e,typeName:a.ZodNativeEnum,...b(t)});class ed extends y{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==s.Zp.promise&&!1===t.common.async?(c(t,{code:o.eq.invalid_type,expected:s.Zp.promise,received:t.parsedType}),h):f((t.parsedType===s.Zp.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ed.create=(e,t)=>new ed({type:e,typeName:a.ZodPromise,...b(t)});class eh extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===a.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{c(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===r.type){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return h;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?h:"dirty"===r.status||"dirty"===t.value?p(r.value):r});{if("aborted"===t.value)return h;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?h:"dirty"===r.status||"dirty"===t.value?p(r.value):r}}if("refinement"===r.type){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?h:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))));{let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?h:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}}if("transform"===r.type)if(!1!==n.common.async)return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>"valid"!==e.status?h:Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})));else{let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if("valid"!==e.status)return h;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}s.ZS.assertNever(r)}}
1265eh.create=(e,t,n)=>new eh({schema:e,typeName:a.ZodEffects,effect:t,...b(n)}),eh.createWithPreprocess=(e,t,n)=>new eh({schema:t,effect:{type:"preprocess",transform:e},typeName:a.ZodEffects,...b(n)});class ep extends y{_parse(e){return this._getType(e)===s.Zp.undefined?f(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ep.create=(e,t)=>new ep({innerType:e,typeName:a.ZodOptional,...b(t)});class ef extends y{_parse(e){return this._getType(e)===s.Zp.null?f(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ef.create=(e,t)=>new ef({innerType:e,typeName:a.ZodNullable,...b(t)});class em extends y{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===s.Zp.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}em.create=(e,t)=>new em({innerType:e,typeName:a.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...b(t)});class eg extends y{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return m(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new o.G(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new o.G(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}eg.create=(e,t)=>new eg({innerType:e,typeName:a.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...b(t)});class ev extends y{_parse(e){if(this._getType(e)!==s.Zp.nan){let t=this._getOrReturnCtx(e);return c(t,{code:o.eq.invalid_type,expected:s.Zp.nan,received:t.parsedType}),h}return{status:"valid",value:e.data}}}ev.create=e=>new ev({typeName:a.ZodNaN,...b(e)}),Symbol("zod_brand");class eb extends y{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class ey extends y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?h:"dirty"===e.status?(t.dirty(),p(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?h:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new ey({in:e,out:t,typeName:a.ZodPipeline})}}class eE extends y{_parse(e){let t=this._def.innerType._parse(e),n=e=>("valid"===e.status&&(e.value=Object.freeze(e.value)),e);return m(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}eE.create=(e,t)=>new eE({innerType:e,typeName:a.ZodReadonly,...b(t)}),Z.lazycreate,function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(a||(a={}));let eT=F.create,ek=B.create;ev.create,j.create;let e_=U.create;H.create,$.create,z.create;let eA=G.create,ex=Y.create,ew=q.create;V.create,W.create;let eS=K.create,eC=Z.create;Z.strictCreate;let eI=X.create,eN=J.create;ee.create,et.create;let eO=en.create;er.create,ei.create,ea.create,eo.create;let eR=es.create,eD=eu.create,eL=ec.create;
1265ed.create,eh.create,ep.create,ef.create;let eP=eh.createWithPreprocess;ey.create;let eM={string:e=>F.create({...e,coerce:!0}),number:e=>B.create({...e,coerce:!0}),boolean:e=>U.create({...e,coerce:!0}),bigint:e=>j.create({...e,coerce:!0}),date:e=>H.create({...e,coerce:!0})}},99455:(e,t,n)=>{n.d(t,{l:()=>a});var r=n(60488),i=n(39097);function a(e){return(0,i.T)(e[r.s])}},99597:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(91007).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.