PageSourceSearch

https://showcase-ms-agent-python-production.up.railway.app/_next/static/chunks/859-d11185f220b869b2.js

js showcase-ms-agent-python-production.up.railway.app collected 2026-10-03 12:14:08 UTC 1,026,353 bytes, 1,262 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[859],{861:(e,t,n)=>{n.d(t,{Qg:()=>a,bL:()=>l});var r=n(12115),i=n(97602),s=n(95155),a=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"}),o=r.forwardRef((e,t)=>(0,s.jsx)(i.sG.span,{...e,ref:t,style:{...a,...e.style}}));o.displayName="VisuallyHidden";var l=o},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 s=t.length;for(n=0;n<s;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:()=>o,CW:()=>r,Ee:()=>d,HP:()=>u,JQ:()=>a,Ny:()=>f,On:()=>h,cx:()=>s,es:()=>p,lV:()=>i,ok:()=>l,ol:()=>c});let r=m(/[A-Za-z]/),i=m(/[\dA-Za-z]/),s=m(/[#-'*+\--9=?A-Z^-~]/);function a(e){return null!==e&&(e<32||127===e)}let o=m(/\d/),l=m(/[\dA-Fa-f]/),c=m(/[!-/:-@[-`{-~]/);function u(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:()=>s});var r=n(12115),i=n(95155);function s(e,t=[]){let n=[],a=()=>{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 a.scopeName=e,[function(t,s){let a=r.createContext(s);a.displayName=t+"Context";let o=n.length;n=[...n,s];let l=t=>{let{scope:n,children:s,...l}=t,c=n?.[e]?.[o]||a,u=r.useMemo(()=>l,Object.values(l));return(0,i.jsx)(c.Provider,{value:u,children:s})};return l.displayName=t+"Provider",[l,function(n,i){let l=i?.[e]?.[o]||a,c=r.useContext(l);if(c)return c;if(void 0!==s)return s;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}(a,...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 s(e,t=0x1400000){return e.size>t}function a(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 o(e){return"undefined"==typeof document?Promise.resolve(void 0):new Promise(t=>{let n=!1,r=document.createElement("video"),i=document.createElement("canvas"),s=URL.createObjectURL(e),a=e=>{n||(n=!0,URL.revokeObjectURL(s),t(e))},o=setTimeout(()=>{console.warn(`[CopilotKit] generateVideoThumbnail: timed out for file "${e.name}"`),a(void 0)},1e4);r.preload="metadata",r.muted=!0,r.playsInline=!0,r.onloadeddata=()=>{r.currentTime=.1},r.onseeked=()=>{clearTimeout(o),i.width=r.videoWidth,i.height=r.videoHeight;let e=i.getContext("2d");e?(e.drawImage(r,0,0),a(i.toDataURL("image/jpeg",.7))):(console.warn("[CopilotKit] generateVideoThumbnail: could not get 2d canvas context"),a(void 0))},r.onerror=()=>{clearTimeout(o),console.warn(`[CopilotKit] generateVideoThumbnail: video element error for file "${e.name}"`),a(void 0)},r.src=s})}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 c(e){return"url"===e.type?e.value:`data:${e.mimeType};base64,${e.value}`}function u(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:()=>c,D:()=>u,We:()=>a,gX:()=>r,hp:()=>o,oF:()=>l,v7:()=>i,zH:()=>s})},6997:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g;function c(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 u=1,d=1;function h(e){var t=e.match(n);t&&(u+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function p(){var e={line:u,column:d};return function(t){return t.position=new f(e),g(r),t}}function f(e){this.start=e,this.end={line:u,column:d},this.source=l.source}function m(t){var n=Error(l.source+":"+u+":"+d+": "+t);if(n.reason=t,n.filename=l.source,n.line=u,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(s))return m("property missing ':'");var r=g(a),l=e({type:"declaration",property:c(n[0].replace(t,"")),value:r?c(r[0].replace(t,"")):""});return g(o),l}}();)!1!==y&&(E.push(y),v(E));return E}},7188:(e,t,n)=>{n.d(t,{a:()=>a});let r=new Set(["children","localName","ref","style","className"]),i=new WeakMap,s=(e,t,n,r,s)=>{let a=s?.[t];void 0===a?(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 s=r.get(t);void 0!==n?void 0===s?(r.set(t,s={handleEvent:n}),e.addEventListener(t,s)):s.handleEvent=n:void 0!==s&&(r.delete(t),e.removeEventListener(t,s))})(e,a,n)},a=({react:e,tagName:t,elementClass:n,events:i,displayName:a})=>{let o=new Set(Object.keys(i??{})),l=e.forwardRef((a,l)=>{let c=e.useRef(new Map),u=e.useRef(null),d={},h={};for(let[e,t]of Object.entries(a))r.has(e)?d["className"===e?"class":e]=t:o.has(e)||e in n.prototype?h[e]=t:d[e]=t;return e.useLayoutEffect(()=>{if(null===u.current)return;let e=new Map;for(let t in h)s(u.current,t,a[t],c.current.get(t),i),c.current.delete(t),e.set(t,a[t]);for(let[e,t]of c.current)s(u.current,e,void 0,t,i);c.current=e}),e.useLayoutEffect(()=>{u.current?.removeAttribute("defer-hydration")},[]),d.suppressHydrationWarning=!0,e.createElement(t,{...d,ref:e.useCallback(e=>{u.current=e,"function"==typeof l?l(e):null!==l&&(l.current=e)},[l])})});return l.displayName=a??n.name,l}}
1,7604:(e,t,n)=>{n.d(t,{A:()=>k});var r=n(63758),i=n(44599),s=n(3407);function a(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o="";if(37===a&&(0,s.lV)(e.charCodeAt(n+1))&&(0,s.lV)(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function o(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 c=n(95139),u=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),s=i[0];s&&"text"===s.type?s.value="["+s.value:i.unshift({type:"text",value:"["});let a=i[i.length-1];return a&&"text"===a.type?a.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 s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s={type:"element",tagName:"pre",properties:{},children:[s=e.applyData(t,s)]},e.patch(t,s),s},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)},footnoteReference:function(e,t){let n,r="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),s=a(i.toLowerCase()),o=e.footnoteOrder.indexOf(i),l=e.footnoteCounts.get(i);void 0===l?(l=0,e.footnoteOrder.push(i),n=e.footnoteOrder.length):n=o+1,l+=1,e.footnoteCounts.set(i,l);let c={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(n)}]};e.patch(t,c);let u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)},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:a(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);let s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)},image:function(e,t){let n={src:a(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:a(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);let s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)},link:function(e,t){let n={href:a(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),s={},a=[];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:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){let e=r[o];(i||0!==o||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?a.push(e):a.push(...e.children)}let l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});let c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)},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 s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)},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)},s=(0,u.PW)(t.children[1]),a=(0,u.Y)(t.children[t.children.length-1]);s&&a&&(r.position={start:s,end:a}),i.push(r)}let s={type:"element",tagName:"table",properties:{}
1,children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)},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",s=n&&"table"===n.type?n.align:void 0,a=s?s.length:t.children.length,o=-1,l=[];for(;++o<a;){let n=t.children[o],r={},a=s?s[o]:void 0;a&&(r.align=a);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},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,s=[];for(;r;)s.push(p(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(p(t.slice(i),i>0,!1)),s.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,u.G1)(e))}function y(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,s=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&&s&&Object.assign(n.properties,(0,i.Ay)(s)),"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 _(e,t){let n=function(e,t){let n=t||v,r=new Map,s=new Map,a={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.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:s,footnoteCounts:new Map,footnoteOrder:[],handlers:{...f,...n.handlers},one:function(e,t){let n=e.type,r=a.handlers[n];if(g.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if("children"in e){let{children:t,...n}=e,r=(0,i.Ay)(n);return r.children=a.all(e),r}return(0,i.Ay)(e)}return(a.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)})(a,e,t)},options:n,patch:b,wrap:E};return(0,c.YR)(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){let t="definition"===e.type?r:s,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a}(e,t),s=n.one(e,void 0),u=function(e){let t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||o,r=e.options.footnoteBackLabel||l,s=e.options.footnoteLabel||"Footnotes",c=e.options.footnoteLabelTagName||"h2",u=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 s=e.all(i),o=String(i.identifier).toUpperCase(),l=a(o.toLowerCase()),c=0,u=[],p=e.footnoteCounts.get(o);for(;void 0!==p&&++c<=p;){u.length>0&&u.push({type:"text",value:" "});let e="string"==typeof n?n:n(h,c);"string"==typeof e&&(e={type:"text",value:e}),u.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+l+(c>1?"-"+c:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(h,c),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}let f=s[s.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(...u)}else s.push(...u);let m={type:"element",tagName:"li",properties:{id:t+"fn-"+l},children:e.wrap(s,!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:c,properties:{...(0,i.Ay)(u),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)}
1,{type:"text",value:"\n"}]}}(n),d=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return u&&((0,r.ok)("children"in d),d.children.push({type:"text",value:"\n"},u)),d}function k(e,t){return e&&"run"in e?async function(n,r){let i=_(n,{file:r,...t});await e.run(i,r)}:function(n,r){return _(n,{file:r,...e||t})}}},8286:(e,t,n)=>{n.d(t,{Tg:()=>m});var r=n(71450),i=n(82241),s=n(73694),a=n(45037),o=n(99455),l=n(74073),c=n(50933),u=n(45907),d=n(31590),h=n(39097),p=n(55180),f=n(60488);function m(e){if(e instanceof a.c)return e;if(null!=e){var t,n,m,v,b;if((0,o.l)(e)){return t=e,new a.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 a.c(function(e){for(var t=0;t<n.length&&!e.closed;t++)e.next(n[t]);e.complete()})}if((0,s.y)(e)){return m=e,new a.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,u.x)(e)){return v=e,new a.c(function(e){var t,n;try{for(var i=(0,r.Ju)(v),s=i.next();!s.done;s=i.next()){var a=s.value;if(e.next(a),e.closed)return}}catch(e){t={error:e}}finally{try{s&&!s.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,c.L)(e)}function g(e){return new a.c(function(t){(function(e,t){var n,i,s,a;return(0,r.sH)(this,void 0,void 0,function(){var o;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(o=i.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s={error:l.sent()},[3,11];case 6:if(l.trys.push([6,,9,10]),!(i&&!i.done&&(a=n.return)))return[3,8];return[4,a.call(n)];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})})(e,t).catch(function(e){return t.error(e)})})}},8532:(e,t,n)=>{n.d(t,{a:()=>iG,b:()=>iY,c:()=>s1,g:()=>sZ,i:()=>sJ});var r,i,s,a,o,l,c,u,d,h,p,f,m,g,v,b,y=n(12115),E=n(95139),T=n(56522);let _={indicator:"indicator",textOnly:"text-only",remove:"remove"};function k(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 A=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),x=new Set(["javascript:","data:","file:","vbscript:"]);function S(e,t,n,r=!1,i=!1,s=[]){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 a=k(e,n);if(!a||x.has(a.protocol)||!(A.has(a.protocol)||s.includes(a.protocol)||s.includes("*")))return null;if("mailto:"===a.protocol||!a.protocol.match(/^https?:$/))return a.href;let o="string"==typeof e&&(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"));return a&&t.some(e=>{let t=k(e,n);return!!t&&t.origin===a.origin&&a.href.startsWith(t.href)})?o?a.pathname+a.search+a.hash:a.href:t.includes("*")?"https:"!==a.protocol&&"http:"!==a.protocol?null:o?a.pathname+a.search+a.hash:a.href:null}let w=Symbol("node-seen");var I=n(26868),N=n(52371);let C=/[#.]/g;var O=n(94094),R=n(78232),D=n(59292);function L(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,...s){let a;if(null==n)a={type:"root",children:[]},s.unshift(i);else{let o=(a=function(e,t){let n,r,i=e||"",s={},a=0;for(;a<i.length;){C.lastIndex=a;let e=C.exec(i),t=i.slice(a,e?e.index:i.length);t&&(n?"#"===n?s.id=t:Array.isArray(s.className)?s.className.push(t):s.className=[t]:r=t,a+=t.length),e&&(n=e[0],a++)}return{type:"element",tagName:r||t||"div",properties:s,children:[]}}(n,t)).tagName.toLowerCase(),l=r?r.get(o):void 0;if(a.tagName=l||o,function(e){if(null===e||"object"!=typeof e||Array.isArray(e))return!0;
1if("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))s.unshift(i);else for(let[t,n]of Object.entries(i))!function(e,t,n,r){let i,s=(0,O.I)(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?s.spaceSeparated?(0,D.q)(r):s.commaSeparated?(0,N.q)(r):s.commaOrSpaceSeparated?(0,D.q)((0,N.q)(r).join(" ")):M(s,s.property,r):Array.isArray(r)?[...r]:"style"===s.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(M(s,s.property,t));i=e}"className"===s.property&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[s.property]=i}}(e,a.properties,t,n)}for(let e of s)!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+"`")}(a.children,e);return"element"===a.type&&"template"===a.tagName&&(a.content={type:"root",children:a.children},a.children=[]),a}}function M(e,t,n){if("string"==typeof n){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(""===n||(0,R.S)(n)===(0,R.S)(t)))return!0}return n}let P=L(I.qy,"div"),F=L(I.JW,"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"]),j={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 B(e,t){let n=function(e,t){switch(e.nodeType){case 1:return function(e,t){let n=e.namespaceURI,r=n===j.svg?F:P,i=n===j.html?e.tagName.toLowerCase():e.tagName,s=n===j.html&&"template"===i?e.content:e,a=e.getAttributeNames(),o={},l=-1;for(;++l<a.length;)o[a[l]]=e.getAttribute(a[l])||"";return r(i,o,U(s,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:U(e,t)}}(e,t);case 10:return{type:"doctype"};default:return}}(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function U(e,t){let n=e.childNodes,r=[],i=-1;for(;++i<n.length;){let e=B(n[i],t);void 0!==e&&r.push(e)}return r}let H=new DOMParser;var $=n(95502);let G=function(e,t,n){let r=(0,$.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]},z=function(e){if(null==e)return q;if("string"==typeof e){var t;return t=e,Y(function(e){return e.tagName===t})}if("object"==typeof e){var n=e;let t=[],r=-1;for(;++r<n.length;)t[r]=z(n[r]);return Y(function(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1})}if("function"==typeof e)return Y(e);throw Error("Expected function, string, or array as `test`")};function Y(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 q(e){return!!(e&&"object"==typeof e&&"type"in e&&"element"===e.type&&"tagName"in e&&"string"==typeof e.tagName)}let W=/\n/g,V=/[\t ]+/g,K=z("br"),Z=z(function(e){return"td"===e.tagName||"th"===e.tagName}),X=z("p"),Q=z("tr"),J=z(["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}]),ee=z(["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 et(e,t){let n,r=String(e.value),i=[],s=[],a=0;for(;a<=r.length;){W.lastIndex=a;let e=W.exec(r),n=e&&"index"in e?e.index:r.length;i.push(function(e,t,n){let r,i=[],s=0;for(;s<e.length;){V.lastIndex=s;let n=V.exec(e);r=n?n.index:e.length,s||r||!n||t||i.push(""),s!==r&&i.push(e.slice(s,r)),s=n?r+n[0].length:r}return s===r||n||i.push(""),i.join(" ")}(r.slice(a,n).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),0!==a||t.breakBefore,n!==r.length||t.breakAfter)),a=n+1}let o=-1;for(;++o<i.length;
1)8203===i[o].charCodeAt(i[o].length-1)||o<i.length-1&&8203===i[o+1].charCodeAt(0)?(s.push(i[o]),n=void 0):i[o]?("number"==typeof n&&s.push(n),s.push(i[o]),n=0):(0===o||o===i.length-1)&&s.push(0);return s}function en(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 er=n(84739);let ei={},es=[];function ea(e){let t=e||ei;return function(e,n){(0,T.VG)(e,"element",function(e,r){let i,s=Array.isArray(e.properties.className)?e.properties.className:es,a=s.includes("language-math"),o=s.includes("math-display"),l=s.includes("math-inline"),c=o;if(!a&&!o&&!l)return;let u=r[r.length-1],d=e;if("code"===e.tagName&&a&&u&&"element"===u.type&&"pre"===u.tagName&&(d=u,u=r[r.length-2],c=!0),!u)return;let h=function(e,t){let n,r="children"in e?e.children:[],i=ee(e),s=en(e,{whitespace:(t||{}).whitespace||"normal",breakBefore:!1,breakAfter:!1}),a=[];("text"===e.type||"comment"===e.type)&&a.push(...et(e,{whitespace:s,breakBefore:!0,breakAfter:!0}));let o=-1;for(;++o<r.length;)a.push(...function e(t,n,r){return"element"===t.type?function(t,n,r){let i,s,a=en(t,r),o=t.children||[],l=-1,c=[];if(J(t))return c;for(K(t)||Q(t)&&G(n,t,Q)?s="\n":X(t)?(i=2,s=2):ee(t)&&(i=1,s=1);++l<o.length;)c=c.concat(e(o[l],t,{whitespace:a,breakBefore:l?void 0:i,breakAfter:l<o.length-1?K(o[l+1]):s}));return Z(t)&&G(n,t,Z)&&c.push("	"),i&&c.unshift(i),s&&c.push(s),c}(t,n,r):"text"===t.type?"normal"===r.whitespace?et(t,r):[String(t.value)]:[]}(r[o],e,{whitespace:s,breakBefore:o?void 0:i,breakAfter:o<r.length-1?K(r[o+1]):i}));let l=[];for(o=-1;++o<a.length;){let e=a[o];"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=er.default.renderToString(h,{...t,displayMode:c,throwOnError:!0})}catch(a){let s=a.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...r,e],cause:a,place:e.position,ruleId:s,source:"rehype-katex"});try{i=er.default.renderToString(h,{...t,displayMode:c,strict:"ignore",throwOnError:!1})}catch{i=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(t.errorColor||"#cc0000"),title:String(a)},children:[{type:"text",value:h}]}]}}if("string"==typeof i){var p,f;i=(p=i,f={fragment:!0},B(f?.fragment?function(e){let t=document.createElement("template");return t.innerHTML=e,t.content}(p):H.parseFromString(p,"text/html"),{})||{type:"root",children:[]}).children}let m=u.children.indexOf(d);return u.children.splice(m,1,...i),T._Z})}}var eo=n(44599),el=n(63758);function ec(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 eu={}.hasOwnProperty,ed=Object.prototype;function eh(e,t){let n;switch(t.nodeName){case"#comment":return n={type:"comment",value:t.data},ef(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:ep(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=ec(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=ec(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),s=r.toPoint(t.length);(0,el.ok)(i,"expected `start`"),(0,el.ok)(s,"expected `end`"),n.position={start:i,end:s}}return n}case"#documentType":return ef(e,t,n={type:"doctype"}),n;case"#text":return n={type:"text",value:t.value},ef(e,t,n),n;default:return function(e,t){let n=e.schema;e.schema=t.namespaceURI===j.svg?I.JW:I.qy;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+":":"")+e.name;eu.call(ed,n)||(i[n]=e.value)}let s=("svg"===e.schema.space?F:P)(t.tagName,i,ep(e,t.childNodes));if(ef(e,t,s),"template"===s.tagName){let n=t.sourceCodeLocation,r=n&&n.startTag&&em(n.startTag),i=n&&n.endTag&&em(n.endTag),a=eh(e,t.content);r&&i&&e.file&&(a.position={start:r.end,end:i.start}),s.content=a}return e.schema=n,s}(e,t)}}function ep(e,t){let n=-1,r=[];for(;++n<t.length;){let i=eh(e,t[n]);r.push(i)}return r}function ef(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){let r=function(e,t,n){let r=em(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)eu.call(n.attrs,r)&&(i[(0,O.I)(e.schema,r).property]=em(n.attrs[r]));
1(0,el.ok)(n.startTag,"a start tag should exist");let s=em(n.startTag),a=n.endTag?em(n.endTag):void 0,o={opening:s};a&&(o.closing=a),o.properties=i,t.data={position:o}}}return r}(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function em(e){let t=eg({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=eg({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function eg(e){return e.line&&e.column?e:void 0}var ev=n(75164);let eb={}.hasOwnProperty,ey=(0,ev.A)("type",{handlers:{root:function(e,t){let n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=eE(e.children,n,t),eT(e,n),n},element:function(e,t){let n,r=t;"element"===e.type&&"svg"===e.tagName.toLowerCase()&&"html"===t.space&&(r=I.JW);let i=[];if(e.properties){for(n in e.properties)if("children"!==n&&eb.call(e.properties,n)){let t=function(e,t,n){let r=(0,O.I)(e,t);if(!1===n||null==n||"number"==typeof n&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?(0,N.A)(n):(0,D.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=j[r.space]}return i}(r,n,e.properties[n]);t&&i.push(t)}}let s=r.space;(0,el.ok)(s);let a={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:j[s],childNodes:[],parentNode:null};return a.childNodes=eE(e.children,a,r),eT(e,a),"template"===e.tagName&&e.content&&(a.content=function(e,t){let n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=eE(e.children,n,t),eT(e,n),n}(e.content,r)),a},text:function(e){let t={nodeName:"#text",value:e.value,parentNode:null};return eT(e,t),t},comment:function(e){let t={nodeName:"#comment",data:e.value,parentNode:null};return eT(e,t),t},doctype:function(e){let t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return eT(e,t),t}}});function eE(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let s=ey(e[r],n);s.parentNode=t,i.push(s)}return i}function eT(e,t){let n=e.position;n&&n.start&&n.end&&((0,el.ok)("number"==typeof n.start.offset),(0,el.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 e_=n(87325);let ek=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 eA={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ex(e){return e>=55296&&e<=57343}function eS(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159}function ew(e){return e>=64976&&e<=65007||ek.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
1dFirstCharacterOfTagName="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 eI{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,s=r+t,a=i+t;return{code:e,startLine:n,endLine:n,startCol:s,endCol:s,startOffset:a,endOffset:a}}_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 1
1return 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,ex(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){eS(e)?this._err(i.controlCharacterInInputStream):ew(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 eN(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"}(s||(s={}));let eC=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;
1揜Ҁ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;
1䄍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䃭ƀ;
1iyݱ⊰⊵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┩;
1䐻Ȁ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Ȁ;
1astЃ⹧⹲຅脀\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㛏㛐㛘䃗Ā;
1aᤏ㛕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))),eO=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 eR(e){return e>=a.ZERO&&e<=a.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"}(a||(a={})),!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(o||(o={})),!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"}(c||(c={}));class eD{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=c.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)===a.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))===a.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,
1i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){var r;let i=e.charCodeAt(t);if(!eR(i)&&(!((r=i)>=a.UPPER_A)||!(r<=a.UPPER_F))&&(!(r>=a.LOWER_A)||!(r<=a.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(!eR(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===a.SEMI)this.consumed+=1;else if(this.decodeMode===c.Strict)return 0;return this.emitCodePoint((r=this.result)>=55296&&r<=57343||r>1114111?65533:null!=(i=eO.get(r))?i:r,this.consumed),this.errors&&(e!==a.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&o.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let s=e.charCodeAt(t);if(this.treeIndex=function(e,t,n,r){let i=(t&o.BRANCH_LENGTH)>>7,s=t&o.JUMP_TABLE;if(0===i)return 0!==s&&r===s?n:-1;if(s){let t=r-s;return t<0||t>=i?-1:e[n+t]-1}let a=n,l=a+i-1;for(;a<=l;){let t=a+l>>>1,n=e[t];if(n<r)a=t+1;else{if(!(n>r))return e[t+i];l=t-1}}return -1}(n,r,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return 0===this.result||this.decodeMode===c.Attribute&&(0===i||function(e){var t;return e===a.EQUALS||(t=e)>=a.UPPER_A&&t<=a.UPPER_Z||t>=a.LOWER_A&&t<=a.LOWER_Z||eR(t)}(s))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((r=n[this.treeIndex])&o.VALUE_LENGTH)>>14)){if(s===a.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==c.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]&o.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]&~o.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!==c.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/"}(u||(u={})),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
1ike",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 eL=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
1ECT,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 eM(e){var t;return null!=(t=eL.get(e))?t:f.UNKNOWN}let eP=f,eF={[u.HTML]:new Set([eP.ADDRESS,eP.APPLET,eP.AREA,eP.ARTICLE,eP.ASIDE,eP.BASE,eP.BASEFONT,eP.BGSOUND,eP.BLOCKQUOTE,eP.BODY,eP.BR,eP.BUTTON,eP.CAPTION,eP.CENTER,eP.COL,eP.COLGROUP,eP.DD,eP.DETAILS,eP.DIR,eP.DIV,eP.DL,eP.DT,eP.EMBED,eP.FIELDSET,eP.FIGCAPTION,eP.FIGURE,eP.FOOTER,eP.FORM,eP.FRAME,eP.FRAMESET,eP.H1,eP.H2,eP.H3,eP.H4,eP.H5,eP.H6,eP.HEAD,eP.HEADER,eP.HGROUP,eP.HR,eP.HTML,eP.IFRAME,eP.IMG,eP.INPUT,eP.LI,eP.LINK,eP.LISTING,eP.MAIN,eP.MARQUEE,eP.MENU,eP.META,eP.NAV,eP.NOEMBED,eP.NOFRAMES,eP.NOSCRIPT,eP.OBJECT,eP.OL,eP.P,eP.PARAM,eP.PLAINTEXT,eP.PRE,eP.SCRIPT,eP.SECTION,eP.SELECT,eP.SOURCE,eP.STYLE,eP.SUMMARY,eP.TABLE,eP.TBODY,eP.TD,eP.TEMPLATE,eP.TEXTAREA,eP.TFOOT,eP.TH,eP.THEAD,eP.TITLE,eP.TR,eP.TRACK,eP.UL,eP.WBR,eP.XMP]),[u.MATHML]:new Set([eP.MI,eP.MO,eP.MN,eP.MS,eP.MTEXT,eP.ANNOTATION_XML]),[u.SVG]:new Set([eP.TITLE,eP.FOREIGN_OBJECT,eP.DESC]),[u.XLINK]:new Set,[u.XML]:new Set,[u.XMLNS]:new Set},ej=new Set([eP.H1,eP.H2,eP.H3,eP.H4,eP.H5,eP.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 eB={DATA:m.DATA,RCDATA:m.RCDATA,RAWTEXT:m.RAWTEXT,SCRIPT_DATA:m.SCRIPT_DATA,PLAINTEXT:m.PLAINTEXT,CDATA_SECTION:m.CDATA_SECTION};function eU(e){return e>=r.LATIN_CAPITAL_A&&e<=r.LATIN_CAPITAL_Z}function eH(e){return e>=r.LATIN_SMALL_A&&e<=r.LATIN_SMALL_Z||eU(e)}function e$(e){return eH(e)||e>=r.DIGIT_0&&e<=r.DIGIT_9}function eG(e){return e===r.SPACE||e===r.LINE_FEED||e===r.TABULATION||e===r.FORM_FEED}function ez(e){return eG(e)||e===r.SOLIDUS||e===r.GREATER_THAN_SIGN}class eY{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 eI(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new eD(eC,(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(ex(e))return i.surrogateCharacterReference;if(ew(e))return i.noncharacterCharacterReference;
1if(eS(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:s.START_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:s.END_TAG,tagName:"",tagID:f.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:s.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:s.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===eN(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=eM(e.tagName),e.type===s.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 s.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case s.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case s.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:s.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=eG(e)?s.WHITESPACE_CHARACTER:e===r.NULL?s.NULL_CHARACTER:s.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(s.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=m.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?c.Attribute:c.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: 14,256 bytes, line 1
1Start(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(eH(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(eH(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(eU(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){eH(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){eH(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){eH(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:eH(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){eH(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(eA.SCRIPT,!1)&&ez(this.preprocessor.peek(eA.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<eA.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(eA.SCRIPT,!1)&&ez(this.preprocessor.peek(eA.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<eA.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+="
1�";break;default:this.currentAttr.name+=String.fromCodePoint(eU(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(eA.DASH_DASH,!0)?(this._createCommentToken(eA.DASH_DASH.length+1),this.state=m.COMMENT_START):this._consumeSequenceIfMatch(eA.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(eA.DOCTYPE.length+1),this.state=m.DOCTYPE):this._consumeSequenceIfMatch(eA.CDATA_START,!0)?this.inForeignNode?this.state=m.CDATA_SECTION:(this._err(i.cdataInHtmlContent),this._createCommentToken(eA.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(eU(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;
vendor: 4,189 bytes, line 1
1case 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(eU(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(eA.PUBLIC,!1)?this.state=m.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(eA.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 1
1default: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 1
10===e?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(r.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&e$(this.preprocessor.peek(1))?m.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){e$(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===r.SEMICOLON&&this._err(i.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}let eq=new Set([f.DD,f.DT,f.LI,f.OPTGROUP,f.OPTION,f.P,f.RB,f.RP,f.RT,f.RTC]),eW=new Set([...eq,f.CAPTION,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]),eV=new Set([f.APPLET,f.CAPTION,f.HTML,f.MARQUEE,f.OBJECT,f.TABLE,f.TD,f.TEMPLATE,f.TH]),eK=new Set([...eV,f.OL,f.UL]),eZ=new Set([...eV,f.BUTTON]),eX=new Set([f.ANNOTATION_XML,f.MI,f.MN,f.MO,f.MS,f.MTEXT]),eQ=new Set([f.DESC,f.FOREIGN_OBJECT,f.TITLE]),eJ=new Set([f.TR,f.TEMPLATE,f.HTML]),e0=new Set([f.TBODY,f.TFOOT,f.THEAD,f.TEMPLATE,f.HTML]),e1=new Set([f.TABLE,f.TEMPLATE,f.HTML]),e2=new Set([f.TD,f.TH]);class e3{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)===u.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])!==u.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(ej,u.HTML)}popUntilTableCellPopped(){this.popUntilPopped(e2,u.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(e1,u.HTML)}clearBackToTableBodyContext(){this.clearBackTo(e0,u.HTML)}clearBackToTableRowContext(){this.clearBackTo(eJ,u.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 u.HTML:if(r===e)return!0;
1if(t.has(r))return!1;break;case u.SVG:if(eQ.has(r))return!1;break;case u.MATHML:if(eX.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,eV)}hasInListItemScope(e){return this.hasInDynamicScope(e,eK)}hasInButtonScope(e){return this.hasInDynamicScope(e,eZ)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case u.HTML:if(ej.has(t))return!0;if(eV.has(t))return!1;break;case u.SVG:if(eQ.has(t))return!1;break;case u.MATHML:if(eX.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===u.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])===u.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])===u.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&&eq.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;void 0!==this.currentTagId&&eW.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;void 0!==this.currentTagId&&this.currentTagId!==e&&eW.has(this.currentTagId);)this.pop()}}!function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"}(g||(g={}));let e4={type:g.Marker};class e9{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),s=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:a}=t;if(this.treeAdapter.getTagName(a)===i&&this.treeAdapter.getNamespaceURI(a)===s){let t=this.treeAdapter.getAttrList(a);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(e4)}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(e4);-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 e8={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):e8.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(e8.isTextNode(n)){n.value+=t;return}}e8.appendChild(e,e8.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&e8.isTextNode(r)?r.value+=t:e8.insertBefore(e,e8.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}}},e5="html",e6=["+//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//"],e7=[...e6,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],te=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),tt=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],tn=[...tt,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function tr(e,t){return t.some(t=>e.startsWith(t))}let ti={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},ts=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),ta=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:u.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:u.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:u.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:u.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:u.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:u.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:u.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:u.XML}
1],["xml:space",{prefix:"xml",name:"space",namespace:u.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:u.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:u.XMLNS}]]),to=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])),tl=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 tc(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}}function tu(e){for(let t=0;t<e.attrs.length;t++){let n=ts.get(e.attrs[t].name);null!=n&&(e.attrs[t].name=n)}}function td(e){for(let t=0;t<e.attrs.length;t++){let n=ta.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 th={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},tp=new Set([f.TABLE,f.TBODY,f.TFOOT,f.THEAD,f.TR]),tf={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:e8,onParseError:null};class tm{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={...tf,...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 eY(this.options,this),this.activeFormattingElements=new e9(this.treeAdapter),this.fragmentContextID=n?eM(this.treeAdapter.getTagName(n)):f.UNKNOWN,this._setContextModes(null!=n?n:this.document,this.fragmentContextID),this.openElements=new e3(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={...tf,...t};null!=e||(e=n.treeAdapter.createElement(p.TEMPLATE,u.HTML,[]));let r=n.treeAdapter.createElement("documentmock",u.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:th,s={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(s)}
1onItemPush(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)===u.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&void 0!==e&&void 0!==t&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,u.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=eB.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)===u.HTML)switch(this.fragmentContextID){case f.TITLE:case f.TEXTAREA:this.tokenizer.state=eB.RCDATA;break;case f.STYLE:case f.XMP:case f.IFRAME:case f.NOEMBED:case f.NOFRAMES:case f.NOSCRIPT:this.tokenizer.state=eB.RAWTEXT;break;case f.SCRIPT:this.tokenizer.state=eB.SCRIPT_DATA;break;case f.PLAINTEXT:this.tokenizer.state=eB.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,u.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,u.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,u.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,s=r[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,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===s.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)!==u.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===f.MGLYPH||e.tagID===f.MALIGNMARK)&&void 0!==n&&!this._isIntegrationPoint(n,t,u.HTML)))}_processToken(e){switch(e.type){case s.CHARACTER:this.onCharacter(e);break;case s.NULL_CHARACTER:this.onNullCharacter(e);break;case s.COMMENT:this.onComment(e);break;case s.DOCTYPE:this.onDoctype(e);break;case s.START_TAG:this._processStartTag(e);break;case s.END_TAG:this.onEndTag(e);break;case s.EOF:this.onEof(e);break;case s.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){let r=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return(!n||n===u.HTML)&&function(e,t,n){if(t===u.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===ti.TEXT_HTML||t===ti.APPLICATION_XML}}return t===u.SVG&&(e===f.FOREIGN_OBJECT||e===f.DESC||e===f.TITLE)}(e,r,i)||(!n||n===u.MATHML)&&r===u.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 tp.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)===u.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 eF[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:ty(this,e);break;case v.BEFORE_HTML:tE(this,e);break;case v.BEFORE_HEAD:tT(this,e);break;case v.IN_HEAD:tA(this,e);break;case v.IN_HEAD_NO_SCRIPT:tx(this,e);break;case v.AFTER_HEAD:tS(this,e);break;case v.IN_BODY:case v.IN_CAPTION:case v.IN_CELL:case v.IN_TEMPLATE:tN(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:tj(this,e);break;case v.IN_TABLE_TEXT:tG(this,e);break;case v.IN_COLUMN_GROUP:tW(this,e);break;case v.AFTER_BODY:t2(this,e);break;case v.AFTER_AFTER_BODY:t3(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:ty(this,e);break;case v.BEFORE_HTML:tE(this,e);break;case v.BEFORE_HEAD:tT(this,e);break;case v.IN_HEAD:tA(this,e);break;case v.IN_HEAD_NO_SCRIPT:tx(this,e);break;case v.AFTER_HEAD:tS(this,e);break;case v.TEXT:this._insertCharacters(e);break;case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:tj(this,e);break;case v.IN_COLUMN_GROUP:tW(this,e);break;case v.AFTER_BODY:t2(this,e);break;case v.AFTER_AFTER_BODY:t3(this,e)}}onComment(e){var t,n,r,i;if(this.skipNextNewLine=!1,this.currentNotInHTML)return void tv(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:tv(this,e);break;case v.IN_TABLE_TEXT:tz(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!==e5)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(),te.has(n))return h.QUIRKS;let e=null===t?e7:e6;if(tr(n,e))return h.QUIRKS;if(tr(n,e=null===t?tt:tn))return h.LIMITED_QUIRKS}return h.NO_QUIRKS}(t);(t.name!==e5||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:tz(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)||tl.has(t)}(t))t4(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);if(r===u.MATHML)tc(t);else if(r===u.SVG){let e=to.get(t.tagName);null!=e&&(t.tagName=e,t.tagID=eM(t.tagName)),tu(t)}td(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:ty(this,e);break;case v.BEFORE_HTML:t=this,(n=e).tagID===f.HTML?(t._insertElement(n,u.HTML),t.insertionMode=v.BEFORE_HEAD):tE(t,
1n);break;case v.BEFORE_HEAD:var t,n,r,s,a,o,l=this,c=e;switch(c.tagID){case f.HTML:tL(l,c);break;case f.HEAD:l._insertElement(c,u.HTML),l.headElement=l.openElements.current,l.insertionMode=v.IN_HEAD;break;default:tT(l,c)}break;case v.IN_HEAD:t_(this,e);break;case v.IN_HEAD_NO_SCRIPT:var d=this,h=e;switch(h.tagID){case f.HTML:tL(d,h);break;case f.BASEFONT:case f.BGSOUND:case f.HEAD:case f.LINK:case f.META:case f.NOFRAMES:case f.STYLE:t_(d,h);break;case f.NOSCRIPT:d._err(h,i.nestedNoscriptInHead);break;default:tx(d,h)}break;case v.AFTER_HEAD:var p=this,m=e;switch(m.tagID){case f.HTML:tL(p,m);break;case f.BODY:p._insertElement(m,u.HTML),p.framesetOk=!1,p.insertionMode=v.IN_BODY;break;case f.FRAMESET:p._insertElement(m,u.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),t_(p,m),p.openElements.remove(p.headElement);break;case f.HEAD:p._err(m,i.misplacedStartTagForHeadElement);break;default:tS(p,m)}break;case v.IN_BODY:tL(this,e);break;case v.IN_TABLE:tB(this,e);break;case v.IN_TABLE_TEXT:tz(this,e);break;case v.IN_CAPTION:var g=this,b=e;let y=b.tagID;tY.has(y)?g.openElements.hasInTableScope(f.CAPTION)&&(g.openElements.generateImpliedEndTags(),g.openElements.popUntilTagNamePopped(f.CAPTION),g.activeFormattingElements.clearToLastMarker(),g.insertionMode=v.IN_TABLE,tB(g,b)):tL(g,b);break;case v.IN_COLUMN_GROUP:tq(this,e);break;case v.IN_TABLE_BODY:tV(this,e);break;case v.IN_ROW:tZ(this,e);break;case v.IN_CELL:var E=this,T=e;let _=T.tagID;tY.has(_)?(E.openElements.hasInTableScope(f.TD)||E.openElements.hasInTableScope(f.TH))&&(E._closeTableCell(),tZ(E,T)):tL(E,T);break;case v.IN_SELECT:tQ(this,e);break;case v.IN_SELECT_IN_TABLE:var k=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?(k.openElements.popUntilTagNamePopped(f.SELECT),k._resetInsertionMode(),k._processStartTag(A)):tQ(k,A);break;case v.IN_TEMPLATE:var S=this,w=e;switch(w.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:t_(S,w);break;case f.CAPTION:case f.COLGROUP:case f.TBODY:case f.TFOOT:case f.THEAD:S.tmplInsertionModeStack[0]=v.IN_TABLE,S.insertionMode=v.IN_TABLE,tB(S,w);break;case f.COL:S.tmplInsertionModeStack[0]=v.IN_COLUMN_GROUP,S.insertionMode=v.IN_COLUMN_GROUP,tq(S,w);break;case f.TR:S.tmplInsertionModeStack[0]=v.IN_TABLE_BODY,S.insertionMode=v.IN_TABLE_BODY,tV(S,w);break;case f.TD:case f.TH:S.tmplInsertionModeStack[0]=v.IN_ROW,S.insertionMode=v.IN_ROW,tZ(S,w);break;default:S.tmplInsertionModeStack[0]=v.IN_BODY,S.insertionMode=v.IN_BODY,tL(S,w)}break;case v.AFTER_BODY:r=this,(s=e).tagID===f.HTML?tL(r,s):t2(r,s);break;case v.IN_FRAMESET:var I=this,N=e;switch(N.tagID){case f.HTML:tL(I,N);break;case f.FRAMESET:I._insertElement(N,u.HTML);break;case f.FRAME:I._appendElement(N,u.HTML),N.ackSelfClosing=!0;break;case f.NOFRAMES:t_(I,N)}break;case v.AFTER_FRAMESET:var C=this,O=e;switch(O.tagID){case f.HTML:tL(C,O);break;case f.NOFRAMES:t_(C,O)}break;case v.AFTER_AFTER_BODY:a=this,(o=e).tagID===f.HTML?tL(a,o):t3(a,o);break;case v.AFTER_AFTER_FRAMESET:var R=this,D=e;switch(D.tagID){case f.HTML:tL(R,D);break;case f.NOFRAMES:t_(R,D)}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===f.P||t.tagID===f.BR){t4(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)===u.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:ty(this,e);break;case v.BEFORE_HTML:var t,n,r,s,a,o,l=this,c=e;let u=c.tagID;(u===f.HTML||u===f.HEAD||u===f.BODY||u===f.BR)&&tE(l,c);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?tT(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:tA(m,g);break;case f.TEMPLATE:tk(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:tx(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:tS(E,T);break;case f.TEMPLATE:tk(E,T);break;default:E._err(T,i.endTagWithoutMatchingOpenElement)}break;case v.IN_BODY:tP(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:tU(this,e);break;case v.IN_TABLE_TEXT:tz(this,e);break;case v.IN_CAPTION:var _=this,k=e;let A=k.tagID;switch(A){case f.CAPTION:case f.TABLE:_.openElements.hasInTableScope(f.CAPTION)&&(_.openElements.generateImpliedEndTags(),_.openElements.popUntilTagNamePopped(f.CAPTION),_.activeFormattingElements.clearToLastMarker(),_.insertionMode=v.IN_TABLE,A===f.TABLE&&tU(_,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:tP(_,k)}break;case v.IN_COLUMN_GROUP:var x=this,S=e;switch(S.tagID){case f.COLGROUP:x.openElements.currentTagId===f.COLGROUP&&(x.openElements.pop(),x.insertionMode=v.IN_TABLE);break;case f.TEMPLATE:tk(x,S);break;case f.COL:break;default:tW(x,S)}break;case v.IN_TABLE_BODY:tK(this,e);break;case v.IN_ROW:tX(this,e);break;case v.IN_CELL:var w=this,I=e;let N=I.tagID;switch(N){case f.TD:case f.TH:w.openElements.hasInTableScope(N)&&(w.openElements.generateImpliedEndTags(),w.openElements.popUntilTagNamePopped(N),w.activeFormattingElements.clearToLastMarker(),w.insertionMode=v.IN_ROW);break;case f.TABLE:case f.TBODY:case f.TFOOT:case f.THEAD:case f.TR:w.openElements.hasInTableScope(N)&&(w._closeTableCell(),tX(w,I));break;case f.BODY:case f.CAPTION:case f.COL:case f.COLGROUP:case f.HTML:break;default:tP(w,I)}break;case v.IN_SELECT:tJ(this,e);break;case v.IN_SELECT_IN_TABLE:var C=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?C.openElements.hasInTableScope(R)&&(C.openElements.popUntilTagNamePopped(f.SELECT),C._resetInsertionMode(),C.onEndTag(O)):tJ(C,O);break;case v.IN_TEMPLATE:r=this,(s=e).tagID===f.TEMPLATE&&tk(r,s);break;case v.AFTER_BODY:t1(this,e);break;case v.IN_FRAMESET:a=this,e.tagID===f.FRAMESET&&!a.openElements.isRootHtmlElementCurrent()&&(a.openElements.pop(),a.fragmentContext||a.openElements.currentTagId===f.FRAMESET||(a.insertionMode=v.AFTER_FRAMESET));break;case v.AFTER_FRAMESET:o=this,e.tagID===f.HTML&&(o.insertionMode=v.AFTER_AFTER_FRAMESET);break;case v.AFTER_AFTER_BODY:t3(this,e)}}onEof(e){switch(this.insertionMode){case v.INITIAL:ty(this,e);break;case v.BEFORE_HTML:tE(this,e);break;case v.BEFORE_HEAD:tT(this,e);break;case v.IN_HEAD:tA(this,e);break;case v.IN_HEAD_NO_SCRIPT:tx(this,e);break;case v.AFTER_HEAD:tS(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:tF(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:tz(this,e);break;case v.IN_TEMPLATE:t0(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:tb(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCo
1deAt(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:tI(this,e);break;case v.IN_TABLE:case v.IN_TABLE_BODY:case v.IN_ROW:tj(this,e);break;case v.IN_TABLE_TEXT:t$(this,e)}}}function tg(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):tM(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 s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);let n=e.activeFormattingElements.getElementEntry(a),o=n&&s>=3;!n||o?(o&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(a)):(a=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(a,r),r=a)}return r}(e,r,n.element),s=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),s&&function(e,t,n){let r=eM(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===f.TEMPLATE&&i===u.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}(e,s,i);let a=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,l=e.treeAdapter.createElement(o.tagName,a,o.attrs);e._adoptNodes(r,l),e.treeAdapter.appendChild(r,l),e.activeFormattingElements.insertElementAfterBookmark(l,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(r,l,o.tagID)}}function tv(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function tb(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 ty(e,t){e._err(t,i.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,h.QUIRKS),e.insertionMode=v.BEFORE_HTML,e._processToken(t)}function tE(e,t){e._insertFakeRootElement(),e.insertionMode=v.BEFORE_HEAD,e._processToken(t)}function tT(e,t){e._insertFakeElement(p.HEAD,f.HEAD),e.headElement=e.openElements.current,e.insertionMode=v.IN_HEAD,e._processToken(t)}function t_(e,t){switch(t.tagID){case f.HTML:tL(e,t);break;case f.BASE:case f.BASEFONT:case f.BGSOUND:case f.LINK:case f.META:e._appendElement(t,u.HTML),t.ackSelfClosing=!0;break;case f.TITLE:e._switchToTextParsing(t,eB.RCDATA);break;case f.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,eB.RAWTEXT):(e._insertElement(t,u.HTML),e.insertionMode=v.IN_HEAD_NO_SCRIPT);break;case f.NOFRAMES:case f.STYLE:e._switchToTextParsing(t,eB.RAWTEXT);break;case f.SCRIPT:e._switchToTextParsing(t,eB.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:tA(e,t)}}function tk(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 tA(e,t){e.openElements.pop(),e.insertionMode=v.AFTER_HEAD,e._processToken(t)}function tx(e,t){let n=t.type===s.EOF?i.openElementsLeftAfterEof:i.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=v.IN_HEAD,e._processToken(t)}function tS(e,t){e._insertFakeElement(p.BODY,f.BODY),e.insertionMode=v.IN_BODY,tw(e,t)}function tw(e,t){switch(t.type){case s.CHARACTER:tN(e,t);break;case s.WHITESPACE_CHARACTER:tI(e,t);break;case s.COMMENT:tv(e,t);break;case s.START_TAG:tL(e,t);break;case s.END_TAG:tP(e,t);break;case s.EOF:tF(e,t)}}function tI(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function tN(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function tC(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,u.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function tO(e){let t=eN(e,d.TYPE);return null!=t&&"hidden"===t.toLowerCase()}function tR(e,t){e._switchToTextParsing(t,eB.RAWTEXT)}function tD(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,u.HTML)}function tL(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,u.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case f.A:let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(p.A);n&&(tg(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,u.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&&ej.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,u.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
1ER: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,u.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,u.HTML);break;case f.BR:case f.IMG:case f.WBR:case f.AREA:case f.EMBED:case f.KEYGEN:tC(e,t);break;case f.HR:e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._appendElement(t,u.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,u.HTML);break;case f.RT:case f.RP:e.openElements.hasInScope(f.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(f.RTC),e._insertElement(t,u.HTML);break;case f.PRE:case f.LISTING:e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,u.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,eB.RAWTEXT);break;case f.SVG:e._reconstructActiveFormattingElements(),tu(t),td(t),t.selfClosing?e._appendElement(t,u.SVG):e._insertElement(t,u.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:t_(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 s=e.openElements.tmplCount>0;(!e.formElement||s)&&(e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,u.HTML),s||(e.formElement=e.openElements.current));break;case f.NOBR:e._reconstructActiveFormattingElements(),e.openElements.hasInScope(f.NOBR)&&(tg(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,u.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);break;case f.MATH:e._reconstructActiveFormattingElements(),tc(t),td(t),t.selfClosing?e._appendElement(t,u.MATHML):e._insertElement(t,u.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,u.HTML),e.framesetOk=!1,e.insertionMode=v.IN_TABLE;break;case f.INPUT:e._reconstructActiveFormattingElements(),e._appendElement(t,u.HTML),tO(t)||(e.framesetOk=!1),t.ackSelfClosing=!0;break;case f.PARAM:case f.TRACK:case f.SOURCE:e._appendElement(t,u.HTML),t.ackSelfClosing=!0;break;case f.IMAGE:t.tagName=p.IMG,t.tagID=f.IMG,tC(e,t);break;case f.BUTTON:e.openElements.hasInScope(f.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(f.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,u.HTML),e.framesetOk=!1;break;case f.APPLET:case f.OBJECT:case f.MARQUEE:e._reconstructActiveFormattingElements(),e._insertElement(t,u.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1;break;case f.IFRAME:e.framesetOk=!1,e._switchToTextParsing(t,eB.RAWTEXT);break;case f.SELECT:e._reconstructActiveFormattingElements(),e._insertElement(t,u.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,u.HTML);break;case f.NOEMBED:case f.NOFRAMES:tR(e,t);break;case f.FRAMESET:let a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,u.HTML),e.insertionMode=v.IN_FRAMESET);break;case f.TEXTAREA:e._insertElement(t,u.HTML),e.skipNextNewLine=!0,e.tokenizer.state=eB.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=v.TEXT;break;case f.NOSCRIPT:e.options.scriptingEnabled?tR(e,t):tD(e,t);break;case f.PLAINTEXT:e.openElements.hasInButtonScope(f.P)&&e._closePElement(),e._insertElement(t,u.HTML),e.tokenizer.state=eB.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:tD(e,t)}}function tM(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],s=e.openElements.tagIDs[t];if(r===s&&(r!==f.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>
1=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,s))break}}function tP(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:tg(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,t1(e,t));break;case f.FORM:let i=e.openElements.tmplCount>0,{formElement:s}=e;i||(e.formElement=null),(s||i)&&e.openElements.hasInScope(f.FORM)&&(e.openElements.generateImpliedEndTags(),i?e.openElements.popUntilTagNamePopped(f.FORM):s&&e.openElements.remove(s));break;case f.APPLET:case f.OBJECT:case f.MARQUEE:let a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker());break;case f.TEMPLATE:tk(e,t);break;default:tM(e,t)}}function tF(e,t){e.tmplInsertionModeStack.length>0?t0(e,t):tb(e,t)}function tj(e,t){if(void 0!==e.openElements.currentTagId&&tp.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 s.CHARACTER:tG(e,t);break;case s.WHITESPACE_CHARACTER:t$(e,t)}else tH(e,t)}function tB(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,tV(e,t);break;case f.STYLE:case f.SCRIPT:case f.TEMPLATE:t_(e,t);break;case f.COL:e.openElements.clearBackToTableContext(),e._insertFakeElement(p.COLGROUP,f.COLGROUP),e.insertionMode=v.IN_COLUMN_GROUP,tq(e,t);break;case f.FORM:e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,u.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,u.HTML),e.insertionMode=v.IN_TABLE_BODY;break;case f.INPUT:tO(t)?e._appendElement(t,u.HTML):tH(e,t),t.ackSelfClosing=!0;break;case f.CAPTION:e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,u.HTML),e.insertionMode=v.IN_CAPTION;break;case f.COLGROUP:e.openElements.clearBackToTableContext(),e._insertElement(t,u.HTML),e.insertionMode=v.IN_COLUMN_GROUP;break;default:tH(e,t)}}function tU(e,t){switch(t.tagID){case f.TABLE:e.openElements.hasInTableScope(f.TABLE)&&(e.openElements.popUntilTagNamePopped(f.TABLE),e._resetInsertionMode());break;case f.TEMPLATE:tk(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:tH(e,t)}}function tH(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,tw(e,t),e.fosterParentingEnabled=n}
vendor: 5,181 bytes, line 1
1function t$(e,t){e.pendingCharacterTokens.push(t)}function tG(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function tz(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)tH(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}let tY=new Set([f.CAPTION,f.COL,f.COLGROUP,f.TBODY,f.TD,f.TFOOT,f.TH,f.THEAD,f.TR]);function tq(e,t){switch(t.tagID){case f.HTML:tL(e,t);break;case f.COL:e._appendElement(t,u.HTML),t.ackSelfClosing=!0;break;case f.TEMPLATE:t_(e,t);break;default:tW(e,t)}}function tW(e,t){e.openElements.currentTagId===f.COLGROUP&&(e.openElements.pop(),e.insertionMode=v.IN_TABLE,e._processToken(t))}function tV(e,t){switch(t.tagID){case f.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,u.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,tZ(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,tB(e,t));break;default:tB(e,t)}}function tK(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,tU(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:tU(e,t)}}function tZ(e,t){switch(t.tagID){case f.TH:case f.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,u.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,tV(e,t));break;default:tB(e,t)}}function tX(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,tK(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,tK(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:tU(e,t)}}function tQ(e,t){switch(t.tagID){case f.HTML:tL(e,t);break;case f.OPTION:e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e._insertElement(t,u.HTML);break;case f.OPTGROUP:e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._insertElement(t,u.HTML);break;case f.HR:e.openElements.currentTagId===f.OPTION&&e.openElements.pop(),e.openElements.currentTagId===f.OPTGROUP&&e.openElements.pop(),e._appendElement(t,u.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:t_(e,t)}}function tJ(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:tk(e,t)}}function t0(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(f.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):tb(e,t)}function t1(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 t2(e,t)}function t2(e,t){e.insertionMode=v.IN_BODY,tw(e,t)}function t3(e,t){e.insertionMode=v.IN_BODY,tw(e,t)}function t4(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==u.HTML&&void 0!==e.openElements.currentTagId&&!e._isIntegrationPoint(e.openElements.currentTagId,e.o
1penElements.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 t9=n(73545);let t8=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,t5=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),t6={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function t7(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,ev.A)("type",{handlers:{root:nt,element:nn,text:nr,comment:ns,doctype:ni,raw:na},unknown:no}),i={parser:n?new tm(t6):tm.getFragmentParser(void 0,t6),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),nl(i,(0,t9.PW)());let s=function(e,t){let n=t||{};return eh({file:n.file||void 0,location:!1,schema:"svg"===n.space?I.JW:I.qy,verbose:n.verbose||!1},e)}(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return(i.stitches&&(0,E.YR)(s,"comment",function(e,t,n){if(e.value.stitch&&n&&void 0!==t)return n.children[t]=e.value.stitch,t}),"root"===s.type&&1===s.children.length&&s.children[0].type===e.type)?s.children[0]:s}function ne(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function nt(e,t){ne(e.children,t)}function nn(e,t){(function(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===eB.PLAINTEXT)return;nl(t,(0,t9.PW)(e));let r=t.parser.openElements.current,i="namespaceURI"in r?r.namespaceURI:j.html;i===j.html&&"svg"===n&&(i=j.svg);let a=ey({...e,children:[]},"svg"===({space:i===j.svg?"svg":"html"}).space?I.JW:I.qy),o={type:s.START_TAG,tagName:n,tagID:eM(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:nu(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n})(e,t),ne(e.children,t),function(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&e_.b.includes(n)||t.parser.tokenizer.state===eB.PLAINTEXT)return;nl(t,(0,t9.Y)(e));let r={type:s.END_TAG,tagName:n,tagID:eM(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:nu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===eB.RCDATA||t.parser.tokenizer.state===eB.RAWTEXT||t.parser.tokenizer.state===eB.SCRIPT_DATA)&&(t.parser.tokenizer.state=eB.DATA)}(e,t)}function nr(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:s.CHARACTER,chars:e.value,location:nu(e)};nl(t,(0,t9.PW)(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ni(e,t){let n={type:s.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:nu(e)};nl(t,(0,t9.PW)(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ns(e,t){let n=e.value,r={type:s.COMMENT,data:n,location:nu(e)};nl(t,(0,t9.PW)(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function na(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,nc(t,(0,t9.PW)(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(t8,"&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 no(e,t){if(t.options.passThrough&&t.options.passThrough.includes(e.type)){var n;t.stitches=!0;let r="children"in(n=e)?(0,eo.Ay)({...n,children:[]}):(0,eo.Ay)(n);"children"in e&&"children"in r&&(r.children=t7({type:"root",children:e.children},t.options).children),ns({type:"comment",value:{stitch:r}},t)}else{let t="";
1throw t5.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 nl(e,t){nc(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=eB.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 nc(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 nu(e){let t=(0,t9.PW)(e)||{line:void 0,column:void 0,offset:void 0},n=(0,t9.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 nd=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],nh={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...nd,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...nd],h2:[["className","sr-only"]],img:[...nd,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...nd,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...nd],table:[...nd],ul:[...nd,["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"]},np={}.hasOwnProperty;function nf(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 nb(n,r),n}return;case"doctype":var i=e,s=t;if(i.schema.allowDoctypes){let e={type:"doctype"};return nb(e,s),e}return;case"element":return function(e,t){let n="string"==typeof t.tagName?t.tagName:"";e.stack.push(n);let r=nm(e,t.children),i=function(e,t){let n,r=e.stack[e.stack.length-1],i=e.schema.attributes,s=e.schema.required,a=i&&np.call(i,r)?i[r]:void 0,o=i&&np.call(i,"*")?i["*"]:void 0,l=t&&"object"==typeof t?t:{},c={};
1for(n in l)if(np.call(l,n)){let t=l[n],r=ng(e,ny(a,n),n,t);null==r&&(r=ng(e,ny(o,n),n,t)),null!=r&&(c[n]=r)}if(s&&np.call(s,r)){let e=s[r];for(n in e)np.call(e,n)&&!np.call(c,n)&&(c[n]=e[n])}return c}(e,t.properties);e.stack.pop();let s=!1;if(n&&"*"!==n&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&np.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(s=!1;++r<t.length;)e.stack.includes(t[r])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let a={type:"element",tagName:n,properties:i,children:r};return nb(a,t),a}(e,t);case"root":var a=e,o=t;let l={type:"root",children:nm(a,o.children)};return nb(l,o),l;case"text":var c=t;let u={type:"text",value:"string"==typeof c.value?c.value:""};return nb(u,c),u}}function nm(e,t){let n=[];if(Array.isArray(t)){let r=-1;for(;++r<t.length;){let i=nf(e,t[r]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function ng(e,t,n,r){return t?Array.isArray(r)?function(e,t,n,r){let i=-1,s=[];for(;++i<r.length;){let a=nv(e,t,n,r[i]);("number"==typeof a||"string"==typeof a)&&s.push(a)}return s}(e,t,n,r):nv(e,t,n,r):void 0}function nv(e,t,n,r){if(("boolean"==typeof r||"number"==typeof r||"string"==typeof r)&&function(e,t,n){let r=e.schema.protocols&&np.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||0===r.length)return!0;let i=String(n),s=i.indexOf(":"),a=i.indexOf("?"),o=i.indexOf("#"),l=i.indexOf("/");if(s<0||l>-1&&s>l||a>-1&&s>a||o>-1&&s>o)return!0;let c=-1;for(;++c<r.length;){let e=r[c];if(s===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 nb(e,t){let n=(0,t9.G1)(t);t.data&&(e.data=(0,eo.Ay)(t.data)),n&&(e.position=n)}function ny(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],s="string"==typeof i?i:i[0];if(s===t)return i;"data*"===s&&(n=i)}if(t.length>4&&"data"===t.slice(0,4).toLowerCase())return n}let nE={eof:null,asterisk:42,underscore:95,tilde:126},nT={attentionSideAfter:2,characterGroupPunctuation:2,characterGroupWhitespace:1};var n_=n(3407);let nk=[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],nA=[12288,12288,65281,65376,65504,65510],nx=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],nS=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],nw=[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
1686,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],nI=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),s=2*i;if(t<e[s])r=i-1;else{if(!(t>e[s+1]))return!0;n=i+1}}return!1},[nN,nC]=function(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],s=e[r+1];if(19968>=i&&19968<=s)return[i,s];s-i>n-t&&(t=i,n=s)}return[t,n]}(nw);var nO=Object.defineProperty,nR=nL(/\p{P}|\p{S}/u),nD=nL(/\s/);function nL(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCodePoint(t))}}function nM(e){if(e===nE.eof||(0,n_.Ee)(e)||nD(e))return nT.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)&&nI(nk,e)?"ambiguous":!(e<12288)&&!(e>65510)&&nI(nA,e)?"fullwidth":!(e<8361)&&!(e>65518)&&nI(nx,e)?"halfwidth":!(e<32)&&!(e>10630)&&nI(nS,e)?"narrow":e>=nN&&e<=nC||!(e<4352)&&!(e>262141)&&nI(nw,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 nR(e)&&(t|=nT.characterGroupPunctuation),t}function nP(e,t,n){if(e!==b.nonEmojiGeneralUseVS)return e;let r=t(),i=nM(r);return!r||nF(i)?e:65025===n&&r&&!(r<8216)&&(8216===r||8217===r||8220===r||8221===r)?b.cjkPunctuation:i&~b.ivs}function nF(e){return!!(e&nT.characterGroupWhitespace)}function nj(e){return(e&b.cjkPunctuation)===nT.characterGroupPunctuation}function nB(e){return!!(e&b.cjk)}function nU(e){return!!(e&b.spaceOrPunctuation)}function nH(e){return!!(e&&e>=55296&&e<=56319)}function n$(e){return!!(e&&e>=56320&&e<=57343)}function nG(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 nz=class{constructor(e,t,n){this.previousCode=e,this.nowPoint=t,this.sliceSerialize=n,((e,t,n)=>((e,t,n)=>t in e?nO(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,s=n({start:{...t,_bufferIndex:i>=0?i:0},end:{...t,_bufferIndex:t._bufferIndex-r}}),a=s.charCodeAt(s.length-1);if(Number.isNaN(a))return null;if(s.length<2||a<56320||57343<a)return a;let o=s.codePointAt(0);return o&&o>=65536?o:a}(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function nY(e,t,n){let r=n({start:t,end:{...t,_bufferIndex:t._bufferIndex+2}}).codePointAt(0);return r&&r>=65536?r:e}var nq=n(17032),nW=n(41006);let nV={data:"data",characterEscape:"characterEscape",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",strong:"strong",strongSequence:"strongSequence",strongText:"strongText"};var nK={name:"attention",resolveAll:function(e,t){let n,r,i,s,a,o,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close){for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[
1n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;o=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;let d={...e[n][1].end},h={...e[u][1].start};nZ(d,-o),nZ(h,o),s={type:o>1?nV.strongSequence:nV.emphasisSequence,start:d,end:{...e[n][1].end}},a={type:o>1?nV.strongSequence:nV.emphasisSequence,start:{...e[u][1].start},end:h},i={type:o>1?nV.strongText:nV.emphasisText,start:{...e[n][1].end},end:{...e[u][1].start}},r={type:o>1?nV.strong:nV.emphasis,start:{...s.start},end:{...a.end}},e[n][1].end={...s.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=(0,nq.V)(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=(0,nq.V)(l,[["enter",r,t],["enter",s,t],["exit",s,t],["enter",i,t]]),(0,el.ok)(t.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),l=(0,nq.V)(l,(0,nW.W)(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=(0,nq.V)(l,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=(0,nq.V)(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,(0,nq.m)(e,n-1,u-n+3,l),u=n+l.length-c-2;break}}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){let n,r=this.parser.constructs.attentionMarkers.null,{now:i,sliceSerialize:s,previous:a}=this,o=n$(a)?nG(a,i(),s):a,l=nM(o),c=new nz(o,i(),s),u=nP(l,c.value.bind(c),o);return function(a){return(0,el.ok)(a===nE.asterisk||a===nE.underscore,"expected asterisk or underscore"),n=a,e.enter("attentionSequence"),function a(l){if(l===n)return e.consume(l),a;let c=e.exit("attentionSequence"),d=nM(nH(l)?nY(l,i(),s):l);(0,el.ok)(r,"expected `attentionMarkers` to be populated");let h=nj(u),p=h||nF(u),f=nj(d),m=f||nF(d),g=!!(u&b.cjkOrIvs),v=!m||f&&(p||g)||r.includes(l),y=!p||h&&(m||nB(d))||r.includes(o);return c._open=!!(n===nE.asterisk?v:v&&(nU(u)||!y)),c._close=!!(n===nE.asterisk?y:y&&(nU(d)||!v)),t(l)}(a)}}};function nZ(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var nX=n(27012),nQ=n(95578),nJ=n(79168);let n0={tokenize:function(e,t,n){let r=this,i=r.events[r.events.length-1],s=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(r){return 36===r?(e.consume(r),a++,t):a<2?n(r):(e.exit("mathFlowFenceSequence"),(0,nJ.N)(e,o,"whitespace")(r))}(t)};function o(t){return null===t||(0,n_.HP)(t)?l(t):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),function t(r){return null===r||(0,n_.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(n1,c,h)(n)}function c(t){return e.attempt({tokenize:p,partial:!0},h,u)(t)}function u(t){return(s?(0,nJ.N)(e,d,"linePrefix",s+1):d)(t)}function d(t){return null===t?h(t):(0,n_.HP)(t)?e.attempt(n1,c,h)(t):(e.enter("mathFlowValue"),function t(n){return null===n||(0,n_.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,nJ.N)(e,function(t){return e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),function t(r){return 36===r?(i++,e.consume(r),t):i<a?n(r):(e.exit("mathFlowFenceSequence"),(0,nJ.N)(e,s,"whitespace")(r))}(t)},"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function s(r){return null===r||(0,n_.HP)(r)?(e.exit("mathFlowFence"),t(r)):n(r)}}},concrete:!0,name:"mathFlow"},n1={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 n2(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 n3(e){return 36!==e||"characterEscape"===this.events[this.events.length-1][1].type}let n4={};function n9(e){let t,n=e||n4,r=this.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push({flow:{36:n0},text:{36:(null==(t=(n||{}).singleDollarTextMath)&&(t=!0),{tokenize:function(e,n,r){let i,s,a=0;return function(n){return e.enter("mathText"),e.enter("mathTextSequence"),function n(i){return 36===i?(e.consume(i),a++,n):a<2&&!t?r(i):(e.exit("mathTextSequence"),o(i))}(n)};function o(t){return null===t?r(t):36===t?(s=e.enter("mathTextSequence"),i=0,function t(r){return 36===r?(e.consume(r),i++,t):i===a?(e.exit("mathTextSequence"),e.exit("mathText"),n(r)):(s.type="mathTextData",l(r))}(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),o):(0,n_.HP)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):(e.enter("mathTextData"),l(t))}function l(t){return null===t||32===t||36===t||(0,n_.HP)(t)?(e.exit("mathTextData"),o(t)):(e.consume(t),l)}},resolve:n2,previous:n3,name:"mathText"})}}),s.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:"
1code",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,el.ok)("math"===n.type),this.exit(e),n.value=t;let r=n.data.hChildren[0];(0,el.ok)("element"===r.type),(0,el.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,el.ok)("math"===t.type),t.meta=e},mathFlowValue:e,mathText:function(e){let t=this.resume(),n=this.stack[this.stack.length-1];(0,el.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)}}()),a.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||"",s=n.createTracker(r),a="$".repeat(Math.max((0,nQ.D)(i,"$")+1,2)),o=n.enter("mathFlow"),l=s.move(a);if(e.meta){let t=n.enter("mathFlowMeta");l+=s.move(n.safe(e.meta,{after:"\n",before:l,encode:["$"],...s.current()})),t()}return l+=s.move("\n"),i&&(l+=s.move(i+"\n")),l+=s.move(a),o(),l},inlineMath:n}};function n(e,n,r){let i=e.value||"",s=1;for(!t&&s++;RegExp("(^|[^$])"+"\\$".repeat(s)+"([^$]|$)").test(i);)s++;let a="$".repeat(s);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=" "+i+" ");let o=-1;for(;++o<r.unsafe.length;){let e,t=r.unsafe[o];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 a+i+a}}(n))}var n8=/(\*\*)([^*]*?)$/,n5=/(__)([^_]*?)$/,n6=/(\*\*\*)([^*]*?)$/,n7=/(\*)([^*]*?)$/,re=/(_)([^_]*?)$/,rt=/(`)([^`]*?)$/,rn=/(~~)([^~]*?)$/,rr=/^[\s_~*`]*$/,ri=/^[\s]*[-*+][\s]+$/,rs=/[\p{L}\p{N}_]/u,ra=/^```[^`\n]*```?$/,ro=/^\*{4,}$/,rl=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||rs.test(e)},rc=e=>{let t=(e.match(/```/g)||[]).length;return t>0&&t%2==0&&e.includes(`
2`)},ru=(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},rd=(e,t,n,r)=>!!("\\"===n||"*"===n||"*"===r||n&&r&&rl(n)&&rl(r)||((e,t,n)=>{if(" "!==n&&"	"!==n)return!1;let r=0;for(let n=t-1;n>=0;n-=1)if(e[n]===`
3`){r=n+1;break}for(let n=r;n<t;n+=1)if(" "!==e[n]&&"	"!==e[n])return!1;return!0})(e,t,r)),rh=(e,t,n,r)=>!!("\\"===n||e.includes("$")&&ru(e,t)||"_"===n||"_"===r||n&&r&&rl(n)&&rl(r)),rp=(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},rf=(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},rm=(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 rg=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)},rv=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 rb={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 ry=(0,y.forwardRef)((e,t)=>{let{color:n="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:a="",children:o,iconNode:l,...c}=e;return(0,y.createElement)("svg",{ref:t,...rb,width:r,height:r,stroke:n,strokeWidth:s?24*Number(i)/Number(r):i,className:rv("lucide",a),...!o&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(c)&&{"aria-hidden":"true"},...c},[...l.map(e=>{let[t,n]=e;return(0,y.createElement)(t,n)}),...Array.isArray(o)?o:[o]])}),rE=(e,t)=>{let n=(0,y.forwardRef)((n,r)=>{let{className:i,...s}=n;return(0,y.createElement)(ry,{ref:r,iconNode:t,className:rv("lucide-".concat(rg(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),i),...s})});return n.displayName=rg(e),n},rT=rE("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}
3]]),r_=rE("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"}]]),rk=rE("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"}]]),rA=rE("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),rx=rE("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"}]]),rS=rE("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),rw=rE("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"}]]),rI=rE("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"}]]),rN=rE("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 rC=n(2821),rO=n(75889),rR=n(95155),rD=n(17542),rL=n(14733),rM=n(7604),rP=n(29833);function rF(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var rj=rF(),rB={exec:()=>null};function rU(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(r$.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var rH=(()=>{try{return!!RegExp("(?<=1)(?<!1)")}catch{return!1}})(),r$={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")},rG=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rz=/(?:[*+-]|\d{1,9}[.)])/,rY=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,rq=rU(rY).replace(/bull/g,rz).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(),rW=rU(rY).replace(/bull/g,rz).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(),rV=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rK=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rZ=rU(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rK).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rX=rU(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,rz).getRegex(),rQ="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",rJ=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,r0=rU("^ {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|/?>
3)[\\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",rJ).replace("tag",rQ).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),r1=rU(rV).replace("hr",rG).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",rQ).getRegex(),r2={blockquote:rU(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",r1).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:rZ,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:rG,html:r0,lheading:rq,list:rX,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:r1,table:rB,text:/^[^\n]+/},r3=rU("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",rG).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",rQ).getRegex(),r4={...r2,lheading:rW,table:r3,paragraph:rU(rV).replace("hr",rG).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",r3).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",rQ).getRegex()},r9={...r2,html:rU(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rJ).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:rB,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:rU(rV).replace("hr",rG).replace("heading",` *#{1,6} *[^
4]`).replace("lheading",rq).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},r8=/^( {2,}|\\)\n(?!\s*$)/,r5=/[\p{P}\p{S}]/u,r6=/[\s\p{P}\p{S}]/u,r7=/[^\s\p{P}\p{S}]/u,ie=rU(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,r6).getRegex(),it=/(?!~)[\p{P}\p{S}]/u,ir=rU(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",rH?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ii=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,is=rU(ii,"u").replace(/punct/g,r5).getRegex(),ia=rU(ii,"u").replace(/punct/g,it).getRegex(),io="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",il=rU(io,"gu").replace(/notPunctSpace/g,r7).replace(/punctSpace/g,r6).replace(/punct/g,r5).getRegex(),ic=rU(io,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,it).getRegex(),iu=rU("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,r7).replace(/punctSpace/g,r6).replace(/punct/g,r5).getRegex(),id=rU(/\\(punct)/,"gu").replace(/punct/g,r5).getRegex(),ih=rU(/^<(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(),ip=rU(rJ).replace("(?:--\x3e|$)","--\x3e").getRegex(),im=rU("^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",ip).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ig=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,iv=rU(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ig).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ib=rU(/^!?\[(label)\]\[(ref)\]/).replace("label",ig).replace("ref",rK).getRegex(),iy=rU(/^!?\[(ref)\](?:\[\])?/).replace("ref",rK).getRegex(),iE=rU("reflink|nolink(?!\\()","g").replace("reflink",ib).replace("nolink",iy).getRegex(),iT=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,i_={_backpedal:rB,anyPunctuation:id,autolink:ih,blockSkip:ir,br:r8,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:rB,emStrongLDelim:is,emStrongRDelimAst:il,emStrongRDelimUnd:iu,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:iv,nolink:iy,punctuation:ie,reflink:ib,reflinkSearch:iE,tag:im,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:rB},ik={...i_,link:rU(/^!?\[(label)\]\((.*?)\)/).replace("label",ig).getRegex(),reflink:rU(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ig).getRegex()},iA={...i_,emStrongRDelimAst:ic,emStrongLDelim:ia,url:rU(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",iT).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:rU(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",iT).getRegex()},ix={...iA,br:rU(r8).replace("{2,}","*").getRegex(),text:rU(iA.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},iS={normal:r2,gfm:r4,pedantic:r9},iw={normal:i_,gfm:iA,breaks:ix,pedantic:ik},iI={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},iN=e=>iI[e];function iC(e,t){if(t){if(r$.escapeTest.test(e))return e.replace(r$.escapeReplace,iN)}else if(r$.escapeTestNoEncode.test(e))return e.replace(r$.escapeReplaceNoEncode,iN);return e}function iO(e){try{e=encodeURI(e).replace(r$.percentDecode,"%")}catch{return null}return e}function iR(e,t){let n=e.replace(r$.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(r$.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(r$.slashPipe,"|");return n}function iD(e,t,n){let r=e.length;if(0===r)return"";let i=0;for(;i<r;){let s=e.charAt(r-i-1);if(s!==t||n)if(s!==t&&n)i++;else break;else i++}return e.slice(0,r-i)}function iL(e,t,n,r,i){let s=t.href,a=t.title||null,o=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:s,title:a,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,l}var iM=class{options;rules;lexer;constructor(e){this.options=e||rj}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:iD(e,`
5`)}}}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(`
6`).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(`
7`)}(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=iD(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:iD(t[0],`
8`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=iD(t[0],`
9`).split(`
10`),n="",r="",i=[];for(;e.length>0;){let t=!1,s=[],a;for(a=0;a<e.length;a++)if(this.rules.other.blockquoteStart.test(e[a]))s.push(e[a]),t=!0;else if(t)break;else s.push(e[a]);e=e.slice(a);let o=s.join(`
11`),l=o.replace(this.rules.other.blockquoteSetextReplace,`
12    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
13${o}`:o,r=r?`${r}
14${l}`:l;let c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=c,
140===e.length)break;let u=i.at(-1);if(u?.type==="code")break;if(u?.type==="blockquote"){let t=u.raw+`
15`+e.join(`
16`),s=this.blockquote(t);i[i.length-1]=s,n=n.substring(0,n.length-u.raw.length)+s.raw,r=r.substring(0,r.length-u.text.length)+s.text;break}if(u?.type==="list"){let t=u.raw+`
17`+e.join(`
18`),s=this.list(t);i[i.length-1]=s,n=n.substring(0,n.length-u.raw.length)+s.raw,r=r.substring(0,r.length-u.raw.length)+s.raw,e=t.substring(i.at(-1).raw.length).split(`
19`);continue}}return{type:"blockquote",raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(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 s=this.rules.other.listItemRegex(n),a=!1;for(;e;){let n=!1,r="",o="";if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split(`
20`,1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split(`
21`,1)[0],u=!l.trim(),d=0;if(this.options.pedantic?(d=2,o=l.trimStart()):u?d=t[1].length+1:(d=(d=t[2].search(this.rules.other.nonSpaceChar))>4?1:d,o=l.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(r+=c+`
22`,e=e.substring(c.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),s=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;e;){let h=e.split(`
23`,1)[0],p;if(c=h,p=this.options.pedantic?c=c.replace(this.rules.other.listReplaceNesting,"  "):c.replace(this.rules.other.tabCharGlobal,"    "),i.test(c)||s.test(c)||a.test(c)||t.test(c)||n.test(c))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!c.trim())o+=`
24`+p.slice(d);else{if(u||l.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||i.test(l)||s.test(l)||n.test(l))break;o+=`
25`+c}u||c.trim()||(u=!0),r+=h+`
26`,e=e.substring(h.length+1),l=p.slice(d)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(a=!0));let h=null,p;this.options.gfm&&(h=this.rules.other.listIsTask.exec(o))&&(p="[ ] "!==h[0],o=o.replace(this.rules.other.listReplaceTask,"")),i.items.push({type:"list_item",raw:r,task:!!h,checked:p,loose:!1,text:o,tokens:[]}),i.raw+=r}let o=i.items.at(-1);if(!o)return;o.raw=o.raw.trimEnd(),o.text=o.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=iR(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
27`):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?s.align.push("right"):this.rules.other.tableAlignCenter.test(e)?s.align.push("center"):this.rules.other.tableAlignLeft.test(e)?s.align.push("left"):s.align.push(null);for(let e=0;e<n.length;e++)s.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:s.align[e]});for(let e of i)s.rows.push(iR(e,s.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:s.align[t]})));return s}}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)===`
28`?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=iD(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)),iL(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 iL(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,s,a=n,o=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(s=[...i].length,r[3]||r[4]){a+=s;continue}if((r[5]||r[6])&&n%3&&!((n+s)%3)){o+=s;continue}if((a-=s)>0)continue;s=Math.min(s,s+a+o);let t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+s);if(Math.min(n,s)%2){let e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}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}}}},iP=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||rj,this.options.tokenizer=this.options.tokenizer||new iM,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:r$,block:iS.normal,inline:iw.normal};this.options.pedantic?(t.block=iS.pedantic,t.inline=iw.pedantic):this.options.gfm&&(t.block=iS.gfm,this.options.breaks?t.inline=iw.breaks:t.inline=iw.gfm),this.tokenizer.rules=t}static get rules(){return{block:iS,inline:iw}}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(r$.carriageReturn,`
29`),this.blockTokens(e,this.tokens);for(let e=0;
29e<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(r$.tabCharGlobal,"    ").replace(r$.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+=`
30`: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(`
31`)?"":`
32`)+r.raw,n.text+=`
33`+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(`
34`)?"":`
35`)+r.raw,n.text+=`
36`+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 s=t.at(-1);n&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
37`)?"":`
38`)+r.raw,s.text+=`
39`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.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(`
40`)?"":`
41`)+r.raw,n.text+=`
42`+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 s=!1,a="";for(;e;){let n;if(s||(a=""),s=!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,a))||(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)&&(a=n.raw.slice(-1)),s=!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}},iF=class{options;parser;constructor(e){this.options=e||rj}space(e){return""}code({text:e,lang:t,escaped:n}){let r=(t||"").match(r$.notSpaceStart)?.[0],i=e.replace(r$.endingNewline,"")+`
43`;return r?'<pre><code class="language-'+iC(r)+'">'+(n?i:iC(i,!0))+`</code></pre>
44`:"<pre><code>"+(n?i:iC(i,!0))+`</code></pre>
45`}blockquote({tokens:e}){return`<blockquote>
46${this.parser.parse(e)}</blockquote>
47`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
48`}hr(e){return`<hr>
49`}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+'"':"")+`>
50`+r+"</"+i+`>
51`}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+" "+iC(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>
52`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
53`}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>
54<thead>
55`+t+`</thead>
56`+r+`</table>
57`}tablerow({text:e}){return`<tr>
58${e}</tr>
59`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
60`}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>${iC(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=iO(e);
60if(null===i)return r;let s='<a href="'+(e=i)+'"';return t&&(s+=' title="'+iC(t)+'"'),s+=">"+r+"</a>"}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=iO(e);if(null===i)return iC(n);e=i;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${iC(t)}"`),s+=">"}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:iC(e.text)}},ij=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""}},iB=class e{options;renderer;textRenderer;constructor(e){this.options=e||rj,this.options.renderer=this.options.renderer||new iF,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ij}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 s=i,a=this.renderer.text(s);for(;r+1<e.length&&"text"===e[r+1].type;)s=e[++r],a+=`
61`+this.renderer.text(s);t?n+=this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):n+=a;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}},iU=class{options;block;constructor(e){this.options=e||rj}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?iP.lex:iP.lexInline}provideParser(){return this.block?iB.parse:iB.parseInline}},iH=new class{defaults=rF();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=iB;Renderer=iF;TextRenderer=ij;Lexer=iP;Tokenizer=iM;Hooks=iU;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:{}};
61return 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 iF(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 iM(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 iU;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];iU.passThroughHooks.has(n)?t[n]=e=>{if(this.defaults.async&&iU.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await r.call(t,e);return i.call(t,n)})();let s=r.call(t,e);return i.call(t,s)}: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 iP.lex(e,t??this.defaults)}parser(e,t){return iB.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},s=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===r.async)return s(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 s(Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return s(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?iP.lex:iP.lexInline)(n,i),s=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(s,i.walkTokens));let a=await (i.hooks?await i.hooks.provideParser():e?iB.parse:iB.parseInline)(s,i);return i.hooks?await i.hooks.postprocess(a):a})().catch(s);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?iP.lex:iP.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?iB.parse:iB.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return s(e)}}}onError(e,t){return n=>{if(n.message+=`
62Please report this to https://github.com/markedjs/marked.`,e){let e="<p>An error occurred:</p><pre>"+iC(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function i$(e,t){return iH.parse(e,t)}i$.options=i$.setOptions=function(e){return iH.setOptions(e),i$.defaults=iH.defaults,rj=i$.defaults,i$},i$.getDefaults=rF,i$.defaults=rj,i$.use=function(...e){return iH.use(...e),i$.defaults=iH.defaults,rj=i$.defaults,i$},i$.walkTokens=function(e,t){return iH.walkTokens(e,t)},i$.parseInline=iH.parseInline,i$.Parser=iB,i$.parser=iB.parse,i$.Renderer=iF,i$.TextRenderer=ij,i$.Lexer=iP,i$.lexer=iP.lex,i$.Tokenizer=iM,i$.Hooks=iU,i$.parse=i$,i$.options,i$.
62setOptions,i$.use,i$.walkTokens,i$.parseInline,iB.parse,iP.lex;var iG=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,rO.QP)((0,rC.$)(t))},iz=(e,t,n)=>{let r="string"==typeof t?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(i)},iY=(0,y.createContext)({code:""}),iq=()=>(0,y.useContext)(iY),iW=e=>{let{onCopy:t,onError:n,timeout:r=2e3,children:i,className:s,code:a,...o}=e,[l,c]=(0,y.useState)(!1),u=(0,y.useRef)(0),{code:d}=iq(),{isAnimating:h}=(0,y.useContext)(sZ),p=null!=a?a: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),c(!0),null==t||t(),u.current=window.setTimeout(()=>c(!1),r))}catch(e){null==n||n(e)}};return(0,y.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]),(0,rR.jsx)("button",{className:iG("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-copy-button",disabled:h,onClick:f,title:"Copy Code",type:"button",...o,children:null!=i?i:(0,rR.jsx)(l?rT:r_,{size:14})})},iV={"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",dax:"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"},iK=e=>{let{onDownload:t,onError:n,language:r,children:i,className:s,code:a,...o}=e,{code:l}=iq(),{isAnimating:c}=(0,y.useContext)(sZ),u=null!=a?a:l,d="file.".concat(r&&r in iV?iV[r]:"txt");return(0,rR.jsx)("button",{className:iG("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-download-button",disabled:c,onClick:()=>{try{iz(d,u,"text/plain"),null==t||t()}catch(e){null==n||n(e)}},title:"Download file",type:"button",...o,children:null!=i?i:(0,rR.jsx)(rk,{size:14})})},iZ=()=>(0,rR.jsxs)("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[(0,rR.jsx)("div",{className:"h-[46px] w-full bg-muted/80"}),(0,rR.jsx)("div",{className:"flex w-full items-center justify-center p-4",children:(0,rR.jsx)(rA,{className:"size-4 animate-spin"})})]}),iX=/\.[^/.]+$/,iQ=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},iJ=e=>{let{chart:t,children:n,className:r,onDownload:i,config:s,onError:a}=e,[o,l]=(0,y.useState)(!1),c=(0,y.useRef)(null),{isAnimating:u}=(0,y.useContext)(sZ),d=async e=>{try{if("mmd"===e){iz("diagram.mmd",t,"text/plain"),l(!1),null==i||i(e);return}let r=await iQ(s),o=t.split("").reduce((e,t)=>
62(e<<5)-e+t.charCodeAt(0)|0,0),c="mermaid-".concat(Math.abs(o),"-").concat(Date.now(),"-").concat(Math.random().toString(36).substring(2,9)),{svg:u}=await r.render(c,t);if(!u){null==a||a(Error("SVG not found. Please wait for the diagram to render."));return}if("svg"===e){iz("diagram.svg",u,"image/svg+xml"),l(!1),null==i||i(e);return}if("png"===e){var n;let t=await (n=u,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,s=5*i.height;n.width=r,n.height=s;let a=n.getContext("2d");if(!a)return void t(Error("Failed to create 2D canvas context for PNG export"));a.drawImage(i,0,0,r,s),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}));iz("diagram.png",t,"image/png"),null==i||i(e),l(!1);return}}catch(e){null==a||a(e)}};return(0,y.useEffect)(()=>{let e=e=>{c.current&&!c.current.contains(e.target)&&l(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,rR.jsxs)("div",{className:"relative",ref:c,children:[(0,rR.jsx)("button",{className:iG("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:u,onClick:()=>l(!o),title:"Download diagram",type:"button",children:null!=n?n:(0,rR.jsx)(rk,{size:14})}),o&&(0,rR.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,rR.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,rR.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,rR.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"})]})]})},i0=0,i1=e=>{let{chart:t,config:n,onFullscreen:r,onExit:i,className:s,...a}=e,[o,l]=(0,y.useState)(!1),{isAnimating:c,controls:u}=(0,y.useContext)(sZ),d=(()=>{if("boolean"==typeof u)return u;let e=u.mermaid;return!1!==e&&(!0===e||void 0===e||!1!==e.panZoom)})(),h=()=>{l(!o)};return(0,y.useEffect)(()=>{if(o){1===(i0+=1)&&(document.body.style.overflow="hidden");let e=e=>{"Escape"===e.key&&l(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e),0===(i0=Math.max(0,i0-1))&&(document.body.style.overflow="")}}},[o]),(0,y.useEffect)(()=>{o?null==r||r():i&&i()},[o,r,i]),(0,rR.jsxs)(rR.Fragment,{children:[(0,rR.jsx)("button",{className:iG("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),disabled:c,onClick:h,title:"View fullscreen",type:"button",...a,children:(0,rR.jsx)(rx,{size:14})}),o&&(0,rR.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,rR.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,rR.jsx)(rS,{size:20})}),(0,rR.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,rR.jsx)(s1,{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})})]})]})},i2=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=[];
62for(let r of t.querySelectorAll("td"))e.push((null==(n=r.textContent)?void 0:n.trim())||"");i.push(e)}return{headers:r,rows:i}},i3=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),s=0;for(let e of(t.length>0&&(i[s]=t.map(r).join(","),s+=1),n))i[s]=e.map(r).join(","),s+=1;return i.join("\n")},i4=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("")},i9=e=>{let{children:t,className:n,onCopy:r,onError:i,timeout:s=2e3}=e,[a,o]=(0,y.useState)(!1),[l,c]=(0,y.useState)(!1),u=(0,y.useRef)(null),d=(0,y.useRef)(0),{isAnimating:h}=(0,y.useContext)(sZ),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=u.current)?void 0:n.closest('[data-streamdown="table-wrapper"]'),a=null==t?void 0:t.querySelector("table");if(!a){null==i||i(Error("Table not found"));return}let l=i2(a),h="csv"===e?i3(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),s=0;for(let e of(t.length>0&&(i[s]=t.map(r).join("	"),s+=1),n))i[s]=e.map(r).join("	"),s+=1;return i.join("\n")})(l),p=new ClipboardItem({"text/plain":new Blob([h],{type:"text/plain"}),"text/html":new Blob([a.outerHTML],{type:"text/html"})});await navigator.clipboard.write([p]),c(!0),o(!1),null==r||r(e),d.current=window.setTimeout(()=>c(!1),s)}catch(e){null==i||i(e)}};return(0,y.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&o(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e),window.clearTimeout(d.current)}},[]),(0,rR.jsxs)("div",{className:"relative",ref:u,children:[(0,rR.jsx)("button",{className:iG("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:h,onClick:()=>o(!a),title:"Copy table",type:"button",children:null!=t?t:(0,rR.jsx)(l?rT:r_,{size:14})}),a&&(0,rR.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,rR.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,rR.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"})]})]})},i8=e=>{let{children:t,className:n,onDownload:r,onError:i}=e,[s,a]=(0,y.useState)(!1),o=(0,y.useRef)(null),{isAnimating:l}=(0,y.useContext)(sZ),c=e=>{var t;try{let n=null==(t=o.current)?void 0:t.closest('[data-streamdown="table-wrapper"]'),s=null==n?void 0:n.querySelector("table");if(!s){null==i||i(Error("Table not found"));return}let l=i2(s),c="csv"===e?i3(l):(e=>{let{headers:t,rows:n}=e;if(0===t.length)return"";let r=Array(n.length+2),i=0,s=t.map(e=>i4(e));r[i]="| ".concat(s.join(" | ")," |"),i+=1;let a=Array(t.length);for(let e=0;e<t.length;e+=1)a[e]="---";for(let e of(r[i]="| ".concat(a.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?i4(e[r]):"";r[i]="| ".concat(n.join(" | ")," |"),i+=1}else{let t=e.map(e=>i4(e));r[i]="| ".concat(t.join(" | ")," |"),i+=1}return r.join("\n")})(l);iz("table.".concat("csv"===e?"csv":"md"),c,"csv"===e?"text/csv":"text/markdown"),a(!1),null==r||r(e)}catch(e){null==i||i(e)}};return(0,y.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&a(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]),(0,rR.jsxs)("div",{className:"relative",ref:o,children:[(0,rR.jsx)("button",{className:iG("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:l,onClick:()=>a(!s),title:"Download table",type:"button",children:null!=t?t:(0,rR.jsx)(rk,{size:14})}),s&&(0,rR.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,rR.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),(0,rR.jsx)("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>c("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]})]})},i5=e=>{let{children:t,className:n,showControls:r,...i}=e;return(0,rR.jsxs)("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[r&&(0,rR.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,rR.jsx)(i9,{}),(0,rR.jsx)(i8,{})]}),(0,rR.jsx)("div",{className:"overflow-x-auto",children:(0,rR.jsx)("table",{className:iG("w-full border-collapse border border-border",n),"data-streamdown":"table",...i,children:t})})]})},i6=(0,y.lazy)(()=>n.e(4655).then(n.bind(n,64655)).then(e=>({default:e.CodeBlock}))),i7=(0,y.lazy)(()=>n.e(2637).then(n.bind(n,92637)).then(e=>({default:e.Mermaid}))),se=/language-([^\s]+)/;function st(e,t){if(!(null!=e&&e.position||null!=t&&t.position))return!0;
62if(!(null!=e&&e.position&&null!=t&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,s=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==s?void 0:s.line)&&(null==i?void 0:i.column)===(null==s?void 0:s.column)}function sn(e,t){return e.className===t.className&&st(e.node,t.node)}var sr=(e,t)=>"boolean"==typeof e?e:!1!==e[t],si=(e,t)=>{if("boolean"==typeof e)return e;let n=e.mermaid;return!1!==n&&(!0===n||void 0===n||!1!==n[t])},ss=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("ol",{className:iG("list-inside list-decimal whitespace-normal",n),"data-streamdown":"ordered-list",...i,children:t})},(e,t)=>sn(e,t));ss.displayName="MarkdownOl";var sa=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("li",{className:iG("py-1 [&>p]:inline",n),"data-streamdown":"list-item",...i,children:t})},(e,t)=>e.className===t.className&&st(e.node,t.node));sa.displayName="MarkdownLi";var so=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("ul",{className:iG("list-inside list-disc whitespace-normal",n),"data-streamdown":"unordered-list",...i,children:t})},(e,t)=>sn(e,t));so.displayName="MarkdownUl";var sl=(0,y.memo)(e=>{let{className:t,node:n,...r}=e;return(0,rR.jsx)("hr",{className:iG("my-6 border-border",t),"data-streamdown":"horizontal-rule",...r})},(e,t)=>sn(e,t));sl.displayName="MarkdownHr";var sc=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("span",{className:iG("font-semibold",n),"data-streamdown":"strong",...i,children:t})},(e,t)=>sn(e,t));sc.displayName="MarkdownStrong";var su=(0,y.memo)(e=>{let{children:t,className:n,href:r,node:i,...s}=e;return(0,rR.jsx)("a",{className:iG("wrap-anywhere font-medium text-primary underline",n),"data-incomplete":"streamdown:incomplete-link"===r,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...s,children:t})},(e,t)=>sn(e,t)&&e.href===t.href);su.displayName="MarkdownA";var sd=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("h1",{className:iG("mt-6 mb-2 font-semibold text-3xl",n),"data-streamdown":"heading-1",...i,children:t})},(e,t)=>sn(e,t));sd.displayName="MarkdownH1";var sh=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("h2",{className:iG("mt-6 mb-2 font-semibold text-2xl",n),"data-streamdown":"heading-2",...i,children:t})},(e,t)=>sn(e,t));sh.displayName="MarkdownH2";var sp=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("h3",{className:iG("mt-6 mb-2 font-semibold text-xl",n),"data-streamdown":"heading-3",...i,children:t})},(e,t)=>sn(e,t));sp.displayName="MarkdownH3";var sf=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("h4",{className:iG("mt-6 mb-2 font-semibold text-lg",n),"data-streamdown":"heading-4",...i,children:t})},(e,t)=>sn(e,t));sf.displayName="MarkdownH4";var sm=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("h5",{className:iG("mt-6 mb-2 font-semibold text-base",n),"data-streamdown":"heading-5",...i,children:t})},(e,t)=>sn(e,t));sm.displayName="MarkdownH5";var sg=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("h6",{className:iG("mt-6 mb-2 font-semibold text-sm",n),"data-streamdown":"heading-6",...i,children:t})},(e,t)=>sn(e,t));sg.displayName="MarkdownH6";var sv=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e,{controls:s}=(0,y.useContext)(sZ),a=sr(s,"table");return(0,rR.jsx)(i5,{className:n,"data-streamdown":"table-wrapper",showControls:a,...i,children:t})},(e,t)=>sn(e,t));sv.displayName="MarkdownTable";var sb=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("thead",{className:iG("bg-muted/80",n),"data-streamdown":"table-header",...i,children:t})},(e,t)=>sn(e,t));sb.displayName="MarkdownThead";var sy=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("tbody",{className:iG("divide-y divide-border bg-muted/40",n),"data-streamdown":"table-body",...i,children:t})},(e,t)=>sn(e,t));sy.displayName="MarkdownTbody";var sE=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("tr",{className:iG("border-border border-b",n),"data-streamdown":"table-row",...i,children:t})},(e,t)=>sn(e,t));sE.displayName="MarkdownTr";var sT=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("th",{className:iG("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",n),"data-streamdown":"table-header-cell",...i,children:t})},(e,t)=>sn(e,t));sT.displayName="MarkdownTh";var s_=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("td",{className:iG("px-4 py-2 text-sm",n),"data-streamdown":"table-cell",...i,children:t})},(e,t)=>sn(e,t));
62s_.displayName="MarkdownTd";var sk=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("blockquote",{className:iG("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",n),"data-streamdown":"blockquote",...i,children:t})},(e,t)=>sn(e,t));sk.displayName="MarkdownBlockquote";var sA=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("sup",{className:iG("text-sm",n),"data-streamdown":"superscript",...i,children:t})},(e,t)=>sn(e,t));sA.displayName="MarkdownSup";var sx=(0,y.memo)(e=>{let{children:t,className:n,node:r,...i}=e;return(0,rR.jsx)("sub",{className:iG("text-sm",n),"data-streamdown":"subscript",...i,children:t})},(e,t)=>sn(e,t));sx.displayName="MarkdownSub";var sS=(0,y.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,y.isValidElement)(e))return e;if(e.type===ss){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!(e=>{var t,n;if(!(0,y.isValidElement)(e))return!1;let r=Array.isArray(e.props.children)?e.props.children:[e.props.children],i=!1,s=!1;for(let e of r)if(e){if("string"==typeof e)""!==e.trim()&&(i=!0);else if((0,y.isValidElement)(e)){if((null==(t=e.props)?void 0:t["data-footnote-backref"])!==void 0)s=!0;else for(let t of Array.isArray(e.props.children)?e.props.children:[e.props.children])if("string"==typeof t&&""!==t.trim()||(0,y.isValidElement)(t)&&(null==(n=t.props)?void 0:n["data-footnote-backref"])===void 0){i=!0;break}}}return s&&!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,rR.jsx)("section",{className:n,...i,children:e}):null}return(0,rR.jsx)("section",{className:n,...i,children:t})},(e,t)=>sn(e,t));sS.displayName="MarkdownSection";var sw=(0,y.memo)(e=>{var t,n,r;let{node:i,className:s,children:a,...o}=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:c,controls:u}=(0,y.useContext)(sZ);if(l)return(0,rR.jsx)("code",{className:iG("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",s),"data-streamdown":"inline-code",...o,children:a});let d=null==s?void 0:s.match(se),h=null!=(r=null==d?void 0:d.at(1))?r:"",p="";if((0,y.isValidElement)(a)&&a.props&&"object"==typeof a.props&&"children"in a.props&&"string"==typeof a.props.children?p=a.props.children:"string"==typeof a&&(p=a),"mermaid"===h){let e=sr(u,"mermaid"),t=si(u,"download"),n=si(u,"copy"),r=si(u,"fullscreen"),i=si(u,"panZoom");return(0,rR.jsx)(y.Suspense,{fallback:(0,rR.jsx)(iZ,{}),children:(0,rR.jsxs)("div",{className:iG("group relative my-4 h-auto rounded-xl border p-4",s),"data-streamdown":"mermaid-block",children:[e&&(t||n||r)&&(0,rR.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[t&&(0,rR.jsx)(iJ,{chart:p,config:null==c?void 0:c.config}),n&&(0,rR.jsx)(iW,{code:p}),r&&(0,rR.jsx)(i1,{chart:p,config:null==c?void 0:c.config})]}),(0,rR.jsx)(i7,{chart:p,config:null==c?void 0:c.config,showControls:i})]})})}let f=sr(u,"code");return(0,rR.jsx)(y.Suspense,{fallback:(0,rR.jsx)(iZ,{}),children:(0,rR.jsx)(i6,{className:iG("overflow-x-auto border-border border-t",s),code:p,language:h,children:f&&(0,rR.jsxs)(rR.Fragment,{children:[(0,rR.jsx)(iK,{code:p,language:h}),(0,rR.jsx)(iW,{})]})})})},(e,t)=>e.className===t.className&&st(e.node,t.node));sw.displayName="MarkdownCode";var sI=(0,y.memo)(e=>{let{node:t,className:n,src:r,alt:i,...s}=e,a=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(),s=t.includes(".")&&void 0!==n&&n.length<=4,a="";if(s)a=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"),a="".concat((i||t||"image").replace(iX,""),".").concat(r)}iz(a,e,e.type)}catch(e){console.error("Failed to download image:",e)}};return r?(0,rR.jsxs)("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[(0,rR.jsx)("img",{alt:i,className:iG("max-w-full rounded-lg",n),"data-streamdown":"image",src:r,...s}),(0,rR.jsx)("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),(0,rR.jsx)("button",{className:iG("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:a,title:"Download image",type:"button",children:(0,rR.jsx)(rk,{size:14})})]}):null},(e,t)=>e.className===t.className&&st(e.node,t.node));sI.displayName="MarkdownImg";var sN=(0,y.memo)(e=>{var t;
62let{children:n,className:r,node:i,...s}=e,a=(Array.isArray(n)?n:[n]).filter(e=>null!=e&&""!==e);return 1===a.length&&(0,y.isValidElement)(a[0])&&(null==(t=a[0].props.node)?void 0:t.tagName)==="img"?(0,rR.jsx)(rR.Fragment,{children:n}):(0,rR.jsx)("p",{className:r,...s,children:n})},(e,t)=>sn(e,t));sN.displayName="MarkdownParagraph";var sC={ol:ss,li:sa,ul:so,hr:sl,strong:sc,a:su,h1:sd,h2:sh,h3:sp,h4:sf,h5:sm,h6:sg,table:sv,thead:sb,tbody:sy,tr:sE,th:sT,td:s_,blockquote:sk,code:sw,img:sI,pre:e=>{let{children:t}=e;return t},sup:sA,sub:sx,p:sN,section:sS},sO=[],sR={allowDangerousHtml:!0},sD=new WeakMap,sL=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 s=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=sD.get(e);n||(n=e.name,sD.set(e,n)),t+=n}else t+=String(e);t+=":",t+=JSON.stringify(n)}else if("function"==typeof r){let e=sD.get(r);e||(e=r.name,sD.set(r,e)),t+=e}else t+=String(r)}return t},a=s(n),o=s(r),l=i?JSON.stringify(i):"",c="".concat(o,"::").concat(a,"::").concat(l);return this.keyCache.set(e,c),c}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}},sM=e=>{let t=sP(e),n=e.children||"";return sj(t.runSync(t.parse(n),n),e)},sP=e=>{let t=sL.get(e);if(t)return t;let n=sF(e);return sL.set(e,n),n},sF=e=>{let t=e.rehypePlugins||sO,n=e.remarkPlugins||sO,r=e.remarkRehypeOptions?{...sR,...e.remarkRehypeOptions}:sR;return(0,rP.l)().use(rL.A).use(n).use(rM.A,r).use(t)},sj=(e,t)=>(0,rD.H)(e,{Fragment:rR.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:rR.jsx,jsxs:rR.jsxs,passKeys:!0,passNode:!0}),sB=/\[\^[^\]\s]{1,200}\](?!:)/,sU=/\[\^[^\]\s]{1,200}\]:/,sH=/<\/(\w+)>/,s$=/<(\w+)[\s>]/,sG=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]},sz=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]},sY=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},sq=e=>{let t=sB.test(e),n=sU.test(e);if(t||n)return[e];let r=iP.lex(e,{gfm:!0}),i=[],s=[];for(let e of r){let t=e.raw,n=i.length;if(s.length>0){if(i[n-1]+=t,"html"===e.type){let e=t.match(sH);if(e){let t=e[1];s.at(-1)===t&&s.pop()}}continue}if("html"===e.type&&e.block){let e=t.match(s$);if(e){let n=e[1];t.includes("</".concat(n,">"))||s.push(n)}}if("$$"===t.trim()&&n>0){let e=i[n-1],r=sG(e),s=sY(e);if(r&&s%2==1){i[n-1]=e+t;continue}}if(n>0&&sz(t)){let e=i[n-1],r=sG(e),s=sY(e),a=sY(t);if(r&&s%2==1&&!sG(t)&&1===a){i[n-1]=e+t;continue}}i.push(t)}return i},sW={gfm:[nX.A,{}],math:[n9,{singleDollarTextMath:!1}],cjkFriendly:[function(){let e=this.data();(e.micromarkExtensions||(e.micromarkExtensions=[])).push({text:{[nE.asterisk]:nK,[nE.underscore]:nK},insideSpan:{null:[nK]}})},{}],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:s,previous:a}=this,o=n$(a)?nG(a,i(),s):a,l=nM(o),c=new nz(o,i(),s),u=nP(l,c.value.bind(c),o),d=this.events,h=0;return function(a){return((0,el.ok)(a===nE.tilde,"expected `~`"),o===nE.tilde&&d[d.length-1][1].type!==nV.characterEscape)?r(a):(e.enter("strikethroughSequenceTemporary"),function a(l){let c=nM(o);if(l===nE.tilde)return h>1?r(l):(e.consume(l),h++,a);if(h<2&&!t)return r(l);let d=e.exit("strikethroughSequenceTemporary"),p=nM(nH(l)?nY(l,i(),s):l),f=nj(u)||nF(u),m=nj(p)||nF(p),g=nB(u)||c===b.ivs;return d._open=!m||p===nT.attentionSideAfter&&(f||g),d._close=!f||c===nT.attentionSideAfter&&(m||nB(p)),n(l)}(a))}},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)},s={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",s,t]],o=t.parser.constructs.insideSpan.null;o&&(0,nq.m)(a,a.length,0,(0,nW.W)(o,e.slice(r+1,n),t)),(0,nq.m)(a,a.length,0,[["exit",s,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),(0,nq.m)(e,r-1,n-r+3,a),n=r+a.length-2;break}}for(n=-1;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type=nV.data);return e}};return null==t&&(t=!0),{text:{[nE.tilde]:n},insideSpan:{null:[n]},attentionMarkers:{null:[nE.tilde]}}}(e))},{}]},sV=Object.values({raw:function(e){return function(t,n){return t7(t,{...e,file:n})}},katex:[ea,{errorColor:"var(--color-muted-foreground)"}],sanitize:[function(e){return function(t){var n=t,r=e;let i={type:"root",children:[]},s=nf({schema:r?{...nh,...r}:nh,stack:[]},n);return s&&(Array.isArray(s)?1===s.length?i=s[0]:i.children=s:i=s),i}},{}],harden:[function({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:s="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="text-gray-500",linkBlockPolicy:o=_.indicator,imageBlockPolicy:l=_.indicator}){let c=t.length&&!t.every(e=>"*"===e),u=n.length&&!n.every(e=>"*"===e);if(!e&&(c||u))throw Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{let u=((e,t,n,r,i,s,a,o,l)=>{let c=(u,d,h)=>{if("element"!==u.type||u[w])return T.IN;if("a"===u.tagName){let n=S(u.properties.href,t,e,!1,!1,i);if(null!==n)return u.properties.href=n,u.properties.target="_blank",u.properties.rel="noopener noreferrer",T.IN;if(u[w]=!0,(0,E.YR)(u,c),h&&"number"==typeof d){let e=function(e,t,n){return t===_.remove?{type:"remove"}:t===_.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]"}]}}}(u,o,a);if("remove"===e.type)return h.children.splice(d,1),[T._Z,d];h.children[d]=e.element}return T._Z}if("img"===u.tagName){let t=S(u.properties.src,n,e,r,!0,i);if(null===t){if(u[w]=!0,(0,E.YR)(u,c),h&&"number"==typeof d){let e=function(e,t,n){if(t===_.remove)return{type:"remove"};if(t===_.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")+"]"}]}}}(u,l,s);if("remove"===e.type)return h.children.splice(d,1),[T._Z,d];h.children[d]=e.element}return T._Z}u.properties.src=t}return T.IN};return c})(e,t,n,r,i,s,a,o,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)})(c),(0,E.YR)(c,u)}},{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]}),sK=Object.values(sW),sZ=(0,y.createContext)({shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0}),sX=(0,y.memo)(e=>{let{content:t,shouldParseIncompleteMarkdown:n,...r}=e,i=(0,y.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&&!rp(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||rp(e,n))return null;let r=n>0&&"!"===e[n-1],i=e.substring(0,r?n-1:n);if(r)return i;let s=e.substring(n+1,t);return`${i}[${s}](streamdown:incomplete-link)`})(e,t);if(null!==n)return n}for(let t=e.length-1;t>=0;t-=1)if("["===e[t]&&!rp(e,t)){let n=rm(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(`
63`,t)||e.endsWith(`
64`)?`${e}$$`:`${e}
65$$`})(t=(e=>{let t=e.match(rn);if(t){let n=t[2];if(!n||rr.test(n))return e;if((e.match(/~~/g)||[]).length%2==1)return`${e}~~`}return e})(t=(e=>{let t=(e=>!e.match(ra)||e.includes(`
66`)?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(`
67`)||(e.endsWith("```\n")||e.endsWith("```"))&&t%2==0)})(e))return e;let n=e.match(rt);if(n&&(e.match(/```/g)||[]).length%2!=1){let t=n[2];if(!t||rr.test(t))return e;if((e=>{let t=0;for(let n=0;n<e.length;n+=1)"`"!==e[n]||rf(e,n)||(t+=1);return t})(e)%2==1)return`${e}\``}return e})(t=(e=>{if(rc(e)||!e.match(re))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]&&!ru(e,t)){let n=t>0?e[t-1]:"",r=t<e.length-1?e[t+1]:"";if(n&&r&&rl(n)&&rl(r))continue;return t}return -1})(e);if(-1===t)return e;let n=e.substring(t+1);return!n||rr.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]:"",s=r<n-1?e[r+1]:"";rh(e,r,i,s)||(t+=1)}return t})(e)%2==1?(e=>{let t=e.length;for(;t>0&&e[t-1]===`
68`;)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(rc(e)||!e.match(n7))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&&rl(n)&&rl(r))continue;return t}return -1})(e);if(-1===t)return e;let n=e.substring(t+1);return!n||rr.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]:"",s=r<n-1?e[r+1]:"";rd(e,r,i,s)||(t+=1)}return t})(e)%2==1?`${e}*`:e})(t=(e=>{let t=e.match(n5);if(t){let n=t[2];if(!n||rr.test(n))return e;let r=e.lastIndexOf(t[1]),i=e.substring(0,r).lastIndexOf(`
69`),s=e.substring(-1===i?0:i+1,r);if(ri.test(s)&&n.includes(`
70`))return e;if((e.match(/__/g)||[]).length%2==1)return`${e}__`}return e})(t=(e=>{if(rc(e))return e;let t=e.match(n8);if(t){let n=t[2];if(!n||rr.test(n))return e;let r=e.lastIndexOf(t[1]),i=e.substring(0,r).lastIndexOf(`
71`),s=e.substring(-1===i?0:i+1,r);if(ri.test(s)&&n.includes(`
72`))return e;if((e.match(/\*\*/g)||[]).length%2==1)return`${e}**`}return e})(t=(e=>{if(rc(e)||ro.test(e))return e;let t=e.match(n6);if(t){let n=t[2];if(!n||rr.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,rR.jsx)(sM,{...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});sX.displayName="Block";var sQ=["github-light","github-dark"],sJ=(0,y.memo)(e=>{let{children:t,mode:r="streaming",parseIncompleteMarkdown:i=!0,components:s,rehypePlugins:a=sV,remarkPlugins:o=sK,className:l,shikiTheme:c=sQ,mermaid:u,controls:d=!0,isAnimating:h=!1,BlockComponent:p=sX,parseMarkdownIntoBlocksFn:f=sq,...m}=e,g=(0,y.useId)(),[v,b]=(0,y.useTransition)(),[E,T]=(0,y.useState)([]),_=(0,y.useMemo)(()=>f("string"==typeof t?t:""),[t,f]);(0,y.useEffect)(()=>{"streaming"===r?b(()=>{T(_)}):T(_)},[_,r]);let k="streaming"===r?E:_,A=(0,y.useMemo)(()=>k.map((e,t)=>"".concat(g,"-").concat(t)),[k.length,g]),x=(0,y.useMemo)(()=>
72({shikiTheme:c,controls:d,isAnimating:h,mode:r,mermaid:u}),[c,d,h,r,u]),S=(0,y.useMemo)(()=>({...sC,...s}),[s]);return(0,y.useEffect)(()=>{if(!(Array.isArray(a)&&a.some(e=>Array.isArray(e)?e[0]===ea:e===ea)))return;let e=!1;if(Array.isArray(o)){let t=o.find(e=>Array.isArray(e)?e[0]===n9:e===n9);t&&Array.isArray(t)&&t[1]&&(e=!0===t[1].singleDollarTextMath)}let r="string"==typeof t?t:"",i=r.includes("$$"),s=e&&(/[^$]\$[^$]/.test(r)||/^\$[^$]/.test(r)||/[^$]\$$/.test(r));(i||s)&&Promise.all([n.e(2682),n.e(6105)]).then(n.t.bind(n,76105,19))},[a,o,t]),"static"===r?(0,rR.jsx)(sZ.Provider,{value:x,children:(0,rR.jsx)("div",{className:iG("space-y-4 whitespace-normal",l),children:(0,rR.jsx)(sM,{components:S,rehypePlugins:a,remarkPlugins:o,...m,children:t})})}):(0,rR.jsx)(sZ.Provider,{value:x,children:(0,rR.jsx)("div",{className:iG("space-y-4 whitespace-normal",l),children:k.map((e,t)=>(0,rR.jsx)(p,{components:S,content:e,index:t,rehypePlugins:a,remarkPlugins:o,shouldParseIncompleteMarkdown:i,...m},A[t]))})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.mode===t.mode);sJ.displayName="Streamdown";var s0=e=>{let{children:t,className:n,minZoom:r=.5,maxZoom:i=3,zoomStep:s=.1,showControls:a=!0,initialZoom:o=1,fullscreen:l=!1}=e,c=(0,y.useRef)(null),u=(0,y.useRef)(null),[d,h]=(0,y.useState)(o),[p,f]=(0,y.useState)({x:0,y:0}),[m,g]=(0,y.useState)(!1),[v,b]=(0,y.useState)({x:0,y:0}),[E,T]=(0,y.useState)({x:0,y:0}),_=(0,y.useCallback)(e=>{h(t=>Math.max(r,Math.min(i,t+e)))},[r,i]),k=(0,y.useCallback)(()=>{_(s)},[_,s]),A=(0,y.useCallback)(()=>{_(-s)},[_,s]),x=(0,y.useCallback)(()=>{h(o),f({x:0,y:0})},[o]),S=(0,y.useCallback)(e=>{e.preventDefault(),_(e.deltaY>0?-s:s)},[_,s]),w=(0,y.useCallback)(e=>{if(0!==e.button||!1===e.isPrimary)return;g(!0),b({x:e.clientX,y:e.clientY}),T(p);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[p]),I=(0,y.useCallback)(e=>{if(!m)return;e.preventDefault();let t=e.clientX-v.x,n=e.clientY-v.y;f({x:E.x+t,y:E.y+n})},[m,v,E]),N=(0,y.useCallback)(e=>{g(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,y.useEffect)(()=>{let e=c.current;if(e)return e.addEventListener("wheel",S,{passive:!1}),()=>{e.removeEventListener("wheel",S)}},[S]),(0,y.useEffect)(()=>{let e=u.current;if(e&&m)return document.body.style.userSelect="none",e.addEventListener("pointermove",I,{passive:!1}),e.addEventListener("pointerup",N),e.addEventListener("pointercancel",N),()=>{document.body.style.userSelect="",e.removeEventListener("pointermove",I),e.removeEventListener("pointerup",N),e.removeEventListener("pointercancel",N)}},[m,I,N]),(0,rR.jsxs)("div",{className:iG("relative",l?"h-full w-full":"w-full",n),ref:c,style:{cursor:m?"grabbing":"grab"},children:[a&&(0,rR.jsxs)("div",{className:iG("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,rR.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:k,title:"Zoom in",type:"button",children:(0,rR.jsx)(rw,{size:16})}),(0,rR.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,rR.jsx)(rI,{size:16})}),(0,rR.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,rR.jsx)(rN,{size:16})})]}),(0,rR.jsx)("div",{className:iG("origin-center transition-transform duration-150 ease-out",l&&"flex w-full items-center justify-center"),onPointerDown:w,ref:u,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})]})},s1=e=>{let{chart:t,className:n,config:r,fullscreen:i=!1,showControls:s=!0}=e,[a,o]=(0,y.useState)(null),[l,c]=(0,y.useState)(!0),[u,d]=(0,y.useState)(""),[h,p]=(0,y.useState)(""),[f,m]=(0,y.useState)(0),{mermaid:g}=(0,y.useContext)(sZ),v=null==g?void 0:g.errorComponent;return((0,y.useEffect)(()=>{(async()=>{try{o(null),c(!0);let e=await iQ(r),n=t.split("").reduce((e,t)=>
72(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:s}=await e.render(i,t);d(s),p(s)}catch(e){h||u||o(e instanceof Error?e.message:"Failed to render Mermaid chart")}finally{c(!1)}})()},[t,r,f]),!l||u||h)?!a||u||h?(0,rR.jsx)(s0,{className:iG(i?"h-full w-full overflow-hidden":"my-4 overflow-hidden",n),fullscreen:i,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:(0,rR.jsx)("div",{"aria-label":"Mermaid chart",className:iG("flex justify-center",i&&"h-full w-full items-center"),dangerouslySetInnerHTML:{__html:u||h},role:"img"})}):v?(0,rR.jsx)(v,{chart:t,error:a,retry:()=>m(e=>e+1)}):(0,rR.jsxs)("div",{className:iG("rounded-lg border border-red-200 bg-red-50 p-4",n),children:[(0,rR.jsxs)("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),(0,rR.jsxs)("details",{className:"mt-2",children:[(0,rR.jsx)("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),(0,rR.jsx)("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:t})]})]}):(0,rR.jsx)("div",{className:iG("my-4 flex justify-center p-4",n),children:(0,rR.jsxs)("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[(0,rR.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),(0,rR.jsx)("span",{className:"text-sm",children:"Loading diagram..."})]})})}},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:()=>s});var r=n(33421),i=new(n(44289)).q(r.R),s=i},13862:(e,t,n)=>{n.d(t,{$:()=>f});var r,i=n(71450),s=n(33421),a=1,o={};function l(e){return e in o&&(delete o[e],!0)}var c={setImmediate:function(e){var t=a++;return o[t]=!0,r||(r=Promise.resolve()),r.then(function(){return l(t)&&e()}),t},clearImmediate:function(e){l(e)}},u=c.setImmediate,d=c.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)||u).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,s=t.actions;null!=n&&(null==(i=s[s.length-1])?void 0:i.id)!==n&&(h.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},t}(s.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=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var a=i.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,(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,s=n(71450),a=n(12115),o="right-scroll-bar-position",l="width-before-scroll-bar";function c(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var u="undefined"!=typeof window?a.useLayoutEffect:a.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;
72n=[],i.forEach(e),t=n}var s=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(s)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}});return i.options=(0,s.Cl)({async:!0,ssr:!1},e),i}(),f=function(){},m=a.forwardRef(function(e,t){var n,r,i,o,l=a.useRef(null),h=a.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,_=e.shards,k=e.sideCar,A=e.noRelative,x=e.noIsolation,S=e.inert,w=e.allowPinchZoom,I=e.as,N=e.gapMode,C=(0,s.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 c(t,e)})},(i=(0,a.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,o=i.facade,u(function(){var e=d.get(o);if(e){var t=new Set(e),r=new Set(n),i=o.current;t.forEach(function(e){r.has(e)||c(e,null)}),r.forEach(function(e){t.has(e)||c(e,i)})}d.set(o,n)},[n]),o),R=(0,s.Cl)((0,s.Cl)({},C),m);return a.createElement(a.Fragment,null,T&&a.createElement(k,{sideCar:p,removeScrollBar:E,shards:_,noRelative:A,noIsolation:x,inert:S,setCallbacks:g,allowPinchZoom:!!w,lockRef:l,gapMode:N}),v?a.cloneElement(a.Children.only(b),(0,s.Cl)((0,s.Cl)({},R),{ref:O})):a.createElement(void 0===I?"div":I,(0,s.Cl)({},R,{className:y,ref:O}),b))});m.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},m.classNames={fullWidth:l,zeroRight:o};var g=function(e){var t=e.sideCar,n=(0,s.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 a.createElement(r,(0,s.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 s,a;(s=t).styleSheet?s.styleSheet.cssText=r:s.appendChild(document.createTextNode(r)),a=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(a)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},b=function(){var e=v();return function(t,n){a.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},_=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)]},k=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return E;var t=_(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",S=function(e,t,n,r){var i=e.left,s=e.top,a=e.right,c=e.gap;return void 0===n&&(n="margin"),"\n  .".concat("with-scroll-bars-hidden"," {\n   overflow: hidden ").concat(r,";\n   padding-right: ").concat(c,"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(s,"px;\n    padding-right: ").concat(a,"px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: ").concat(c,"px ").concat(r,";\n    "),"padding"===n&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),"\n  }\n  \n  .").concat(o," {\n    right: ").concat(c,"px ").concat(r,";\n  }\n  \n  .").concat(l," {\n    margin-right: ").concat(c,"px ").concat(r,";\n  }\n  \n  .").concat(o," .").concat(o," {\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(c,"px;\n  }\n")},w=function(){var e=parseInt(document.body.getAttribute(x)||"0",10);return isFinite(e)?e:0},I=function(){a.useEffect(function(){return document.body.setAttribute(x,(w()+1).toString()),function(){var e=w()-1;e<=0?document.body.removeAttribute(x):document.body.setAttribute(x,e.toString())}},[])},N=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=void 0===r?"margin":r;I();var s=a.useMemo(function(){return k(i)},[i]);return a.createElement(A,{styles:S(s,!t,i,n?"":"!important")})},C=!1;if("undefined"!=typeof window)try{var O=Object.defineProperty({},"passive",{get:function(){return C=!0,!0}});window.addEventListener("test",O,O),window.removeEventListener("test",O,O)}catch(e){C=!1}var R=!!C&&{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),M(e,r)){var i=P(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},M=function(e,t){return"v"===e?D(t,"overflowY"):D(t,"overflowX")},P=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 s,a=(s=window.getComputedStyle(t).direction,"h"===e&&"rtl"===s?-1:1),o=a*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,p=0;
72do{if(!l)break;var f=P(e,l),m=f[0],g=f[1]-f[2]-a*m;(m||g)&&M(e,l)&&(h+=g,p+=m);var v=l.parentNode;l=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return d&&(i&&1>Math.abs(h)||!i&&o>h)?u=!0:!d&&(i&&1>Math.abs(p)||!i&&-o>p)&&(u=!0),u},j=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},B=function(e){return[e.deltaX,e.deltaY]},U=function(e){return e&&"current"in e?e.current:e},H=0,$=[];let G=(r=function(e){var t=a.useRef([]),n=a.useRef([0,0]),r=a.useRef(),i=a.useState(H++)[0],o=a.useState(y)[0],l=a.useRef(e);a.useEffect(function(){l.current=e},[e]),a.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var t=(0,s.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 c=a.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var i,s=j(e),a=n.current,o="deltaX"in e?e.deltaX:a[0]-s[0],c="deltaY"in e?e.deltaY:a[1]-s[1],u=e.target,d=Math.abs(o)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var h=window.getSelection(),p=h&&h.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var f=L(d,u);if(!f)return!0;if(f?i=d:(i="v"===d?"h":"v",f=L(d,u)),!f)return!1;if(!r.current&&"changedTouches"in e&&(o||c)&&(r.current=i),!i)return!0;var m=r.current||i;return F(m,t,e,"h"===m?o:c,!0)},[]),u=a.useCallback(function(e){if($.length&&$[$.length-1]===o){var n="deltaY"in e?B(e):j(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?c(e,i[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),d=a.useCallback(function(e,n,r,i){var s={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(s),setTimeout(function(){t.current=t.current.filter(function(e){return e!==s})},1)},[]),h=a.useCallback(function(e){n.current=j(e),r.current=void 0},[]),p=a.useCallback(function(t){d(t.type,B(t),t.target,c(t,e.lockRef.current))},[]),f=a.useCallback(function(t){d(t.type,j(t),t.target,c(t,e.lockRef.current))},[]);a.useEffect(function(){return $.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:f}),document.addEventListener("wheel",u,R),document.addEventListener("touchmove",u,R),document.addEventListener("touchstart",h,R),function(){$=$.filter(function(e){return e!==o}),document.removeEventListener("wheel",u,R),document.removeEventListener("touchmove",u,R),document.removeEventListener("touchstart",h,R)}},[]);var m=e.removeScrollBar,g=e.inert;return a.createElement(a.Fragment,null,g?a.createElement(o,{styles:"\n  .block-interactivity-".concat(i," {pointer-events: none;}\n  .allow-interactivity-").concat(i," {pointer-events: all;}\n")}):null,m?a.createElement(N,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},p.useMedium(r),g);var z=a.forwardRef(function(e,t){return a.createElement(m,(0,s.Cl)({},e,{ref:t,sideCar:G}))});z.classNames=m.classNames;let Y=z},14733:(e,t,n)=>{n.d(t,{A:()=>ek});var r={};n.r(r),n.d(r,{attentionMarkers:()=>ep,contentInitial:()=>eo,disable:()=>ef,document:()=>ea,flow:()=>ec,flowInitial:()=>el,insideSpan:()=>eh,string:()=>eu,text:()=>ed});var i=n(84151),s=n(17032);class a{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&&o(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),o(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),o(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);o(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);o(this.left,t.reverse())}}}function o(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,o,l,c,u={},d=-1,h=new a(e);for(;++d<h.length;){for(;d in u;)d=u[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(u,function(e,t){let n,r,i=e.get(t)[1],s=e.get(t)[2],a=t-1,o=[],l=i._tokenizer;!l&&(l=s.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));let c=l.events,u=[],d={},h=-1,p=i,f=0,m=0,g=[0];for(;p;){for(;e.get(++a)[1]!==p;);o.push(a),!p._tokenizer&&(n=s.sliceStream(p),p.next||n.push(null),r&&l.defineSki
72p(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<c.length;)"exit"===c[h][0]&&"enter"===c[h-1][0]&&c[h][1].type===c[h-1][1].type&&c[h][1].start.line!==c[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=c.slice(g[h],g[h+1]),n=o.pop();u.push([n,n+t.length-1]),e.splice(n,2,t)}for(u.reverse(),h=-1;++h<u.length;)d[f+u[h][0]]=f+u[h][1],f+=u[h][1]-u[h][0]-1;return d}(h,d)),d=u[d],c=!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},(o=h.slice(n,d)).unshift(t),h.splice(n,d-n+1,o))}}return(0,s.m)(e,0,1/0,h.slice(0)),!c}var c=n(38220),u=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,u.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,a=[],o=0;return l;function l(t){if(o<a.length){let n=a[o];return i.containerState=n[1],e.attempt(n[0].continuation,c,u)(t)}return u(t)}function c(e){if(o++,i.containerState._closeFlow){let n;i.containerState._closeFlow=void 0,t&&E();let r=i.events.length,a=r;for(;a--;)if("exit"===i.events[a][0]&&"chunkFlow"===i.events[a][1].type){n=i.events[a][1].end;break}y(o);let l=r;
72for(;l<i.events.length;)i.events[l][1].end={...n},l++;return(0,s.m)(i.events,a+1,0,i.events.slice(r)),i.events.length=l,u(e)}return l(e)}function u(n){if(o===a.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(o),m(e)}function p(e){return i.parser.lazy[i.now().line]=o!==a.length,r=i.now().offset,v(e)}function m(t){return i.containerState={},e.attempt(f,g,v)(t)}function g(e){return o++,a.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")),o=0,i.interrupt=void 0,l):(e.consume(n),t)}(r)}function b(e,a){let l=i.sliceStream(e);if(a&&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,a=t.events.length;for(;a--;)if(t.events[a][1].start.offset<r&&(!t.events[a][1].end||t.events[a][1].end.offset>r))return;let l=i.events.length,c=l;for(;c--;)if("exit"===i.events[c][0]&&"chunkFlow"===i.events[c][1].type){if(e){n=i.events[c][1].end;break}e=!0}for(y(o),a=l;a<i.events.length;)i.events[a][1].end={...n},a++;(0,s.m)(i.events,c+1,0,i.events.slice(l)),i.events.length=a}}function y(t){let n=a.length;for(;n-- >t;){let t=a[n];i.containerState=t[1],t[0].exit.call(i,e)}a.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,u.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,s,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function s(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,u.N)(e,i,"linePrefix")};function i(i){if(null===i||(0,d.HP)(i))return n(i);let s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[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,u.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:k()},E=_("string"),T=_("text");function _(e){return{resolveAll:k("text"===e?A:void 0),tokenize:function(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,s,a);return s;function s(e){return l(e)?i(e):a(e)}function a(e){return null===e?void t.consume(e):(t.enter("data"),t.consume(e),o)}function o(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),o)}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 k(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],s=t.sliceStream(i),a=s.length,o=-1,l=0;for(;a--;){let e=s[a];if("string"==typeof e){for(o=e.length;32===e.charCodeAt(o-1);)l++,o--;if(o)break;o=-1}else if(-2===e)r=!0,l++;else if(-1===e);else{a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){let s={type:n===e.length||r||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:i.start._bufferIndex+o,_index:i.start._index+a,line:i.end.line,column:i.end.column-l,offset:i.end.offset-l},end:{...i.end}};i.end={...s.start},i.start.offset===i.end.offset?Object.assign(i,s):(e.splice(n,0,["enter",s,t],["exit",s,t]),n+=2)}n++}return e}let x={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(s){var a;return e.enter("thematicBreak"),r=a=s,function s(a){return a===r?(e.enter("thematicBreakSequence"),function t(n){return n===r?(e.consume(n),i++,t):(e.exit("thematicBreakSequence"),(0,d.On)(n)?(0,u.N)(e,s,"whitespace")(n):s(n))}
72(a)):i>=3&&(null===a||(0,d.HP)(a))?(e.exit("thematicBreak"),t(a)):n(a)}(a)}}},S={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,u.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=void 0,i(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(I,t,i)(n))});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,(0,u.N)(e,e.attempt(S,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],s=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=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,o)(t):o(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),function t(i){return(0,d.BM)(i)&&++a<10?(e.consume(i),t):(!r.interrupt||a<2)&&(r.containerState.marker?i===r.containerState.marker:41===i||46===i)?(e.exit("listItemValue"),o(i)):n(i)}(t)}return n(t)};function o(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(w,u,c))}
72function l(e){return r.containerState.initialBlankLine=!0,s++,u(e)}function c(t){return(0,d.On)(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),u):n(t)}function u(n){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},w={partial:!0,tokenize:function(e,t,n){let r=this;return(0,u.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)}},I={partial:!0,tokenize:function(e,t,n){let r=this;return(0,u.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)}},N={continuation:{tokenize:function(e,t,n){let r=this;return function(t){return(0,d.On)(t)?(0,u.N)(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):i(t)};function i(r){return e.attempt(N,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 C(e,t,n,r,i,s,a,o,l){let c=l||1/0,u=0;return function(t){return 60===t?(e.enter(r),e.enter(i),e.enter(s),e.consume(t),e.exit(s),h):null===t||32===t||41===t||(0,d.JQ)(t)?n(t):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),m(t))};function h(n){return 62===n?(e.enter(s),e.consume(n),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(o),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!u&&(null===i||41===i||(0,d.Ee)(i))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(i)):u<c&&40===i?(e.consume(i),u++,m):41===i?(e.consume(i),u--,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,s){let a,o=this,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(s),c};function c(h){return l>999||null===h||91===h||93===h&&!a||94===h&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(h):93===h?(e.exit(s),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"),c):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(t){return null===t||91===t||93===t||(0,d.HP)(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),a||(a=!(0,d.On)(t)),92===t?h:u)}function h(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function R(e,t,n,r,i,s){let a;return function(t){return 34===t||39===t||40===t?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,o):n(t)};function o(n){return n===a?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(s),l(n))}function l(t){return t===a?(e.exit(s),o(a)):null===t?n(t):(0,d.HP)(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),(0,u.N)(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||(0,d.HP)(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?h:c)}function h(t){return t===a||92===t?(e.consume(t),c):c(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,u.N)(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}var L=n(35983);let M={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,u.N)(e,s,"whitespace")(t):s(t)}function s(e){return null===e||(0,d.HP)(e)?t(e):n(e)}}},P={name:"codeIndented",tokenize:function(e,t,n){let r=this;
72return function(t){return e.enter("codeIndented"),(0,u.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?s(n):(0,d.HP)(n)?e.attempt(F,t,s)(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 s(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,u.N)(e,s,"linePrefix",5)(t)}function s(e){let s=r.events[r.events.length-1];return s&&"linePrefix"===s[1].type&&s[2].sliceSerialize(s[1],!0).length>=4?t(e):(0,d.HP)(e)?i(e):n(e)}}},j={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,s=e.length;for(;s--;)if("enter"===e[s][0]){if("content"===e[s][1].type){n=s;break}"paragraph"===e[s][1].type&&(r=s)}else"content"===e[s][1].type&&e.splice(s,1),i||"definition"!==e[s][1].type||(i=s);let a={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",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=a,e.push(["exit",a,t]),e},tokenize:function(e,t,n){let r,i=this;return function(t){var a;let o,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){o="paragraph"===i.events[l][1].type;break}return!i.parser.lazy[i.now().line]&&(i.interrupt||o)?(e.enter("setextHeadingLine"),r=t,a=t,e.enter("setextHeadingLineSequence"),function t(n){return n===r?(e.consume(n),t):(e.exit("setextHeadingLineSequence"),(0,d.On)(n)?(0,u.N)(e,s,"lineSuffix")(n):s(n))}(a)):n(t)};function s(r){return null===r||(0,d.HP)(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}},B=["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)}}},G={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)}}},z={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){let r,i=this,s={partial:!0,tokenize:function(e,t,n){let s=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(t){return e.enter("codeFencedFence"),(0,d.On)(t)?(0,u.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?(s++,e.consume(i),t):s>=o?(e.exit("codeFencedFenceSequence"),(0,d.On)(i)?(0,u.N)(e,c,"whitespace")(i):c(i)):n(i)}(t)):n(t)}function c(r){return null===r||(0,d.HP)(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}},a=0,o=0;return function(t){var s=t;let c=i.events[i.events.length-1];return a=c&&"linePrefix"===c[1].type?c[2].sliceSerialize(c[1],!0).length:0,r=s,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),function t(i){return i===r?(o++,e.consume(i),t):o<3?n(i):(e.exit("codeFencedFenceSequence"),(0,d.On)(i)?(0,u.N)(e,l,"whitespace")(i):l(i))}(s)};function l(s){return null===s||(0,d.HP)(s)?(e.exit("codeFencedFence"),i.interrupt?t(s):e.check(G,h,g)(s)):(e.enter("co
72deFencedFenceInfo"),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,u.N)(e,c,"whitespace")(i)):96===i&&i===r?n(i):(e.consume(i),t)}(s))}function c(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(s,g,p)(t)}function p(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),f}function f(t){return a>0&&(0,d.On)(t)?(0,u.N)(e,m,"linePrefix",a+1)(t):m(t)}function m(t){return null===t||(0,d.HP)(t)?e.check(G,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 W={name:"characterReference",tokenize:function(e,t,n){let r,i,s=this,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),o};function o(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),r=31,i=d.lV,c(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,c):(e.enter("characterReferenceValue"),r=7,i=d.BM,c(t))}function c(o){if(59===o&&a){let r=e.exit("characterReferenceValue");return i!==d.lV||q(s.sliceSerialize(r))?(e.enter("characterReferenceMarker"),e.consume(o),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(o)}return i(o)&&a++<r?(e.consume(o),c):n(o)}}},V={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,u.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,s.m)(e,0,e.length,n),e},resolveTo:function(e,t){let n,r,i,a,o=e.length,l=0;for(;o--;)if(n=e[o][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[o][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[o][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=o,"labelLink"!==n.type)){l=2;break}}else"labelEnd"===n.type&&(i=o);let c={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},u={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 a=[["enter",c,t],["enter",u,t]],a=(0,s.V)(a,e.slice(r+1,r+l+3)),a=(0,s.V)(a,[["enter",d,t]]),a=(0,s.V)(a,(0,Z.W)(t.parser.constructs.insideSpan.null,e.slice(r+l+4,i-3),t)),a=(0,s.V)(a,[["exit",d,t],e[i-2],e[i-1],["exit",u,t]]),a=(0,s.V)(a,e.slice(i+1)),a=(0,s.V)(a,[["exit",c,t]]),(0,s.m)(e,r,e.length,a),e},tokenize:function(e,t,n){let r,i,s=this,a=s.events.length;for(;a--;)if(("labelImage"===s.events[a][1].type||"labelLink"===s.events[a][1].type)&&!s.events[a][1]._balanced){r=s.events[a][1];break}return function(t){return r?r._inactive?u(t):(i=s.parser.defined.includes((0,L.B)(s.sliceSerialize({start:r.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),o):n(t)};function o(t){return 40===t?e.attempt(Q,c,i?c:u)(t):91===t?e.attempt(J,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(ee,c,u)(t)}function c(e){return t(e)}function u(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?c(t):C(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function s(t){return(0,d.Ee)(t)?D(e,o)(t):c(t)}function a(e){return n(e)}function o(t){return 34===t||39===t||40===t?R(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return(0,d.Ee)(t)?D(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},J={tokenize:function(e,t,n){let r=this;return function(t){return O.call(r,e,i,s,"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 s(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"),s):n(t)}function s(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};var en=n(23362);
72let er={name:"attention",resolveAll:function(e,t){let n,r,i,a,o,l,c,u,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),a={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...e[n][1].end}},o={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:{...a.start},end:{...o.end}},e[n][1].end={...a.start},e[d][1].start={...o.end},c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=(0,s.V)(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=(0,s.V)(c,[["enter",r,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=(0,s.V)(c,(0,Z.W)(t.parser.constructs.insideSpan.null,e.slice(n+1,d),t)),c=(0,s.V)(c,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",r,t]]),e[d][1].end.offset-e[d][1].start.offset?(u=2,c=(0,s.V)(c,[["enter",e[d][1],t],["exit",e[d][1],t]])):u=0,(0,s.m)(e,n-1,d-n+3,c),d=n+c.length-u-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,s=(0,en.S)(i);return function(a){return n=a,e.enter("attentionSequence"),function a(o){if(o===n)return e.consume(o),a;let l=e.exit("attentionSequence"),c=(0,en.S)(o),u=!c||2===c&&s||r.includes(o),d=!s||2===s&&c||r.includes(i);return l._open=!!(42===n?u:u&&(s||!d)),l._close=!!(42===n?d:d&&(c||!u)),t(o)}(a)}}};function ei(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}let es={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)}}},ea={42:S,43:S,45:S,48:S,49:S,50:S,51:S,52:S,53:S,54:S,55:S,56:S,57:S,62:N},eo={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,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(r)};function s(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"),a):n(t)}function a(t){return(0,d.Ee)(t)?D(e,o)(t):o(t)}function o(t){return C(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(M,c,c)(t)}function c(t){return(0,d.On)(t)?(0,u.N)(e,h,"whitespace")(t):h(t)}function h(s){return null===s||(0,d.HP)(s)?(e.exit("definition"),i.parser.defined.push(r),t(s)):n(s)}}}},el={[-2]:P,[-1]:P,32:P},ec={35:{name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,a=3;return"whitespace"===e[3][1].type&&(a+=2),i-2>a&&"whitespace"===e[i][1].type&&(i-=2),"atxHeadingSequence"===e[i][1].type&&(a===i-1||i-4>a&&"whitespace"===e[i-2][1].type)&&(i-=a+1===i?2:4),i>a&&(n={type:"atxHeadingText",start:e[a][1].start,end:e[i][1].end},r={type:"chunkText",start:e[a][1].start,end:e[i][1].end,contentType:"text"},(0,s.m)(e,a,i-a+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 s;return e.enter("atxHeading"),s=i,e.enter("atxHeadingSequence"),function i(s){return 35===s&&r++<6?(e.consume(s),i):null===s||(0,d.Ee)(s)?(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,u.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))}(s)):n(s)}(s)}}},42:x,45:[j,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,s,a,o,l=this;return function(t){var n;return n=t,e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(n),c};function c(a){return 33===a?(e.consume(a),u):47===a?(e.consume(a),i=!0,f):63===a?(e.consume(a),r=3,l.interrupt?t:D):(0,d.CW)(a)?(e.consume(a),s=String.fromCharCode(a),m):n(a)}function u(i){return 45===i?(e.consume(i),r=2,h):91===i?(e.consume(i),r=5,a=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(a++)?(e.consume(r),a===i.length)?l.interrupt?t:x:p:n(r)}function f(t){return(0,d.CW)(t)?(e.consume(t),s=String.fromCharCode(t),m):n(t)}function m(a){if(null===a||47===a||62===a||(0,d.Ee)(a)){let o=47===a,c=s.toLowerCase();
72return!o&&!i&&U.includes(c)?(r=1,l.interrupt?t(a):x(a)):B.includes(s.toLowerCase())?(r=6,o)?(e.consume(a),g):l.interrupt?t(a):x(a):(r=7,l.interrupt&&!l.parser.lazy[l.now().line]?n(a):i?function t(n){return(0,d.On)(n)?(e.consume(n),t):k(n)}(a):v(a))}return 45===a||(0,d.lV)(a)?(e.consume(a),s+=String.fromCharCode(a),m):n(a)}function g(r){return 62===r?(e.consume(r),l.interrupt?t:x):n(r)}function v(t){return 47===t?(e.consume(t),k):58===t||95===t||(0,d.CW)(t)?(e.consume(t),b):(0,d.On)(t)?(e.consume(t),v):k(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),o=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===o?(e.consume(t),o=null,_):null===t||(0,d.HP)(t)?n(t):(e.consume(t),T)}function _(e){return 47===e||62===e||(0,d.On)(e)?v(e):n(e)}function k(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),N):60===t&&1===r?(e.consume(t),C):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,M,S)(t)):null===t||(0,d.HP)(t)?(e.exit("htmlFlowData"),S(t)):(e.consume(t),x)}function S(t){return e.check($,w,M)(t)}function w(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),I}function I(t){return null===t||(0,d.HP)(t)?S(t):(e.enter("htmlFlowData"),x(t))}function N(t){return 45===t?(e.consume(t),D):x(t)}function C(t){return 47===t?(e.consume(t),s="",O):x(t)}function O(t){if(62===t){let n=s.toLowerCase();return U.includes(n)?(e.consume(t),L):x(t)}return(0,d.CW)(t)&&s.length<8?(e.consume(t),s+=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"),M(t)):(e.consume(t),L)}function M(n){return e.exit("htmlFlow"),t(n)}}},61:j,95:x,96:z,126:z},eu={38:W,92:V},ed={[-5]:K,[-4]:K,[-3]:K,33:et,38:W,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),s):64===t?n(t):o(t)}function s(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,a):(43===n||45===n||46===n||(0,d.lV)(n))&&r++<32?(e.consume(n),t):(r=0,o(n))}(t)):o(t)}function a(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),a)}function o(t){return 64===t?(e.consume(t),l):(0,d.cx)(t)?(e.consume(t),o):n(t)}function l(i){return(0,d.lV)(i)?function i(s){return 46===s?(e.consume(s),r=0,l):62===s?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(s),e.exit("autolinkMarker"),e.exit("autolink"),t):function t(s){if((45===s||(0,d.lV)(s))&&r++<63){let n=45===s?t:i;return e.consume(s),n}return n(s)}(s)}(i):n(i)}}},{name:"htmlText",tokenize:function(e,t,n){let r,i,s,a=this;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),o};function o(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),_):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),c):91===t?(e.consume(t),i=0,m):(0,d.CW)(t)?(e.consume(t),y):n(t)}function c(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)?(s=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)?(s=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)?(s=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)?(s=E,R(t)):(e.consume(t),E)}function T(e){return 62===e?O(e):E(e)}function _(t){return(0,d.CW)(t)?(e.consume(t),k):n(t)}function k(t){return 45===t||(0,d.lV)(t)?(e.consume(t),k):function t(n){return(0,d.HP)(n)?(s=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),S):(0,d.HP)(t)?(s=x,R(t)):(0,d.On)(t)?(e.consume(t),x):O(t)}function S(t){return 45===t||46===t||58===t||95===t||(0,d.lV)(t)?(e.consume(t),S):function t(n){return 61===n?(e.consume(n),w):(0,d.HP)(n)?(s=t,R(n)):(0,d.On)(n)?(e.consume(n),t):x(n)}(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),r=t,I):(0,d.HP)(t)?(s=w,R(t)):(0,d.On)(t)?(e.consume(t),w):(e.consume(t),N)}function I(t){return t===r?(e.consume(t),r=void 0,C):null===t?n(t):(0,d.HP)(t)?(s=I,R(t)):(e.consume(t),I)}function N(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),N)}function C(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,u.N)(e,L,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):L(t)}function L(t){return e.enter("htmlTextData"),s(t)}}}],91:es,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)}}},V],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,s=0;
72return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),function t(n){return 96===n?(e.consume(n),s++,t):(e.exit("codeTextSequence"),a(n))}(t)};function a(l){return null===l?n(l):32===l?(e.enter("space"),e.consume(l),e.exit("space"),a):96===l?(i=e.enter("codeTextSequence"),r=0,function n(a){return 96===a?(e.consume(a),r++,n):r===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(a)):(i.type="codeTextData",o(a))}(l)):(0,d.HP)(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):(e.enter("codeTextData"),o(l))}function o(t){return null===t||32===t||96===t||(0,d.HP)(t)?(e.exit("codeTextData"),a(t)):(e.consume(t),o)}}}},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 e_(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 ek(e){let t=this;t.parser=function(n){var a,o;let u,f,m,g;return"object"==typeof(a={...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})&&(o=a,a=void 0),(function(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(b),autolinkProtocol:u,autolinkEmail:u,atxHeading:r(m),blockQuote:r(function(){return{type:"blockquote",children:[]}}),characterEscape:u,characterReference:u,codeFenced:r(f),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:r(f,s),codeText:r(function(){return{type:"inlineCode",value:""}},s),codeTextData:u,data:u,codeFlowValue:u,definition:r(function(){return{type:"definition",identifier:"",label:null,title:null,url:""}}),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:r(function(){return{type:"emphasis",children:[]}}),hardBreakEscape:r(g),hardBreakTrailing:r(g),htmlFlow:r(v,s),htmlFlowData:u,htmlText:r(v,s),htmlTextData:u,image:r(function(){return{type:"image",title:null,url:"",alt:null}}),label:s,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:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:r(m),strong:r(function(){return{type:"strong",children:[]}}),thematicBreak:r(function(){return{type:"thematicBreak"}})},exit:{atxHeading:o(),atxHeadingSequence:function(e){let t=this.stack[this.stack.length-1];t.depth||(t.depth=this.sliceSerialize(e).length)},autolink:o(),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:o(),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:o(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:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}),codeText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),codeTextData:d,data:d,definition:o(),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:o(),hardBreakEscape:o(h),hardBreakTrailing:o(h),htmlFlow:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlFlowData:d,htmlText:o(function(){let e=this.resume();this.stack[this.stack.length-1].value=e}),htmlTextData:d,image:o(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
72ype)&&(u.call(this,e),d.call(this,e))},link:o(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:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),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:o(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:o(),thematicBreak:o()}};!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:a,exit:l,buffer:s,resume:c,data:n},o=[],u=-1;for(;++u<e.length;)("listOrdered"===e[u][1].type||"listUnordered"===e[u][1].type)&&("enter"===e[u][0]?o.push(u):u=function(e,t,n){let r,i,s,a,o=t-1,l=-1,c=!1;for(;++o<=n;){let t=e[o];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||s||(s=o),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=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 a=o;for(i=void 0;a--;){let t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=a}else if("linePrefix"===t[1].type||"blockQuotePrefix"===t[1].type||"blockQuotePrefixWhitespace"===t[1].type||"blockQuoteMarker"===t[1].type||"listItemIndent"===t[1].type);else break}s&&(!i||s<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||o,0,["exit",r,t[2]]),o++,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(o,0,["enter",i,t[2]]),o++,n++,s=void 0,a=!0}}}return e[t][1]._spread=c,n}(e,o.pop(),u));for(u=-1;++u<e.length;){let n=t[e[u][0]];eE.call(n,e[u][1].type)&&n[e[u][1].type].call(Object.assign({sliceSerialize:e[u][2].sliceSerialize},i),e[u][1])}if(i.tokenStack.length>0){let e=i.tokenStack[i.tokenStack.length-1];(e[1]||e_).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})},u=-1;++u<t.transforms.length;)r=t.transforms[u](r)||r;return r};function r(e,t){return function(n){a.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(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 o(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]||e_).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 c(){return(0,i.d)(this.stack.pop())}function u(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:[]}}})(o)(function(e){for(;!l(e););return e}((function(e){let t={constructs:(0,c.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
72olumn:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],l=[],c={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===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=e},enter:function(e,t){let n=t||{};return n.type=e,n.start=f(),u.events.push(["enter",n,u]),l.push(n),n},exit:function(e){let t=l.pop();return t.end=f(),u.events.push(["exit",t,u]),t},interrupt:g(m,{interrupt:!0})},u={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 s,a=e[r];if("string"==typeof a)s=a;else switch(a){case -5:s="\r";break;case -4:s="\n";break;case -3:s="\r\n";break;case -2:s=t?" ":"	";break;case -1:if(!t&&n)continue;s=" ";break;default:s=String.fromCharCode(a)}n=-2===a,i.push(s)}return i.join("")}(p(e),t)},sliceStream:p,write:function(e){return(o=(0,s.V)(o,e),function(){let e;for(;r._index<o.length;){let n=o[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!==o[o.length-1])?[]:(v(t,0),u.events=(0,Z.W)(a,u.events,u),u.events)}},h=t.tokenize.call(u,c);return t.resolveAll&&a.push(t),u;function p(e){return function(e,t){let n,r=t.start._index,i=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;if(r===s)n=[e[r].slice(i,a)];else{if(n=e.slice(r,s),i>-1){let e=n[0];"string"==typeof e?n[0]=e.slice(i):n.shift()}a>0&&n.push(e[s].slice(0,a))}return n}(o,e)}function f(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:s}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:s}}function m(e,t){t.restore()}function g(e,t){return function(n,i,s){var a;let o,d,h,p;return Array.isArray(n)?m(n):"tokenize"in n?m([n]):(a=n,function(e){let t=null!==e&&a[e],n=null!==e&&a.null;return m([...Array.isArray(t)?t:t?[t]:[],...Array.isArray(n)?n:n?[n]:[]])(e)});function m(e){return(o=e,d=0,0===e.length)?s:g(e[d])}function g(e){return function(n){return(p=function(){let e=f(),t=u.previous,n=u.currentConstruct,i=u.events.length,s=Array.from(l);return{from:i,restore:function(){r=e,u.previous=t,u.currentConstruct=n,u.events.length=i,l=s,b()}}}(),h=e,e.partial||(u.currentConstruct=e),e.name&&u.parser.constructs.disable.null.includes(e.name))?y(n):e.tokenize.call(t?Object.assign(Object.create(u),t):u,c,v,y)(n)}}function v(t){return e(h,p),i}function y(e){return(p.restore(),++d<o.length)?g(o[d]):s}}}function v(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&(0,s.m)(u.events,t,u.events.length-t,e.resolve(u.events.slice(t),u)),e.resolveTo&&(u.events=e.resolveTo(u.events,u))}function b(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}(t,e,n)}}})(o).document().write((f=1,m="",g=!0,function(e,t,n){let r,i,s,a,o,l=[];for(e=m+("string"==typeof e?e.toString():new TextDecoder(t||void 0).decode(e)),s=0,m="",g&&(65279===e.charCodeAt(0)&&s++,g=void 0);s<e.length;){if(em.lastIndex=s,a=(r=em.exec(e))&&void 0!==r.index?r.index:e.length,o=e.charCodeAt(a),!r){m=e.slice(s);break}if(10===o&&s===a&&u)l.push(-3),u=void 0;else switch(u&&(l.push(-5),u=void 0),s<a&&(l.push(e.slice(s,a)),f+=a-s),o){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:u=!0,f=1}s=a+1}return n&&(u&&l.push(-5),m&&l.push(m),l.push(null)),l})(n,a,!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)};
72Object.defineProperty(t,"__esModule",{value:!0}),t.Allow=t.MalformedJSON=t.PartialJSON=t.parseJSON=t.parse=void 0;let s=n(9846);Object.defineProperty(t,"Allow",{enumerable:!0,get:function(){return s.Allow}}),i(n(9846),t);class a extends Error{}t.PartialJSON=a;class o extends Error{}function l(e,t=s.Allow.ALL){if("string"!=typeof e)throw TypeError(`expecting str, got ${typeof e}`);if(!e.trim())throw Error(`${e} is empty`);return c(e.trim(),t)}t.MalformedJSON=o,t.parseJSON=l;let c=(e,t)=>{let n=e.length,r=0,i=e=>{throw new a(`${e} at position ${r}`)},l=e=>{throw new o(`${e} at position ${r}`)},c=()=>(f(),r>=n&&i("Unexpected end of input"),'"'===e[r])?u():"{"===e[r]?d():"["===e[r]?h():"null"===e.substring(r,r+4)||s.Allow.NULL&t&&n-r<4&&"null".startsWith(e.substring(r))?(r+=4,null):"true"===e.substring(r,r+4)||s.Allow.BOOL&t&&n-r<4&&"true".startsWith(e.substring(r))?(r+=4,!0):"false"===e.substring(r,r+5)||s.Allow.BOOL&t&&n-r<5&&"false".startsWith(e.substring(r))?(r+=5,!1):"Infinity"===e.substring(r,r+8)||s.Allow.INFINITY&t&&n-r<8&&"Infinity".startsWith(e.substring(r))?(r+=8,1/0):"-Infinity"===e.substring(r,r+9)||s.Allow._INFINITY&t&&1<n-r&&n-r<9&&"-Infinity".startsWith(e.substring(r))?(r+=9,-1/0):"NaN"===e.substring(r,r+3)||s.Allow.NAN&t&&n-r<3&&"NaN".startsWith(e.substring(r))?(r+=3,NaN):p(),u=()=>{let a=r,o=!1;for(r++;r<n&&('"'!==e[r]||o&&"\\"===e[r-1]);)o="\\"===e[r]&&!o,r++;if('"'==e.charAt(r))try{return JSON.parse(e.substring(a,++r-Number(o)))}catch(e){l(String(e))}else if(s.Allow.STR&t)try{return JSON.parse(e.substring(a,r-Number(o))+'"')}catch(t){return JSON.parse(e.substring(a,e.lastIndexOf("\\"))+'"')}i("Unterminated string literal")},d=()=>{r++,f();let a={};try{for(;"}"!==e[r];){if(f(),r>=n&&s.Allow.OBJ&t)return a;let i=u();f(),r++;try{let e=c();a[i]=e}catch(e){if(s.Allow.OBJ&t)return a;throw e}f(),","===e[r]&&r++}}catch(e){if(s.Allow.OBJ&t)return a;i("Expected '}' at end of object")}return r++,a},h=()=>{r++;let n=[];try{for(;"]"!==e[r];)n.push(c()),f(),","===e[r]&&r++}catch(e){if(s.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(s.Allow.NUM&t)try{return JSON.parse(e.substring(0,e.lastIndexOf("e")))}catch(e){}l(String(n))}}let a=r;for("-"===e[r]&&r++;e[r]&&-1===",]}".indexOf(e[r]);)r++;r!=n||s.Allow.NUM&t||i("Unterminated number literal");try{return JSON.parse(e.substring(a,r))}catch(t){"-"===e.substring(a,r)&&i("Not sure what '-' is");try{return JSON.parse(e.substring(a,e.lastIndexOf("e")))}catch(e){l(String(e))}}},f=()=>{for(;r<n&&" \n\r	".includes(e[r]);)r++};return c()};t.parse=l},16277:(e,t,n)=>{function r(e){return e&&"object"==typeof e?"position"in e||"type"in e?s(e.position):"start"in e||"end"in e?s(e):"line"in e||"column"in e?i(e):"":""}function i(e){return a(e&&e.line)+":"+a(e&&e.column)}function s(e){return i(e&&e.start)+"-"+i(e&&e.end)}function a(e){return e&&"number"==typeof e?e:1}n.d(t,{L:()=>r})},16433:(e,t,n)=>{n.d(t,{s:()=>a});var r=n(47211),i=n(96948),s=n(28400);function a(e){return e<=0?function(){return r.w}:(0,i.N)(function(t,n){var r=0;t.subscribe((0,s._)(n,function(t){++r<=e&&(n.next(t),e<=r&&n.complete())}))})}},17032:(e,t,n)=>{function r(e,t,n,r){let i,s=e.length,a=0;if(t=t<0?-t>s?0:s+t:t>s?s: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);a<r.length;)(i=r.slice(a,a+1e4)).unshift(t,0),e.splice(...i),a+=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})},17542:(e,t,n)=>{n.d(t,{H:()=>k});var r=n(52371),i=n(63758);let s=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,a=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o={};function l(e,t){return((t||o).jsx?a:s).test(e)}var c=n(39754),u=n(26868),d=n(94094);let h={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 p=n(59292),f=n(54185),m=n(73545),g=n(18283);let v={}.hasOwnProperty,b=new Map,y=/[A-Z]/g,E=new Set(["table","tbody","thead","tfoot","tr"]),T=new Set(["td","th"]),_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function k(e,t){var n,r,i,s;let a;if(!t||void 0===t.Fragment)throw TypeError("Expected `Fragment` in options");let o=t.filePath||void 0;if(t.development){if("function"!=typeof t.jsxDEV)throw TypeError("Expected `jsxDEV` in options when `development: true`");n=o,r=t.jsxDEV,a=function(e,t,i,s){let a=Array.isArray(i.children),o=(0,m.PW)(e);return r(t,i,s,a,{columnNumber:o?o.column-1:void 0,fileName:n,lineNumber:o?o.line:void 0},void 0)}}else{if("function"!=typeof t.jsx)throw TypeError("Expected `jsx` in production options");
72if("function"!=typeof t.jsxs)throw TypeError("Expected `jsxs` in production options");i=t.jsx,s=t.jsxs,a=function(e,t,n,r){let a=Array.isArray(n.children)?s:i;return r?a(t,n,r):a(t,n)}}let l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:o,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?u.JW:u.qy,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},c=A(l,e,void 0);return c&&"string"!=typeof c?c:l.create(e,l.Fragment,{children:c||void 0},void 0)}function A(e,t,n){return"element"===t.type?function(e,t,n){let i=e.schema;"svg"===t.tagName.toLowerCase()&&"html"===i.space&&(e.schema=u.JW),e.ancestors.push(t);let s=I(e,t.tagName,!1),a=function(e,t){let n,i,s={};for(i in t.properties)if("children"!==i&&v.call(t.properties,i)){let a=function(e,t,n){let i=(0,d.I)(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?(0,r.A)(n):(0,p.A)(n)),"style"===i.property){let t="object"==typeof n?n:function(e,t){try{return f(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let t=new g.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=_+"#cannot-parse-style-attribute",t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){let t,n={};for(t in e)v.call(e,t)&&(n[function(e){let t=e.replace(y,C);return"ms-"===t.slice(0,3)&&(t="-"+t),t}(t)]=e[t]);return n}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&i.space?h[i.property]||i.property:i.attribute,n]}}(e,i,t.properties[i]);if(a){let[r,i]=a;e.tableCellAlignToStyle&&"align"===r&&"string"==typeof i&&T.has(t.tagName)?n=i:s[r]=i}}return n&&((s.style||(s.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=n),s}(e,t),o=w(e,t);return E.has(t.tagName)&&(o=o.filter(function(e){return"string"!=typeof e||!(0,c.m)(e)})),x(e,a,s,t),S(a,o),e.ancestors.pop(),e.schema=i,e.create(t,s,a,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,i.ok)("ExpressionStatement"===n.type),e.evaluater.evaluateExpression(n.expression)}N(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=u.JW),e.ancestors.push(t);let s=null===t.name?e.Fragment:I(e,t.name,!0),a=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,i.ok)("ExpressionStatement"===t.type);let s=t.expression;(0,i.ok)("ObjectExpression"===s.type);let a=s.properties[0];(0,i.ok)("SpreadElement"===a.type),Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else N(e,t.position);else{let s,a=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,i.ok)("ExpressionStatement"===t.type),s=e.evaluater.evaluateExpression(t.expression)}else N(e,t.position);else s=null===r.value||r.value;n[a]=s}return n}(e,t),o=w(e,t);return x(e,a,s,t),S(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,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);N(e,t.position)}(e,t):"root"===t.type?function(e,t,n){let r={};return S(r,w(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?t.value:void 0}function x(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function S(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function w(e,t){let n=[],r=-1,i=e.passKeys?new Map:b;for(;++r<t.children.length;){let s,a=t.children[r];if(e.passKeys){let e="element"===a.type?a.tagName:"mdxJsxFlowElement"===a.type||"mdxJsxTextElement"===a.type?a.name:void 0;if(e){let t=i.get(e)||0;s=e+"-"+t,i.set(e,t+1)}}let o=A(e,a,s);void 0!==o&&n.push(o)}return n}function I(e,t,n){let r;if(n)if(t.includes(".")){let e,n=t.split("."),s=-1;for(;++s<n.length;){let t=l(n[s])?{type:"Identifier",name:n[s]}:{type:"Literal",value:n[s]};e=e?{type:"MemberExpression",object:e,property:t,computed:!!(s&&"Literal"===t.type),optional:!1}:t}(0,i.ok)(e,"always a result"),r=e}else r=l(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 v.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);N(e)}function N(e,t){let n=new g.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=_+"#cannot-handle-mdx-estrees-without-createevaluater",n}function C(e){return"-"+e.toLowerCase()}}
72,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="",s={},a=!1;if(t&&(s="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:!s.cause&&e&&(a=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&"string"==typeof n){let e=n.indexOf(":");-1===e?s.ruleId=n:(s.source=n.slice(0,e),s.ruleId=n.slice(e+1))}if(!s.place&&s.ancestors&&s.ancestors){let e=s.ancestors[s.ancestors.length-1];e&&(s.place=e.position)}let o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=(0,r.L)(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&"string"==typeof s.cause.stack?s.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},18362:(e,t,n)=>{n.d(t,{F:()=>a});var r=n(77163),i=n(96948),s=n(28400);function a(e,t){return void 0===t&&(t=r.D),e=null!=e?e:o,(0,i.N)(function(n,r){var i,a=!0;n.subscribe((0,s._)(r,function(n){var s=t(n);(a||!e(i,s))&&(a=!1,i=s,r.next(n))}))})}function o(e,t){return e===t}},19526:(e,t,n)=>{n.d(t,{Oh:()=>a});var r=n(12115),i=0,s=null;function a(){r.useEffect(()=>{s||(s={start:o(),end:o()});let{start:e,end:t}=s;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),i++,()=>{1===i&&(null==s||s.start.remove(),null==s||s.end.remove(),s=null),i=Math.max(0,i-1)}},[])}function o(){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 s=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(s),!i)return s}},20545:(e,t,n)=>{n.d(t,{w:()=>d});var r=n(12718),i=n(42421),s=n(96948),a=n(8286),o=n(10899),l=n(28400),c=n(20437),u=(0,o.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,o=n.first,u=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==o&&null==u)throw TypeError("No timeout provided.");return(0,s.N)(function(e,t){var n,r,i=null,s=0,d=function(e){r=(0,c.N)(t,m,function(){try{n.unsubscribe(),(0,a.Tg)(p({meta:v,lastValue:i,seen:s})).subscribe(t)}catch(e){t.error(e)}},e)};n=e.subscribe((0,l._)(t,function(e){null==r||r.unsubscribe(),s++,t.next(i=e),u>0&&d(u)},void 0,void 0,function(){(null==r?void 0:r.closed)||null==r||r.unsubscribe(),i=null})),s||d(null!=o?"number"==typeof o?o:o-m.now():u)})}function h(e){throw new u(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,s){var a,o=!1;e.subscribe({next:function(e){a=e,o=!0},error:s,complete:function(){o?i(a):n?i(t.defaultValue):s(new r.G)}})})}},21594:(e,t,n)=>{n.d(t,{z:()=>g});var r=n(45037),i=Array.isArray,s=Object.getPrototypeOf,a=Object.prototype,o=Object.keys,l=n(78842),c=n(77163),u=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&&s(t)===a){var r=o(n);return{args:r.map(function(e){return n[e]}),keys:r}}}return{args:e,keys:null}}(m),T=E.args,_=E.keys;if(0===T.length)return(0,l.H)([],b);var k=new r.c((e=T,t=b,void 0===(n=_?function(e){return _.reduce(function(t,n,r){return t[n]=e[r],t},{})}:c.D)&&(n=c.D),function(r){v(t,function(){for(var i=e.length,s=Array(i),a=i,o=i,c=function(i){v(t,function(){var c=(0,l.H)(e[i],t),u=!1;c.subscribe((0,f._)(r,function(e){s[i]=e,!u&&(u=!0,o--),o||r.next(n(s.slice()))},function(){--a||r.complete()}
72))},r)},u=0;u<i;u++)c(u)},r)}));return y?k.pipe((0,d.T)(function(e){return h(e)?y.apply(void 0,(0,u.fX)([],(0,u.zs)(e))):y(e)})):k}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"),s={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 a=n(98734);let o=(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?o(t,e.currentPath):t.join("/")}}function c(e,t,n,r){r?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function u(e,t,n,r,i){e[t]=n,c(e,t,r,i)}function d(e,t){return _(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":u(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,r.message,t);break;case"max":u(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":u(n,"minLength","number"==typeof n.minLength?Math.max(n.minLength,r.value):r.value,r.message,t),u(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":u(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;
72n++)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}}})):u(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}}})):u(e,"pattern",b(t,r),n,r)}function 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="",s=!1,a=!1,o=!1;for(let e=0;e<r.length;e++){if(s){i+=r[e],s=!1;continue}if(n.i){if(a){if(r[e].match(/[a-z]/)){o?(i+=r[e],i+=`${r[e-2]}-${r[e]}`.toUpperCase(),o=!1):"-"===r[e+1]&&r[e+2]?.match(/[a-z]/)?(i+=r[e],o=!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
73]))`;continue}else if("$"===r[e]){i+=`($|(?=[\r
74]))`;continue}}if(n.s&&"."===r[e]){i+=a?`${r[e]}\r
75`:`[${r[e]}\r
76]`;continue}i+=r[e],"\\"===r[e]?s=!0:a&&"]"===r[e]?a=!1:a||"["!==r[e]||(a=!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===a.kY.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((n,r)=>({...n,[r]:_(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",r]})??l(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let n={type:"object",additionalProperties:_(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if("openApi3"===t.target)return n;if(e.keyType?._def.typeName===a.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===a.kY.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===a.kY.ZodBranded&&e.keyType._def.type._def.typeName===a.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)=>_(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 _(e,t,n=!1){let r=t.seen.get(e);if(t.override){let s=t.override?.(e,t,r,n);if(s!==i)return s}if(r&&!n){let e=k(r,t);if(void 0!==e)return e}let s={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,s);let o=((e,t,n)=>{switch(t){case a.kY.ZodString:return p(e,n);case a.kY.ZodNumber:var r,i,s,o,h,f,m,g,v,b=e,k=n;let A={type:"number"};if(!b.checks)return A;for(let e of b.checks)switch(e.kind){case"int":A.type="integer",c(A,"type",e.message,k);break;case"min":"jsonSchema7"===k.target?e.inclusive?u(A,"minimum",e.value,e.message,k):u(A,"exclusiveMinimum",e.value,e.message,k):(e.inclusive||(A.exclusiveMinimum=!0),u(A,"minimum",e.value,e.message,k));break;case"max":"jsonSchema7"===k.target?e.inclusive?u(A,"maximum",e.value,e.message,k):u(A,"exclusiveMaximum",e.value,e.message,k):(e.inclusive||(A.exclusiveMaximum=!0),u(A,"maximum",e.value,e.message,k));break;case"multipleOf":u(A,"multipleOf",e.value,e.message,k)}return A;case a.kY.ZodObject:return function(e,t){let n="openAi"===t.target,r={type:"object",properties:{}},i=[],s=e.shape();for(let e in s){let a=s[e];if(void 0===a||void 0===a._def)continue;let o=function(e){try{return e.isOptional()}catch{return!0}}(a);o&&n&&("ZodOptional"===a._def.typeName&&(a=a._def.innerType),a.isNullable()||(a=a.nullable()),o=!1);let l=_(a._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==l&&(r.properties[e]=l,o||i.push(e))}i.length&&(r.required=i);let a=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return _(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!==a&&(r.additionalProperties=a),r}(e,n);case a.kY.ZodBigInt:var x=e,S=n;let w={type:"integer",format:"int64"};if(!x.checks)return w;for(let e of x.checks)switch(e.kind){case"min":"jsonSchema7"===S.target?e.inclusive?u(w,"minimum",e.value,e.message,S):u(w,"exclusiveMinimum",e.value,e.message,S):(e.inclusive||(w.exclusiveMinimum=!0),u(w,"minimum",e.value,e.message,S));break;case"max":"jsonSchema7"===S.target?e.inclusive?u(w,"maximum",e.value,e.message,S):u(w,"exclusiveMaximum",e.value,e.message,S):(e.inclusive||(w.exclusiveMaximum=!0),u(w,"maximum",e.value,e.message,S));break;case"multipleOf":u(w,"multipleOf",e.value,e.message,S)}return w;case a.kY.ZodBoolean:return{type:"boolean"};
76case a.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 s=t,a=n;let o={type:"integer",format:"unix-time"};if("openApi3"===a.target)return o;for(let e of s.checks)switch(e.kind){case"min":u(o,"minimum",e.value,e.message,a);break;case"max":u(o,"maximum",e.value,e.message,a)}return o}}(e,n);case a.kY.ZodUndefined:return{not:l(n)};case a.kY.ZodNull:return"openApi3"===n.target?{enum:["null"],nullable:!0}:{type:"null"};case a.kY.ZodArray:var I=e,N=n;let C={type:"array"};return I.type?._def&&I.type?._def?.typeName!==a.kY.ZodAny&&(C.items=_(I.type._def,{...N,currentPath:[...N.currentPath,"items"]})),I.minLength&&u(C,"minItems",I.minLength.value,I.minLength.message,N),I.maxLength&&u(C,"maxItems",I.maxLength.value,I.maxLength.message,N),I.exactLength&&(u(C,"minItems",I.exactLength.value,I.exactLength.message,N),u(C,"maxItems",I.exactLength.value,I.exactLength.message,N)),C;case a.kY.ZodUnion:case a.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 a.kY.ZodIntersection:var L=e,M=n;let P=[_(L.left._def,{...M,currentPath:[...M.currentPath,"allOf","0"]}),_(L.right._def,{...M,currentPath:[...M.currentPath,"allOf","1"]})].filter(e=>!!e),F="jsonSchema2019-09"===M.target?{unevaluatedProperties:!1}:void 0,j=[];return P.forEach(e=>{if((!("type"in e)||"string"!==e.type)&&"allOf"in e)j.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;j.push(t)}}),j.length?{allOf:j,...F}:void 0;case a.kY.ZodTuple:return r=e,i=n,r.rest?{type:"array",minItems:r.items.length,items:r.items.map((e,t)=>_(e._def,{...i,currentPath:[...i.currentPath,"items",`${t}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[]),additionalItems:_(r.rest._def,{...i,currentPath:[...i.currentPath,"additionalItems"]})}:{type:"array",minItems:r.items.length,maxItems:r.items.length,items:r.items.map((e,t)=>_(e._def,{...i,currentPath:[...i.currentPath,"items",`${t}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[])};case a.kY.ZodRecord:return y(e,n);case a.kY.ZodLiteral:var B=e,U=n;let H=typeof B.value;return"bigint"!==H&&"number"!==H&&"boolean"!==H&&"string"!==H?{type:Array.isArray(B.value)?"array":"object"}:"openApi3"===U.target?{type:"bigint"===H?"integer":H,enum:[B.value]}:{type:"bigint"===H?"integer":H,const:B.value};case a.kY.ZodEnum:return{type:"string",enum:Array.from(e.values)};case a.kY.ZodNativeEnum:var $=e;let G=$.values,z=Object.keys($.values).filter(e=>"number"!=typeof G[G[e]]).map(e=>G[e]),Y=Array.from(new Set(z.map(e=>typeof e)));return{type:1===Y.length?"string"===Y[0]?"string":"number":["string","number"],enum:z};case a.kY.ZodNullable:var q=e,W=n;if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(q.innerType._def.typeName)&&(!q.innerType._def.checks||!q.innerType._def.checks.length))return"openApi3"===W.target?{type:E[q.innerType._def.typeName],nullable:!0}:{type:[E[q.innerType._def.typeName],"null"]};if("openApi3"===W.target){let e=_(q.innerType._def,{...W,currentPath:[...W.currentPath]});return e&&"$ref"in e?{allOf:[e],nullable:!0}:e&&{...e,nullable:!0}}let V=_(q.innerType._def,{...W,currentPath:[...W.currentPath,"anyOf","0"]});return V&&{anyOf:[V,{type:"null"}]};case a.kY.ZodOptional:var K=e,Z=n;if(Z.currentPath.toString()===Z.propertyPath?.toString())return _(K.innerType._def,Z);let X=_(K.innerType._def,{...Z,currentPath:[...Z.currentPath,"anyOf","1"]});return X?{anyOf:[{not:l(Z)},X]}:l(Z);case a.kY.ZodMap:return s=e,"record"===(o=n).mapStrategy?y(s,o):{type:"array",maxItems:125,items:{type:"array",items:[_(s.keyType._def,{...o,currentPath:[...o.currentPath,"items","items","0"]})||l(o),_(s.valueType._def,{...o,currentPath:[...o.currentPath,"items","items","1"]})||l(o)],minItems:2,maxItems:2}};case a.kY.ZodSet:var Q=e,J=n;let ee={type:"array",uniqueItems:!0,items:_(Q.valueType._def,{...J,currentPath:[...J.currentPath,"items"]})};return Q.minSize&&u(ee,"minItems",Q.minSize.value,Q.minSize.message,J),Q.maxSize&&u(ee,"maxItems",Q.maxSize.value,Q.maxSize.message,J),ee;case a.kY.ZodLazy:return()=>e.getter()._def;
76case a.kY.ZodPromise:return _(e.type._def,n);case a.kY.ZodNaN:case a.kY.ZodNever:return"openAi"===(h=n).target?void 0:{not:l({...h,currentPath:[...h.currentPath,"not"]})};case a.kY.ZodEffects:return f=e,"input"===(m=n).effectStrategy?_(f.schema._def,m):l(m);case a.kY.ZodAny:case a.kY.ZodUnknown:return l(n);case a.kY.ZodDefault:return g=e,v=n,{..._(g.innerType._def,v),default:g.defaultValue()};case a.kY.ZodBranded:return d(e,n);case a.kY.ZodReadonly:case a.kY.ZodCatch:return _(e.innerType._def,n);case a.kY.ZodPipeline:var et=e,en=n;if("input"===en.pipeStrategy)return _(et.in._def,en);if("output"===en.pipeStrategy)return _(et.out._def,en);let er=_(et.in._def,{...en,currentPath:[...en.currentPath,"allOf","0"]}),ei=_(et.out._def,{...en,currentPath:[...en.currentPath,"allOf",er?"1":"0"]});return{allOf:[er,ei].filter(e=>void 0!==e)};case a.kY.ZodFunction:case a.kY.ZodVoid:case a.kY.ZodSymbol:default:return}})(e,e.typeName,t),h="function"==typeof o?_(o(),t):o;if(h&&A(e,t,h),t.postProcess){let n=t.postProcess(h,e,t);return s.jsonSchema=h,n}return s.jsonSchema=h,h}let k=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:o(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?{...s,name:e}:{...s,...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]:_(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,a=_(e._def,void 0===i?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1)??l(n),o="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==o&&(a.title=o),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 c=void 0===i?r?{...a,[n.definitionPath]:r}:a:{$ref:[..."relative"===n.$refStrategy?[]:n.basePath,n.definitionPath,i].join("/"),[n.definitionPath]:{...r,[i]:a}};return"jsonSchema7"===n.target?c.$schema="http://json-schema.org/draft-07/schema#":("jsonSchema2019-09"===n.target||"openAi"===n.target)&&(c.$schema="https://json-schema.org/draft/2019-09/schema#"),"openAi"===n.target&&("anyOf"in c||"oneOf"in c||"allOf"in c||"type"in c&&Array.isArray(c.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),c}},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:()=>o});var r,i=n(12115),s=n(4129),a=(r||(r=n.t(i,2)))[" useInsertionEffect ".trim().toString()]||s.N;function o({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[s,o,l]=function({defaultProp:e,onChange:t}){let[n,r]=i.useState(e),s=i.useRef(n),o=i.useRef(t);return a(()=>{o.current=t},[t]),i.useEffect(()=>{s.current!==n&&(o.current?.(n),s.current=n)},[n,s]),[n,r,o]}({defaultProp:t,onChange:n}),c=void 0!==e,u=c?e:s;{let t=i.useRef(void 0!==e);i.useEffect(()=>{let e=t.current;if(e!==c){let t=c?"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=c},[c,r])}return[u,i.useCallback(t=>{if(c){let n="function"==typeof t?t(e):t;n!==e&&l.current?.(n)}else o(t)},[c,e,o,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.`)}},26868:(e,t,n)=>{n.d(t,{qy:()=>v,JW:()=>b});
76class r{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function i(e,t){let n={},i={};for(let t of e)Object.assign(n,t.property),Object.assign(i,t.normal);return new r(n,i,t)}r.prototype.normal={},r.prototype.property={},r.prototype.space=void 0;var s=n(78232),a=n(66986);function o(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let o=new a.E(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[(0,s.S)(r)]=r,n[(0,s.S)(o.attribute)]=r}return new r(t,n,e.space)}var l=n(74515);let c=o({properties:{ariaActiveDescendant:null,ariaAtomic:l.booleanish,ariaAutoComplete:null,ariaBusy:l.booleanish,ariaChecked:l.booleanish,ariaColCount:l.number,ariaColIndex:l.number,ariaColSpan:l.number,ariaControls:l.spaceSeparated,ariaCurrent:null,ariaDescribedBy:l.spaceSeparated,ariaDetails:null,ariaDisabled:l.booleanish,ariaDropEffect:l.spaceSeparated,ariaErrorMessage:null,ariaExpanded:l.booleanish,ariaFlowTo:l.spaceSeparated,ariaGrabbed:l.booleanish,ariaHasPopup:null,ariaHidden:l.booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:l.spaceSeparated,ariaLevel:l.number,ariaLive:null,ariaModal:l.booleanish,ariaMultiLine:l.booleanish,ariaMultiSelectable:l.booleanish,ariaOrientation:null,ariaOwns:l.spaceSeparated,ariaPlaceholder:null,ariaPosInSet:l.number,ariaPressed:l.booleanish,ariaReadOnly:l.booleanish,ariaRelevant:null,ariaRequired:l.booleanish,ariaRoleDescription:l.spaceSeparated,ariaRowCount:l.number,ariaRowIndex:l.number,ariaRowSpan:l.number,ariaSelected:l.booleanish,ariaSetSize:l.number,ariaSort:null,ariaValueMax:l.number,ariaValueMin:l.number,ariaValueNow:l.number,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function u(e,t){return t in e?e[t]:t}function d(e,t){return u(e,t.toLowerCase())}let h=o({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:l.commaSeparated,acceptCharset:l.spaceSeparated,accessKey:l.spaceSeparated,action:null,allow:null,allowFullScreen:l.boolean,allowPaymentRequest:l.boolean,allowUserMedia:l.boolean,alpha:l.boolean,alt:null,as:null,async:l.boolean,autoCapitalize:null,autoComplete:l.spaceSeparated,autoFocus:l.boolean,autoPlay:l.boolean,blocking:l.spaceSeparated,capture:null,charSet:null,checked:l.boolean,cite:null,className:l.spaceSeparated,closedBy:null,colorSpace:null,cols:l.number,colSpan:l.number,command:null,commandFor:null,content:null,contentEditable:l.booleanish,controls:l.boolean,controlsList:l.spaceSeparated,coords:l.number|l.commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:l.boolean,defer:l.boolean,dir:null,dirName:null,disabled:l.boolean,download:l.overloadedBoolean,draggable:l.booleanish,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:l.boolean,formTarget:null,headers:l.spaceSeparated,height:l.number,hidden:l.overloadedBoolean,high:l.number,href:null,hrefLang:null,htmlFor:l.spaceSeparated,httpEquiv:l.spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inert:l.boolean,inputMode:null,integrity:null,is:null,isMap:l.boolean,itemId:null,itemProp:l.spaceSeparated,itemRef:l.spaceSeparated,itemScope:l.boolean,itemType:l.spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:l.boolean,low:l.number,manifest:null,max:null,maxLength:l.number,media:null,method:null,min:null,minLength:l.number,multiple:l.boolean,muted:l.boolean,name:null,nonce:null,noModule:l.boolean,noValidate:l.boolean,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:l.boolean,optimum:l.number,pattern:null,ping:l.spaceSeparated,placeholder:null,playsInl
76ine:l.boolean,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:l.boolean,referrerPolicy:null,rel:l.spaceSeparated,required:l.boolean,reversed:l.boolean,rows:l.number,rowSpan:l.number,sandbox:l.spaceSeparated,scope:null,scoped:l.boolean,seamless:l.boolean,selected:l.boolean,shadowRootClonable:l.boolean,shadowRootCustomElementRegistry:l.boolean,shadowRootDelegatesFocus:l.boolean,shadowRootMode:null,shadowRootSerializable:l.boolean,shape:null,size:l.number,sizes:null,slot:null,span:l.number,spellCheck:l.booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:l.number,step:null,style:null,tabIndex:l.number,target:null,title:null,translate:null,type:null,typeMustMatch:l.boolean,useMap:null,value:l.booleanish,width:l.number,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:l.spaceSeparated,axis:null,background:null,bgColor:null,border:l.number,borderColor:null,bottomMargin:l.number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:l.boolean,declare:l.boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:l.number,leftMargin:l.number,link:null,longDesc:null,lowSrc:null,marginHeight:l.number,marginWidth:l.number,noResize:l.boolean,noHref:l.boolean,noShade:l.boolean,noWrap:l.boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:l.number,rules:null,scheme:null,scrolling:l.booleanish,standby:null,summary:null,text:null,topMargin:l.number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:l.number,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:l.boolean,disablePictureInPicture:l.boolean,disableRemotePlayback:l.boolean,exportParts:l.commaSeparated,part:l.spaceSeparated,prefix:null,property:null,results:l.number,security:null,unselectable:null},space:"html",transform:d}),p=o({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",maskType:"mask-type",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
76-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:l.commaOrSpaceSeparated,accentHeight:l.number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:l.number,amplitude:l.number,arabicForm:null,ascent:l.number,attributeName:null,attributeType:null,azimuth:l.number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:l.number,by:null,calcMode:null,capHeight:l.number,className:l.spaceSeparated,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:l.number,diffuseConstant:l.number,direction:null,display:null,dur:null,divisor:l.number,dominantBaseline:null,download:l.boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:l.number,enableBackground:null,end:null,event:null,exponent:l.number,externalResourcesRequired:null,fill:null,fillOpacity:l.number,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:l.commaSeparated,g2:l.commaSeparated,glyphName:l.commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:l.number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:l.number,horizOriginX:l.number,horizOriginY:l.number,id:null,ideographic:l.number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:l.number,k:l.number,k1:l.number,k2:l.number,k3:l.number,k4:l.number,kernelMatrix:l.commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:l.number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:l.number,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
76Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:l.number,overlineThickness:l.number,paintOrder:null,panose1:null,path:null,pathLength:l.number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:l.spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:l.number,pointsAtY:l.number,pointsAtZ:l.number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:l.commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:l.commaOrSpaceSeparated,rev:l.commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:l.commaOrSpaceSeparated,requiredFeatures:l.commaOrSpaceSeparated,requiredFonts:l.commaOrSpaceSeparated,requiredFormats:l.commaOrSpaceSeparated,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:l.number,specularExponent:l.number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:l.number,strikethroughThickness:l.number,string:null,stroke:null,strokeDashArray:l.commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:l.number,strokeOpacity:l.number,strokeWidth:null,style:null,surfaceScale:l.number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:l.commaOrSpaceSeparated,tabIndex:l.number,tableValues:null,target:null,targetX:l.number,targetY:l.number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:l.commaOrSpaceSeparated,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:l.number,underlineThickness:l.number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:l.number,values:null,vAlphabetic:l.number,vMathematical:l.number,vectorEffect:null,vHanging:l.number,vIdeographic:l.number,version:null,vertAdvY:l.number,vertOriginX:l.number,vertOriginY:l.number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:l.number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:u}),f=o({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()}),m=o({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:d}),g=o({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),v=i([c,h,f,m,g],"html"),b=i([c,p,f,m,g],"svg")},27012:(e,t,n)=>{n.d(t,{A:()=>eD});var r=n(5009),i=n(63758),s=n(3407),a=n(56522),o=n(95502);let l="phrasing",c=["autolink","link","image","label"];function u(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,o.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),s=-1;for(;++s<i.length;)(0,a.VG)(e,"text",l);function l(e,t){let n,a=-1;for(;++a<t.length;){let e=t[a],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[s][0],a=i[s][1],o=0,l=n.children.indexOf(e),c=!1,u=[];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]},s=a(...d,i);if("string"==typeof s&&(s=s.length>0?{type:"text",value:s}:void 0),!1===s?r.lastIndex=n+1:(o!==n&&u.push({type:"text",value:e.value.slice(o,n)}),Array.isArray(s)?u.push(...s):s&&u.push(s),o=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}return c?(o<e.value.length&&u.push({type:"text",value:e.value.slice(o)}),n.children.splice(l,1,...u)):u=[e],l+u.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,s){let a="";if(!y(s)||(/^w/i.test(t)&&(n=t+n,t="",a="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 o=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(")"),s=(0,r.D)(e,"("),a=(0,r.D)(e,")");for(;-1!==i&&s>a;)e+=n.slice(0,i+1),i=(n=n.slice(i+1)).indexOf(")"),a++;return[e,n]}(n+i);if(!o[0])return!1;let l={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[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,s.Ny)(n)||(0,s.es)(n))&&(!t||47!==n)}var E=n(35983);function T(){this.buffer()}function _(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function k(){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 S(e){this.exit(e)}function w(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 I(e){this.exit(e)}function N(e,t,n,r){let i=n.createTracker(r),s=i.move("[^"),a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]")}
76function C(e,t,n){return 0===t?e:O(e,t,n)}function O(e,t,n){return(n?"":"    ")+e}N.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 M(e,t,n,r){let i=n.createTracker(r),s=n.enter("strikethrough"),a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function P(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)}M.peek=function(){return"~"};n(95578);var j=n(23362);n(95139);n(84151);function B(e,t,n){let r=e.value||"",i="`",s=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){let e,t=n.unsafe[s],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}B.peek=function(){return"`"};(0,o.C)(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);let U={inlineCode:B,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),s=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&&(s=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+s);let a=s.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));let o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);let l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),function(e,t,n){return t?(n?"":" ".repeat(a))+e:(n?s:s+" ".repeat(a-s.length))+e});return l(),c}};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 G(e){this.enter({type:"tableRow",children:[]},e)}function z(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,W));let n=this.stack[this.stack.length-1];(0,i.ok)("inlineCode"===n.type),n.value=t,this.exit(e)}function W(e,t){return"|"===t?t:e}function V(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,s=-1;for(;++s<i.length;){let e=i[s];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],s="boolean"==typeof e.checked&&i&&"paragraph"===i.type,a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let l=U.listItem(e,t,n,{...r,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}var X=n(38220);let Q={tokenize:function(e,t,n){let r=0;return function t(s){return(87===s||119===s)&&r<3?(r++,e.consume(s),t):46===s&&3===r?(e.consume(s),i):n(s)};function i(e){return null===e?n(e):t(e)}},partial:!0},J={tokenize:function(e,t,n){let r,i,a;return o;function o(t){return 46===t||95===t?e.check(et,c,l)(t):null===t||(0,s.Ee)(t)||(0,s.Ny)(t)||45!==t&&(0,s.es)(t)?c(t):(a=!0,e.consume(t),o)}function l(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}},partial:!0},ee={tokenize:function(e,t){let n=0,r=0;return i;function i(o){return 40===o?(n++,e.consume(o),i):41===o&&r<n?a(o):33===o||34===o||38===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||60===o||63===o||93===o||95===o||126===o?e.check(et,t,a)(o):null===o||(0,s.Ee)(o)||(0,s.Ny)(o)?t(o):(e.consume(o),i)}function a(t){return 41===t&&r++,e.consume(t),i}},partial:!0},et={tokenize:function(e,t,n){return r;function r(o){return 33===o||34===o||39===o||41===o||42===o||44===o||46===o||58===o||59===o||63===o||95===o||126===o?(e.consume(o),r):38===o?(e.consume(o),a):93===o?(e.consume(o),i):60===o||null===o||(0,s.Ee)(o)||(0,s.Ny)(o)?t(o):n(o)}function i(e){return null===e||40===e||91===e||(0,s.Ee)(e)||(0,s.Ny)(e)?t(e):r(e)}function a(t){return(0,s.CW)(t)?function t(i){return 59===i?(e.consume(i),r):(0,s.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,s.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="",a=!1;return function(t){return(72===t||104===t)&&ec.call(r,r.previous)&&!eh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),o):n(t)};function o(t){if((0,s.CW)(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),o;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),a)?c:(a=!0,l):n(t)}function c(t){return null===t||(0,s.JQ)(t)||(0,s.Ee)(t)||(0,s.Ny)(t)||(0,s.es)(t)?n(t):e.attempt(J,e.attempt(ee,u),n)(t)}function u(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:ec},es={name:"emailAutolink",tokenize:function(e,t,n){let r,i,a=this;return function(t){return!ed(t)||!eu.call(a,a.previous)||eh(a.events)?n(t):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),function t(r){return ed(r)?(e.consume(r),t):64===r?(e.consume(r),o):n(r)}(t))};function o(t){return 46===t?e.check(en,c,l)(t):45===t||95===t||(0,s.lV)(t)?(i=!0,e.consume(t),o):c(t)}function l(t){return e.consume(t),r=!0,o}function c(o){return i&&r&&(0,s.CW)(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(o)):n(o)}},previous:eu},ea={},eo=48;
76for(;eo<123;)ea[eo]=es,58==++eo?eo=65:91===eo&&(eo=97);function el(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||(0,s.Ee)(e)}function ec(e){return!(0,s.CW)(e)}function eu(e){return!(47===e||ed(e))}function ed(e){return 43===e||45===e||46===e||95===e||(0,s.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}ea[43]=es,ea[45]=es,ea[46]=es,ea[95]=es,ea[72]=[es,ei],ea[104]=[es,ei],ea[87]=[es,er],ea[119]=[es,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,s=i.events.length,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);for(;s--;){let e=i.events[s][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}return function(s){if(!r||!r._balanced)return n(s);let o=(0,E.B)(i.sliceSerialize({start:r.end,end:i.now()}));return 94===o.codePointAt(0)&&a.includes(o.slice(1))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),t(s)):n(s)}}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 s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function eb(e,t,n){let r,i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]),o=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",c)}function c(l){if(o>999||93===l&&!r||null===l||91===l||(0,s.Ee)(l))return n(l);if(93===l){e.exit("chunkString");let r=e.exit("gfmFootnoteCallString");return a.includes((0,E.B)(i.sliceSerialize(r)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(l)}return(0,s.Ee)(l)||(r=!0),o++,e.consume(l),92===l?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),o++,c):c(t)}}function ey(e,t,n){let r,i,a=this,o=a.parser.gfmFootnotes||(a.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"),c};function c(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(t)}function u(t){if(l>999||93===t&&!i||null===t||91===t||(0,s.Ee)(t))return n(t);if(93===t){e.exit("chunkString");let n=e.exit("gfmFootnoteDefinitionLabelString");return r=(0,E.B)(a.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return(0,s.Ee)(t)||(i=!0),l++,e.consume(t),92===t?d:u}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}function h(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(r)||o.push(r),(0,ef.N)(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}
76function eE(e,t,n){return e.check(ep.B,t,e.attempt(em,t,n))}function eT(e){e.exit("gfmFootnoteDefinition")}var e_=n(17032),ek=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,a=0,o=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,s="tableHead"===r||"tableRow"===r?y:l;return s===y&&i.parser.lazy[i.now().line]?n(e):s(e)};function l(t){var n;return e.enter("tableHead"),e.enter("tableRow"),124===(n=t)||(r=!0,o+=1),c(n)}function c(t){return null===t?n(t):(0,s.HP)(t)?o>1?(o=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),h):n(t):(0,s.On)(t)?(0,ef.N)(e,c,"whitespace")(t):(o+=1,r&&(r=!1,a+=1),124===t)?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),r=!0,c):(e.enter("data"),u(t))}function u(t){return null===t||124===t||(0,s.Ee)(t)?(e.exit("data"),c(t)):(e.consume(t),92===t?d:u)}function d(t){return 92===t||124===t?(e.consume(t),u):u(t)}function h(t){return(i.interrupt=!1,i.parser.lazy[i.now().line])?n(t):(e.enter("tableDelimiterRow"),r=!1,(0,s.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,s.On)(t)?(0,ef.N)(e,m,"whitespace")(t):m(t)}function m(t){return 58===t?(o+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),g):45===t?(o+=1,g(t)):null===t||(0,s.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,s.On)(t)?(0,ef.N)(e,b,"whitespace")(t):b(t)}function b(i){if(124===i)return p(i);if(null===i||(0,s.HP)(i))return r&&a===o?(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,s.HP)(n)?(e.exit("tableRow"),t(n)):(0,s.On)(n)?(0,ef.N)(e,E,"whitespace")(n):(e.enter("data"),T(n))}function T(t){return null===t||124===t||(0,s.Ee)(t)?(e.exit("data"),E(t)):(e.consume(t),92===t?_:T)}function _(t){return 92===t||124===t?(e.consume(t),T):T(t)}}function eS(e,t){let n,r,i,s=-1,a=!0,o=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0,h=new eA;for(;++s<e.length;){let p=e[s],f=p[1];"enter"===p[0]?"tableHead"===f.type?(u=!1,0!==d&&(eI(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(s,0,[["enter",n,t]])):"tableRow"===f.type||"tableDelimiterRow"===f.type?(a=!0,i=void 0,l=[0,0,0,0],c=[0,s+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},f.start),end:Object.assign({},f.end)},h.add(s,0,[["enter",r,t]])),o="tableDelimiterRow"===f.type?2:r?3:1):o&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)?(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],i=ew(h,t,l,o,void 0,i),l=[0,0,0,0]),c[2]=s)):"tableCellDivider"===f.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],i=ew(h,t,l,o,void 0,i)),c=[(l=c)[1],s,0,0])):"tableHead"===f.type?(u=!0,d=s):"tableRow"===f.type||"tableDelimiterRow"===f.type?(d=s,0!==l[1]?(c[0]=c[1],i=ew(h,t,l,o,s,i)):0!==c[1]&&(i=ew(h,t,c,o,s,i)),o=0):o&&("data"===f.type||"tableDelimiterMarker"===f.type||"tableDelimiterFiller"===f.type)&&(c[3]=s)}for(0!==d&&eI(h,t,d,n,r),h.consume(t.events),s=-1;++s<t.events.length;){let e=t.events[s];"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"
76:"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,s))}return e}function ew(e,t,n,r,i,s){0!==n[0]&&(s.end=Object.assign({},eN(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));let a=eN(t.events,n[1]);if(s={type:1===r?"tableHeader":2===r?"tableDelimiter":"tableData",start:Object.assign({},a),end:Object.assign({},a)},e.add(n[1],0,[["enter",s,t]]),0!==n[2]){let i=eN(t.events,n[2]),s=eN(t.events,n[3]),a={type:"tableContent",start:Object.assign({},i),end:Object.assign({},s)};if(e.add(n[2],0,[["enter",a,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",a,t]])}return void 0!==i&&(s.end=Object.assign({},eN(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function eI(e,t,n,r,i){let s=[],a=eN(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function eN(e,t){let n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}let eC={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,s.Ee)(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),a):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),a):n(t)}function a(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(t)}function o(r){return(0,s.HP)(r)?t(r):(0,s.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=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push((0,X.y)([{text:ea},{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,s=this.events,a=0;return function(o){return 126===i&&"characterEscape"!==s[s.length-1][1].type?r(o):(e.enter("strikethroughSequenceTemporary"),function s(o){let l=(0,j.S)(i);if(126===o)return a>1?r(o):(e.consume(o),a++,s);if(a<2&&!t)return r(o);let c=e.exit("strikethroughSequenceTemporary"),u=(0,j.S)(o);return c._open=!u||2===u&&!!l,c._close=!l||2===l&&!!u,n(o)}(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)},s={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",s,t]],o=t.parser.constructs.insideSpan.null;o&&(0,e_.m)(a,a.length,0,(0,ek.W)(o,e.slice(r+1,n),t)),(0,e_.m)(a,a.length,0,[["exit",s,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),(0,e_.m)(e,r-1,n-r+3,a),n=r+a.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:eS}}},{text:{91:eC}}
76])),s.push([{transforms:[g],enter:{literalAutolink:u,literalAutolinkEmail:d,literalAutolinkHttp:d,literalAutolinkWww:d},exit:{literalAutolink:m,literalAutolinkEmail:f,literalAutolinkHttp:h,literalAutolinkWww:p}},{enter:{gfmFootnoteCallString:T,gfmFootnoteCall:_,gfmFootnoteDefinitionLabelString:k,gfmFootnoteDefinition:A},exit:{gfmFootnoteCallString:x,gfmFootnoteCall:S,gfmFootnoteDefinitionLabelString:w,gfmFootnoteDefinition:I}},{canContainEols:["delete"],enter:{strikethrough:D},exit:{strikethrough:L}},{enter:{table:H,tableData:Y,tableHeader:Y,tableRow:G},exit:{codeText:q,table:$,tableData:z,tableHeader:z,tableRow:z}},{exit:{taskListCheckValueChecked:V,taskListCheckValueUnchecked:V,paragraph:K}}]),a.push({extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:l,notInConstruct:c},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:l,notInConstruct:c},{character:":",before:"[ps]",after:"\\/",inConstruct:l,notInConstruct:c}]},(t=!1,n&&n.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,i){let s=r.createTracker(i),a=s.move("[^"),o=r.enter("footnoteDefinition"),l=r.enter("label");return a+=s.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=s.move("]:"),e.children&&e.children.length>0&&(s.shift(4),a+=s.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,s.current()),t?O:C))),o(),a},footnoteReference:N},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:R}],handlers:{delete:M}},function(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=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 o(function(e,t,n){let r=e.children,i=-1,s=[],a=t.enter("table");for(;++i<r.length;)s[i]=l(r[i],t,n);return a(),s}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){let i=o([l(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){let i=n.enter("tableCell"),a=n.enter("phrasing"),o=n.containerPhrasing(e,{...r,before:s,after:s});return a(),i(),o}function o(e,t){return function(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||P,s=[],a=[],o=[],l=[],c=0,u=-1;for(;++u<e.length;){let t=[],r=[],s=-1;for(e[u].length>c&&(c=e[u].length);++s<e[u].length;){var d;let a=null==(d=e[u][s])?"":String(d);if(!1!==n.alignDelimiters){let e=i(a);r[s]=e,(void 0===l[s]||e>l[s])&&(l[s]=e)}t.push(a)}a[u]=t,o[u]=r}let h=-1;if("object"==typeof r&&"length"in r)for(;++h<c;)s[h]=F(r[h]);else{let e=F(r);for(;++h<c;)s[h]=e}h=-1;let p=[],f=[];for(;++h<c;){let e=s[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),a=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&((i=t.length+i+r.length)>l[h]&&(l[h]=i),f[h]=i),p[h]=a}a.splice(1,0,p),o.splice(1,0,f),u=-1;let m=[];for(;++u<a.length;){let e=a[u],t=o[u];h=-1;let r=[];for(;++h<c;){let i=e[h]||"",a="",o="";if(!1!==n.alignDelimiters){let e=l[h]-(t[h]||0),n=s[h];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),o=" ".repeat(e/2-.5)):o=a=" ".repeat(e/2):o=" ".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(a),r.push(i),!1!==n.alignDelimiters&&r.push(o),!1!==n.padding&&r.push(" "),(!1!==n.delimiterEnd||h!==c-1)&&r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function l(e,t,n){let r=e.children,i=-1,s=[],o=t.enter("tableRow");for(;++i<r.length;)s[i]=a(r[i],e,t,n);return o(),s}}(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 s(e,t,n,r,i)}var s=function(e){function t(t,n,r,i,s,a){var o=e.call(this,t)||this;return o.onFinalize=s,o.shouldUnsubscribe=a,o._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,o._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,o._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,o}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,{_:()=>s});var r=n(47948),i=n(28786);function s(e,t){var n="object"==typeof t;return new Promise(function(s,a){var o=new i.Ms({next:function(e){s(e),o.unsubscribe()},error:a,complete:function(){n?s(t.defaultValue):a(new r.G)}});e.subscribe(o)})}},28786:(e,t,n)=>{n.d(t,{Ms:()=>v,vU:()=>p});var r=n(71450),i=n(39097),s=n(41449),a=n(29846),o=n(55180),l=n(34793),c=u("C",void 0,void 0);function u(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,s.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(u("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?y(u("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?y(c,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}(s.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 s,o,l=e.call(this)||this;return(0,i.T)(t)||!t?s={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}
76:l&&a.$.useDeprecatedNextContext?((o=Object.create(t)).unsubscribe=function(){return l.unsubscribe()},s={next:t.next&&m(t.next,o),error:t.error&&m(t.error,o),complete:t.complete&&m(t.complete,o)}):s=t,l.destination=new g(s),l}return(0,r.C6)(t,e),t}(p);function b(e){a.$.useDeprecatedSynchronousErrorHandling?(0,h.l)(e):(0,o.m)(e)}function y(e,t){var n=a.$.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:()=>o});var r=n(39097),i=n(96948),s=n(28400),a=n(77163);function o(e,t,n){var o=(0,r.T)(e)||t||n?{next:e,error:t,complete:n}:e;return o?(0,i.N)(function(e,t){null==(n=o.subscribe)||n.call(o);var n,r=!0;e.subscribe((0,s._)(t,function(e){var n;null==(n=o.next)||n.call(o,e),t.next(e)},function(){var e;r=!1,null==(e=o.complete)||e.call(o),t.complete()},function(e){var n;r=!1,null==(n=o.error)||n.call(o,e),t.error(e)},function(){var e,t;r&&(null==(e=o.unsubscribe)||e.call(o)),null==(t=o.finalize)||t.call(o)}))}):a.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)}})}},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),s=n(63758);function a(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 o=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},c={}.hasOwnProperty;class u 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(s,...a){let o=e[++n],l=-1;if(s)return void r(s);for(;++l<t.length;)(null===a[l]||void 0===a[l])&&(a[l]=t[l]);t=a,o?(function(e,t){let n;return function(...t){let s,a=e.length>t.length;a&&t.push(r);try{s=e.apply(this,t)}catch(e){if(a&&n)throw e;return r(e)}a||(s&&s.then&&"function"==typeof s.then?s.then(i,r):s instanceof Error?r(s):i(s))};function r(e,...i){n||(n=!0,t(e,...i))}function i(e){r(null,e)}})(o,i)(...a):r(null,...a)}(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 u,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):c.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 a=v(e),o=n.parse(a);function l(e,n){e||!n?i(e):r?r(n):((0,s.ok)(t,"`done` is defined if `resolve` is not"),t(void 0,n))}n.run(o,a,function(e,t,r){var i,s;if(e||!t||!r)return l(e);let a=n.stringify(t,r);"string"==typeof(i=a)||(s=i)&&"object"==typeof s&&"byteLength"in s&&"byteOffset"in s?r.value=a:r.result=a,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,s.ok)(t,"we either bailed on an error or have a tree"),t}
76run(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,a){(0,s.ok)("function"!=typeof t,"`file` can’t be a `done` anymore, we checked");let o=v(t);r.run(e,o,function(t,r,o){let l=r||e;t?a(t):i?i(l):((0,s.ok)(n,"`done` is defined if `resolve` is not"),n(void 0,l,o))})}}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,s.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)?o(e):s(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function s(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");o(e.plugins),e.settings&&(r.settings=i(!0,r.settings,e.settings))}function o(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 s(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,s=-1;for(;++r<n.length;)if(n[r][0]===e){s=r;break}if(-1===s)n.push([e,...t]);else if(t.length>0){let[r,...o]=t,l=n[s][1];a(l)&&a(r)&&(r=i(!0,l,r)),n[s]=[e,r,...o]}}}}let d=new u().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(!a(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 o.T(e)}},29846:(e,t,n)=>{n.d(t,{$:()=>r});var r={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},31536:(e,t,n)=>{n.d(t,{B:()=>c});var r=n(71450),i=n(45037),s=n(41449),a=(0,n(10899).L)(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),o=n(12668),l=n(75968),c=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 u(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new a},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 s=(0,r.Ju)(t.currentObservers),a=s.next();!a.done;a=s.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}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?s.Kn:(this.currentObservers=null,i.push(e),new s.yU(function(){t.currentObservers=null,(0,o.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 u(e,t)},t}(i.c),u=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:s.Kn},t}(c)},31590:(e,t,n)=>{n.d(t,{C:()=>s,U:()=>a});var r=n(71450),i=n(39097);function s(e){return(0,r.AQ)(this,arguments,function(){var t,n,i;return(0,r.YH)(this,function(s){switch(s.label){case 0:t=e.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,(0,r.N3)(t.read())];case 3:if(i=(n=s.sent()).value,!n.done)return[3,5];return[4,(0,r.N3)(void 0)];case 4:return[2,s.sent()];case 5:return[4,(0,r.N3)(i)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function a(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),s=n(47211),a=n(95868),o=n(78842);function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(0,a.lI)(e),l=(0,a.R0)(e,1/0);return e.length?1===e.length?(0,i.Tg)(e[0]):(0,r.U)(l)((0,o.H)(e,n)):s.w}},32467:(e,t,n)=>{n.d(t,{DX:()=>o,Dc:()=>c,TL:()=>a,bL:()=>o});var r,i=n(12115),s=n(94446);
76function a(e){let t=i.forwardRef((t,n)=>{var r;let a,o,{children:c,...d}=t,g=null,v=!1,b=[];h(c)&&"function"==typeof m&&(c=m(c._payload)),i.Children.forEach(c,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=u(e,t),b.push(g?.props?.children)}else b.push(e)}),g?g=i.cloneElement(g,void 0,b):!v&&1===i.Children.count(c)&&i.isValidElement(c)&&(g=c);let y=g?(r=g,(o=(a=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?r.ref:(o=(a=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in a&&a.isReactWarning)?r.props.ref:r.props.ref||r.ref):void 0,E=(0,s.s)(n,y);if(!g){if(c||0===c)throw Error(v?f(e):p(e));return c}let T=function(e,t){let n={...t};for(let r in t){let i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...e)=>{let t=s(...e);return i(...e),t}:i&&(n[r]=i):"style"===r?n[r]={...i,...s}:"className"===r&&(n[r]=[i,s].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 o=a("Slot"),l=Symbol.for("radix.slottable");function c(e){let t=e=>"child"in e?e.children(e.child):e.children;return t.displayName=`${e}.Slottable`,t.__radixId=l,t}var u=(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:()=>s,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 s{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:()=>o});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),s={setInterval:function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var a=s.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,(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=s.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},a=n(12668),o=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),s.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&&s.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;
76this.work=this.state=this.scheduler=null,this.pending=!1,(0,a.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:()=>s});var r=n(79168),i=n(3407);let s={partial:!0,tokenize:function(e,t,n){return function(t){return(0,i.On)(t)?(0,r.N)(e,s,"linePrefix")(t):s(t)};function s(e){return null===e||(0,i.HP)(e)?t(e):n(e)}}}},33859:(e,t,n)=>{let r;n.d(t,{A:()=>o});let i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},s=new Uint8Array(16);var a=n(48765);let o=function(e,t,n){if(i.randomUUID&&!t&&!e)return i.randomUUID();let o=(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(s)}();if(o.length<16)throw Error("Random bytes length must be >= 16");if(o[6]=15&o[6]|64,o[8]=63&o[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]=o[e];return t}return(0,a.k)(o)}},34098:(e,t,n)=>{n.d(t,{t:()=>s});var r=n(37305),i=n(77241);function s(e,t,n){var s,a,o,l,c=!1;return e&&"object"==typeof e?(l=void 0===(s=e.bufferSize)?1/0:s,t=void 0===(a=e.windowTime)?1/0:a,c=void 0!==(o=e.refCount)&&o,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:c})}},34793:(e,t,n)=>{n.d(t,{l:()=>r});function r(){}},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:()=>a});var r=n(71450),i=n(31536),s=n(91239),a=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=s.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,s=this._timestampProvider,a=this._windowTime;!n&&(r.push(t),i||r.push(s.now()+a)),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 s=t.now(),a=0,o=1;o<n.length&&n[o]<=s;o+=2)a=o;a&&n.splice(0,a+1)}},t}(i.B)},38139:(e,t,n)=>{n.d(t,{kM:()=>y,ss:()=>N});var r=n(51532);let i=e=>(0,r.iz)(e),s={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"},a=(0,r.AH)`
77  :host {
78    /* Re-pin inheritable properties to close inheritance leaks from hostile
79       host CSS. These are the only properties that cross the shadow boundary
80       via inheritance, so we hard-set them at the root. */
81    all: initial;
82    display: block;
83    height: 100%;
84    box-sizing: border-box;
85    font-family: var(
86      --cpk-drawer-font-family,
87      ui-sans-serif,
88      system-ui,
89      sans-serif
90    );
91    font-size: var(--cpk-drawer-font-size, 14px);
92    line-height: var(--cpk-drawer-line-height, 1.4);
93    color: var(--cpk-drawer-fg, var(--foreground, ${i(s.fg)}));
94
95    /* Three-level token resolution, highest priority first:
96       1. explicit per-token override (--cpk-drawer-*),
97       2. the host app's theme variable (--background/--card/… — the standard
98          react-core/shadcn names), so the drawer follows the host's light/dark
99          theme by inheritance (custom properties are NOT reset by all:initial),
100       3. the built-in light default derived from react-core at build time, so a
101          host with no theme still renders correctly (self-contained). */
102    --_bg: var(--cpk-drawer-bg, var(--background, ${i(s.bg)}));
103    --_surface: var(--cpk-drawer-surface, var(--card, ${i(s.surface)}));
104    --_surface-fg: var(
105      --cpk-drawer-surface-fg,
106      var(--card-foreground, ${i(s["surface-fg"])})
107    );
108    --_muted: var(--cpk-drawer-muted, var(--muted, ${i(s.muted)}));
109    --_muted-fg: var(
110      --cpk-drawer-muted-fg,
111      var(--muted-foreground, ${i(s["muted-fg"])})
112    );
113    --_accent: var(--cpk-drawer-accent, var(--accent, ${i(s.accent)}));
114    --_accent-fg: var(
115      --cpk-drawer-accent-fg,
116      var(--accent-foreground, ${i(s["accent-fg"])})
117    );
118    --_primary: var(--cpk-drawer-primary, var(--primary, ${i(s.primary)}));
119    --_primary-fg: var(
120      --cpk-drawer-primary-fg,
121      var(--primary-foreground, ${i(s["primary-fg"])})
122    );
123    --_danger: var(--cpk-drawer-danger, var(--destructive, ${i(s.danger)}));
124    --_border: var(--cpk-drawer-border, var(--border, ${i(s.border)}));
125    --_ring: var(--cpk-drawer-ring, var(--ring, ${i(s.ring)}));
126    --_indicator: var(--cpk-drawer-indicator, #5b94e4);
127    /* Cap the corner radius at 4px (per designer) — themeable but never larger. */
128    --_radius: min(
129      var(--cpk-drawer-radius, var(--radius, ${i(s.radius)})),
130      4px
131    );
132    --_width: var(--cpk-drawer-width, 320px);
133  }
134
135  :host([hidden]) {
136    display: none;
137  }
138
139  * {
140    box-sizing: border-box;
141  }
142
143  .root {
144    display: flex;
145    flex-direction: column;
146    height: 100%;
147    width: var(--_width);
148    background: var(--_bg);
149    border-right: 1px solid var(--_border);
150    overflow: hidden;
151    transition: width 0.2s ease;
152    /* The confirm-delete dialog no longer needs a positioning context here: it
153       is a native <dialog> opened with showModal(), which renders in the
154       browser top layer independent of any stacking context (ENT-1051). No
155       other direct child of .root is absolutely positioned (the filter and
156       row-action popovers anchor to their own positioned ancestors), so .root
157       stays static. The mobile path establishes its own context via
158       position:fixed. */
159  }
160
161  /* Mobile: off-canvas overlay (modal pattern). */
162  .root.mobile {
163    position: fixed;
164    inset: 0 auto 0 0;
165    z-index: 1000;
166    width: min(var(--_width), 85vw);
167    transform: translateX(-100%);
168    transition: transform 0.2s ease;
169    box-shadow: 0 0 0 100vmax transparent;
170  }
171
172  .root.mobile.open {
173    transform: translateX(0);
174  }
175
176  /* Desktop collapsed: the panel is replaced by the floating cluster, so remove
177     it from the layout entirely. The host reclaims the reserved column via the
178     --cpk-drawer-reserved-width:0px override the element sets on collapse. */
179  .root.collapsed {
180    display: none;
181  }
182
183  .backdrop {
184    position: fixed;
185    inset: 0;
186    z-index: 999;
187    background: rgba(0, 0, 0, 0.4);
188    border: 0;
189    padding: 0;
190    margin: 0;
191    cursor: pointer;
192  }
193
194  /* Floating launcher cluster (Figma "closed" mockup): a rounded surface card
195     holding the sidebar toggle + a "New Conversation" (+) icon button. Rendered
196     by the element itself in the mobile-closed AND desktop-collapsed 
196states so
197     there is always a way to reopen/expand — and to start a new conversation —
198     with no host wiring. */
199  .launcher-cluster {
200    position: fixed;
201    z-index: 998;
202    /* Position is themeable so a host can line the cluster up with its own
203       header controls (e.g. vertically centering it on a toggle group). */
204    top: var(--cpk-drawer-launcher-top, 24px);
205    left: var(--cpk-drawer-launcher-left, 24px);
206    display: inline-flex;
207    align-items: center;
208    gap: 2px;
209    padding: 6px;
210    border-radius: var(--_radius);
211    border: 1px solid var(--_border);
212    background: var(--_surface);
213    color: var(--_surface-fg);
214    box-shadow: 0 2px 8px rgb(0 0 0 / 0.12);
215  }
216
217  .launcher {
218    display: inline-flex;
219    align-items: center;
220    justify-content: center;
221    width: 32px;
222    height: 32px;
223    padding: 6px;
224    border: 0;
225    border-radius: calc(var(--_radius) - 3px);
226    background: transparent;
227    color: var(--_surface-fg);
228    cursor: pointer;
229    font: inherit;
230  }
231
232  .launcher:hover,
233  .launcher:focus-visible {
234    background: var(--_muted);
235  }
236
237  .launcher .icon {
238    width: 18px;
239    height: 18px;
240    display: block;
241  }
242
243  .header {
244    display: flex;
245    align-items: center;
246    gap: 8px;
247    padding: 12px;
248  }
249
250  /* The header is hidden until a consumer projects slot="header" content
251     (the redesign has no built-in header controls). Mirrors the memories/footer
252     gating so an empty padded header bar never renders above the list. */
253  .header[hidden] {
254    display: none;
255  }
256
257  /* Optional consumer projection surface. When a consumer projects into
258     slot="header" it fills the header row. */
259  .header slot[name="header"] {
260    display: flex;
261    align-items: center;
262    flex: 1;
263    min-width: 0;
264  }
265
266  .icon-btn {
267    position: relative;
268    display: inline-flex;
269    align-items: center;
270    justify-content: center;
271    width: 32px;
272    height: 32px;
273    padding: 6px;
274    border: 0;
275    border-radius: var(--_radius);
276    background: transparent;
277    color: var(--_muted-fg);
278    cursor: pointer;
279    font: inherit;
280  }
281
282  /* "Filter applied" indicator dot at the funnel's bottom-right (Figma archived
283     view). Shown only when a non-default filter is active. */
284  .filter-dot {
285    position: absolute;
286    right: 3px;
287    bottom: 4px;
288    width: 6px;
289    height: 6px;
290    border-radius: 50%;
291    background: var(--_indicator);
292    pointer-events: none;
293  }
294
295  .icon-btn:hover,
296  .icon-btn:focus-visible {
297    background: var(--_muted);
298    color: inherit;
299  }
300
301  .icon-btn[aria-pressed="true"] {
302    background: var(--_muted);
303    color: inherit;
304  }
305
306  .icon {
307    width: 20px;
308    height: 20px;
309    display: block;
310  }
311
312  .new-conversation {
313    display: flex;
314    align-items: center;
315    gap: 12px;
316    /* No top margin by default: the header bar (the collapse toggle on de
316sktop,
317       the close button on mobile-open) sits above this row and supplies the top
318       spacing — the header-hidden case re-adds it below. Horizontal geometry
319       matches the list rows: the hover background insets 12px (like a row's
320       highlight) and, with 10px inner padding, the icon's left edge lands at
321       22px — the same x as the thread names below (list padding 12 + row
322       padding 10). */
323    margin: 0 12px;
324    padding: 8px 10px;
325    border: 0;
326    border-radius: var(--_radius);
327    background: transparent;
328    color: inherit;
329    cursor: pointer;
330    font: inherit;
331    text-align: left;
332  }
333
334  /* Only when the header bar is fully hidden (collapsible=false AND no projected
335     header content) is this row the first element — give it the top spacing the
336     header would otherwise supply. */
337  .header[hidden] + .new-conversation {
338    margin-top: 12px;
339  }
340
341  .new-conversation:hover,
342  .new-conversation:focus-visible {
343    background: var(--_muted);
344  }
345
346  .new-conversation .icon {
347    width: 16px;
348    height: 16px;
349  }
350
351  .section-heading {
352    position: relative;
353    display: flex;
354    align-items: center;
355    justify-content: space-between;
356    /* Match the list rows' content edge: "Recent Conversations" lands at 22px
357       (margin 12 + padding 10), aligned with the thread names and the New
358       Conversation icon; the funnel sits 22px from the right, over the kebabs. */
359    padding: 8px 10px;
360    margin: 0 12px;
361  }
362
363  .section-title {
364    font-size: 11px;
365    font-weight: 600;
366    letter-spacing: 0.02em;
367    color: var(--_muted-fg);
368    text-transform: none;
369  }
370
371  .icon-btn.small {
372    width: 24px;
373    height: 24px;
374    padding: 4px;
375  }
376
377  .icon-btn.small .icon {
378    width: 16px;
379    height: 16px;
380  }
381
382  .filter-popover {
383    position: absolute;
384    right: 0;
385    top: calc(100% + 4px);
386    z-index: 15;
387    display: flex;
388    flex-direction: column;
389    min-width: 120px;
390    padding: 4px;
391    background: var(--_surface);
392    color: var(--_surface-fg);
393    border: 1px solid var(--_border);
394    border-radius: var(--_radius);
395    box-shadow: 0 4px 12px rgb(0 0 0 / 0.18);
396  }
397
398  .filter-opt {
399    border: 0;
400    background: transparent;
401    color: inherit;
402    cursor: pointer;
403    font: inherit;
404    text-align: left;
405    padding: 6px 8px;
406    border-radius: 4px;
407  }
408
409  .filter-opt:hover,
410  .filter-opt:focus-visible {
411    background: var(--_muted);
412  }
413
414  .filter-opt[aria-pressed="true"] {
415    font-weight: 600;
416  }
417
418  .list {
419    flex: 1;
420    min-height: 0;
421    overflow-y: auto;
422    padding: 8px 12px;
423    margin: 0;
424    list-style: none;
425    display: flex;
426    flex-direction: column;
427    gap: 4px;
428  }
429
430  .row {
431    display: flex;
432    align-items: center;
433    gap: 8px;
434    padding: 8px 10px;
435    border-radius: var(--_radius);
436    cursor: pointer;
437    background: transparent;
438    color: inherit;
439    border: 1px solid transparent;
440    opacity: 0;
441    transform: translateY(4px);
442    animation: cpk-drawer-row-in 0.18s ease forwards;
443    /* Positioned so the hovered row can be lifted above later rows (below). */
444    position: relative;
445  }
446
447  /* Lift the interacted row above later rows so its kebab popover (which paints
448     inside the row's own transform stacking context) is not clipped by / drawn
449     under the rows below it. */
450  .row:hover,
451  .row:focus-within,
452  .row.menu-open {
453    z-index: 3;
454  }
455
456  /* While a kebab menu is open, the popover only covers part of the rows it
457     overlaps, so the rest of the list would still respond to hover — revealing
458     other rows' kebabs and (under a host \`::part(row):hover\` theme) painting a
459     hover background "through"/around the open menu. Freeze pointer events on
460     every OTHER row so the menu reads as a single focused surface. The owner
461     row (\`.menu-open\`) and its popover stay interactive, and a pointerdown that
462     lands on a frozen row still reaches the document handler that closes the
463     menu, so click-away dismissal is preserved. */
464  .list.menu-open .row:not(.menu-open) {
465    pointer-events: none;
466  }
467
468  @keyframes cpk-drawer-row-in {
469    to {
470      opacity: 1;
471      transform: translateY(0);
472    }
473  }
474
475  .row.active {
476    background: var(--_accent);
477    color: var(--_accent-fg);
478    /* No border on the selected row — the background change alone marks it
479       (per designer). The base row keeps its 1px transparent border so the
480       layout stays stable. */
481  }
482
483  .row.archived .row-name {
484    color: var(--_muted-fg);
485    font-style: italic;
486  }
487
488  .row-name {
489    flex: 1;
490    min-width: 0;
491  }
492
493  .row-name-text {
494    display: block;
495    overflow: hidden;
496    text-overflow: ellipsis;
497    white-space: nowrap;
498  }
499
500  .row-name.placeholder {
501    color: var(--_muted-fg);
502    font-style: italic;
503  }
504
505  .row-name.revealed {
506    animation: cpk-drawer-name-reveal 0.3s ease;
507  }
508
509  @keyframes cpk-drawer-name-reveal {
510    from {
511      opacity: 0.4;
512    }
513    to {
514      opacity: 1;
515    }
516  }
517
518  .row-action {
519    position: relative;
520    display: inline-flex;
521    align-items: center;
522    justify-content: center;
523    flex: none;
524    border: 0;
525    background: transparent;
526    color: var(--_muted-fg);
527    cursor: pointer;
528    font: inherit;
529    padding: 5px;
530    border-radius: 4px;
531  }
532
533  .row-action:hover,
534  .row-action:focus-visible {
535    background: var(--_muted);
536    color: inherit;
537  }
538
539  .row-action-icon {
540    width: 15px;
541    height: 15px;
542    display: block;
543  }
544
545  /* Per-row kebab trigger: hidden at rest, revealed when the row is hovered,
546     focused (keyboard), active (selected), or its menu is open. */
547  .row-menu {
548    flex: none;
549    display: inline-flex;
550    align-items: center;
551    justify-content: center;
552    width: 24px;
553    height: 24px;
554    padding: 4px;
555    border: 0;
556    border-radius: 4px;
557    background: transparent;
558    color: var(--_muted-fg);
559    cursor: pointer;
560    font: inherit;
561    opacity: 0;
562  }
563
564  .row:hover .row-menu,
565  .row:focus-within .row-menu,
566  .row.active .row-menu,
567  .row-menu[aria-expanded="true"] {
568    opacity: 1;
569  }
570
571  .row-menu:hover,
572  .row-menu:focus-visible {
573    background: var(--_muted);
574    color: inherit;
575  }
576
577  .row-menu .icon {
578    width: 16px;
579    height: 16px;
580  }
581
582  .row-menu-popover {
583    position: absolute;
584    right: 8px;
585    top: calc(100% - 4px);
586    z-index: 16;
587    display: flex;
588    flex-direction: column;
589    min-width: 140px;
590    padding: 4px;
591    background: var(--_surface);
592    color: var(--_surface-fg);
593    border: 1px solid var(--_border);
594    border-radius: var(--_radius);
595    box-shadow: 0 4px 12px rgb(0 0 0 / 0.18);
596  }
597
598  /* Rows in the lower portion of the list open their kebab menu UPWARD so it is
599     not clipped by the list's overflow scroll box (.list is overflow-y:auto,
600     which also clips the x-axis). Anchoring to the button's top edge via
601     \`bottom\` keeps the popover inside the list's visible area for bottom rows. */
602  .row.menu-up .row-menu-popover {
603    top: auto;
604    bottom: calc(100% - 4px);
605  }
606
607  .row-menu-item {
608    display: flex;
609    align-items: center;
610    gap: 8px;
611    border: 0;
612    background: transparent;
613    color: inherit;
614    cursor: pointer;
615    font: inherit;
616    text-align: left;
617    padding: 6px 8px;
618    border-radius: 4px;
619  }
620
621  .row-menu-item:hover,
622  .row-menu-item:focus-visible {
623    background: var(--_muted);
624  }
625
626  .row-menu-item.danger:hover,
627  .row-menu-item.danger:focus-visible {
628    color: var(--_danger);
629  }
630
631  .row-menu-item .row-action-icon,
632  .row-menu-item .icon {
633    width: 15px;
634    height: 15px;
635  }
636
637  button.primary {
638    background: var(--_primary);
639    color: var(--_primary-fg);
640    border: 0;
641    border-radius: var(--_radius);
642    padding: 8px 12px;
643    cursor: pointer;
644    font: inherit;
645  }
646
647  .state {
648    padding: 24px 16px;
649    text-align: center;
650    color: var(--_muted-fg);
651  }
652
653  .state.error {
654    color: var(--_danger);
655  }
656
657  .fetch-more-error {
658    padding: 8px 12px;
659    text-align: center;
660    color: var(--_danger);
661    font-size: 0.9em;
662  }
663
664  .load-more {
665    display: block;
666    width: 100%;
667    padding: 8px 12px;
668    background: none;
669    border: none;
670    color: var(--_muted-fg);
671    font: inherit;
672    font-size: 0.9em;
673    cursor: pointer;
674  }
675
676  .load-more:hover,
677  .load-more:focus-visible {
678    color: var(--_surface-fg);
679    background: var(--_muted);
680  }
681
682  .licensed {
683    padding: 24px 16px;
684    text-align: center;
685    display: flex;
686    flex-direction: column;
687    gap: 12px;
688  }
689
690  .memories {
691    border-top: 1px solid var(--_border);
692    padding: 8px 12px;
693  }
694
695  .memories[hidden] {
696    display: none;
697  }
698
699  /* Confirm-delete dialog — a native <dialog> opened with showModal(). It lives
700     in the browser TOP LAYER, so it can never be painted under other UI (the
701     old CSS-positioned overlay was trapped in the drawer host's stacking
702     context and appeared under the chat's welcome view — ENT-1051). The UA
703     centers it in the viewport via margin:auto; we reset the UA chrome and
704     apply the drawer's surface-card look. */
705  .dialog {
706    /* Top-layer (showModal) so it is never clipped, but centered over the DRAWER
707       PANEL rather than the viewport: JS sets --confirm-cx/cy from the visible
708       .root rect (falls back to viewport-center when unmeasured, e.g. jsdom).
709       Width is capped to the drawer band so it reads as "inside the drawer". */
710    margin: 0;
711    position: fixed;
712    left: var(--confirm-cx, 50%);
713    top: var(--confirm-cy, 50%);
714    transform: translate(-50%, -50%);
715    border: 0;
716    padding: 16px;
717    width: max-content;
718    max-width: min(80vw, calc(var(--_width) - 24px));
719    background: var(--_surface);
720    color: var(--_surface-fg);
721    border-radius: var(--_radius);
722  }
723
724  /* Only lay out the card contents when open. A closed <dialog> is display:none
725     via the UA stylesheet, and author display rules must not override that (or
726     an empty box would leak), so the flex layout is scoped to [open]. */
727  .dialog[open] {
728    display: flex;
729    flex-direction: column;
730    gap: 12px;
731  }
732
733  .dialog::backdrop {
734    background: rgba(0, 0, 0, 0.3);
735  }
736
737  .dialog-actions {
738    display: flex;
739    justify-content: flex-end;
740    gap: 8px;
741  }
742
743  .footer {
744    border-top: 1px solid var(--_border);
745    padding: 12px;
746  }
747
748  .footer[hidden] {
749    display: none;
750  }
751`;var o=n(52321),l=n(32973);let{I:c}=o.ge,u=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 c(r.insertBefore(d(),i),r.insertBefore(d(),i),e,e.options);else{let t=n._$AB.nextSibling,s=n._$AM,a=s!==e;if(a){let t;n._$AQ?.(e),n._$AM=e,void 0!==n._$AP&&(t=e._$AU)!==s._$AU&&n._$AP(t)}if(t!==i||a){let e=n._$AA;for(;e!==t;){let t=u(e).nextSibling;u(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=[],s=[],a=0;for(let t of e)i[a]=r?r(t,a):a,s[a]=n(t,a),a++;return{values:s,keys:i}}render(e,t,n){return this.dt(e,t,n).values}update(e,[t,n,r]){let i=e._$AH,{values:s,keys:a}=this.dt(t,n,r);if(!Array.isArray(i))return this.ut=a,s;let l=this.ut??=[],c=[],u,d,v=0,b=i.length-1,y=0,E=s.length-1;for(;v<=b&&y<=E;)if(null===i[v])v++;else if(null===i[b])b--;else if(l[v]===a[y])c[y]=p(i[v],s[y]),v++,y++;else if(l[b]===a[E])c[E]=p(i[b],s[E]),b--,E--;else if(l[v]===a[E])c[E]=p(i[v],s[E]),h(e,c[E+1],i[v]),v++,E--;else if(l[b]===a[y])c[y]=p(i[b],s[y]),h(e,i[v],i[b]),b--,y++;else if(void 0===u&&(u=g(a,y,E),d=g(l,v,b)),u.has(l[v]))if(u.has(l[b])){let t=d.get(a[y]),n=void 0!==t?i[t]:null;if(null===n){let t=h(e,i[v]);p(t,s[y]),c[y]=t}else c[y]=p(n,s[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,c[E+1]);p(t,s[y]),c[y++]=t}for(;v<=b;){let e=i[v++];null!==e&&m(e)}return this.ut=a,((e,t=f)=>e._$AH=t)(e,c),o.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 o.c0}}),y="copilotkit-threads-drawer";function E(e){return null!==e&&e.trim().length>0}let T=(0,r.qy)`
752  <svg
753    class="row-action-icon"
754    viewBox="0 0 24 24"
755    fill="none"
756    stroke="currentColor"
757    stroke-width="2"
758    stroke-linecap="round"
759    stroke-linejoin="round"
760    aria-hidden="true"
761  >
762    <rect width="20" height="5" x="2" y="3" rx="1" />
763    <path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8" />
764    <path d="M10 12h4" />
765  </svg>
766`,_=(0,r.qy)`
767  <svg
768    class="row-action-icon"
769    viewBox="0 0 24 24"
770    fill="none"
771    stroke="currentColor"
772    stroke-width="2"
773    stroke-linecap="round"
774    stroke-linejoin="round"
775    aria-hidden="true"
776  >
777    <rect width="20" height="5" x="2" y="3" rx="1" />
778    <path d="M4 8v11a2 2 0 0 0 2 2h2" />
779    <path d="M20 8v11a2 2 0 0 1-2 2h-2" />
780    <path d="m9 15 3-3 3 3" />
781    <path d="M12 12v9" />
782  </svg>
783`,k=(0,r.qy)`
784  <svg
785    class="row-action-icon"
786    viewBox="0 0 24 24"
787    fill="none"
788    stroke="currentColor"
789    stroke-width="2"
790    stroke-linecap="round"
791    stroke-linejoin="round"
792    aria-hidden="true"
793  >
794    <path d="M3 6h18" />
795    <path
796      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"
797    />
798    <line x1="10" x2="10" y1="11" y2="17" />
799    <line x1="14" x2="14" y1="11" y2="17" />
800  </svg>
801`,A=(0,r.qy)`
802  <svg
803    class="icon"
804    viewBox="0 0 24 24"
805    fill="none"
806    stroke="currentColor"
807    stroke-width="2"
808    stroke-linecap="round"
809    stroke-linejoin="round"
810    aria-hidden="true"
811  >
812    <rect width="18" height="18" x="3" y="3" rx="2" />
813    <path d="M9 3v18" />
814  </svg>
815`,x=(0,r.qy)`
816  <svg
817    class="icon"
818    viewBox="0 0 24 24"
819    fill="none"
820    stroke="currentColor"
821    stroke-width="2"
822    stroke-linecap="round"
823    stroke-linejoin="round"
824    aria-hidden="true"
825  >
826    <rect width="18" height="18" x="3" y="3" rx="2" />
827    <path d="M8 12h8" />
828    <path d="M12 8v8" />
829  </svg>
830`,S=(0,r.qy)`
831  <svg
832    class="icon"
833    viewBox="0 0 24 24"
834    fill="none"
835    stroke="currentColor"
836    stroke-width="2"
837    stroke-linecap="round"
838    stroke-linejoin="round"
839    aria-hidden="true"
840  >
841    <line x1="3" y1="5" x2="21" y2="5" />
842    <line x1="6" y1="12" x2="18" y2="12" />
843    <line x1="10" y1="19" x2="14" y2="19" />
844  </svg>
845`,w=(0,r.qy)`
846  <svg class="icon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
847    <circle cx="12" cy="5" r="1.6" />
848    <circle cx="12" cy="12" r="1.6" />
849    <circle cx="12" cy="19" r="1.6" />
850  </svg>
851`;var I=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=a}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");
851if(!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,s=Math.max(n.left,0),a=Math.min(n.right,r),o=Math.max(n.top,0),l=Math.min(n.bottom,i);e.style.setProperty("--confirm-cx",`${(s+a)/2}px`),e.style.setProperty("--confirm-cy",`${(o+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)`
852      ${n?this._renderCluster():r.s6}
853      ${this._isMobileModalOpen()?(0,r.qy)`<button
854            class="backdrop"
855            part="backdrop"
856            aria-label="Close threads drawer"
857            @click=${()=>this._setOpen(!1)}
858          ></button>`:r.s6}
859      <div
860        class=${b(i)}
861        part="root"
862        role=${this._isMobileModalOpen()?"dialog":"region"}
863        aria-modal=${this._isMobileModalOpen()?"true":r.s6}
864        aria-hidden=${e?"true":r.s6}
865        aria-label=${this.label}
866      >
867        ${e?r.s6:(0,r.qy)`${this._renderHeader()} ${this._renderBody()}
868              ${this._renderMemories()} ${this._renderFooter()}
869              ${this._renderConfirmDialog()}`}
870      </div>
871    `}_renderCluster(){let e=this._viewportIsMobile?()=>this._setOpen(!0):()=>this._setCollapsed(!1);return(0,r.qy)`
872      <div class="launcher-cluster" part="launcher-cluster">
873        <button
874          class="launcher"
875          part="launcher"
876          aria-label=${this._viewportIsMobile?"Open threads":"Expand threads"}
877          @click=${e}
878        >
879          <slot name="launcher-icon">${A}</slot>
880        </button>
881        ${this.licensed?(0,r.qy)`<button
882                class="launcher launcher-new-thread"
883                part="launcher-new-thread"
884                aria-label="New Conversation"
885                @click=${()=>this._emit("new-thread",{})}
886              >
887                ${x}
888              </button>`:r.s6}
889      </div>
890    `}_renderHeader(){let e=this._viewportIsMobile&&this.open,t=this.collapsible&&!this._viewportIsMobile;return(0,r.qy)`
891      <div
892        class="header"
893        part="header"
894        ?hidden=${!this._hasHeader&&!e&&!t}
895      >
896        <slot
897          name="header"
898          @slotchange=${e=>{this._hasHeader=e.target.assignedElements().length>0}}
899        ></slot>
900        ${t?(0,r.qy)`<button
901              class="icon-btn"
902              part="collapse-toggle"
903              aria-label="Collapse threads"
904              @click=${()=>this._setCollapsed(!0)}
905            >
906              ${A}
907            </button>`:r.s6}
908        ${e?(0,r.qy)`<button
909              class="icon-btn"
910              part="close-toggle"
911              aria-label="Close threads"
912              @click=${()=>this._setOpen(!1)}
913            >
914              ${A}
915            </button>`:r.s6}
916      </div>
917      ${this.licensed?this._renderNewConversation():r.s6}
918      ${this._renderSectionHeading()}
919    `}_renderNewConversation(){return(0,r.qy)`
920      <button
921        class="new-conversation"
922        part="new-thread-button"
923        @click=${()=>this._emit("new-thread",{})}
924      >
925        ${x}
926        <span>New Conversation</span>
927      </button>
928    `}_renderSectionHeading(){return!this.licensed||E(this.error)&&0===this.threads.length?r.s6:(0,r.qy)`
929      <div class="section-heading" part="section-heading">
930        <span class="section-title">${this.recentLabel}</span>
931        <button
932          class="icon-btn small"
933          part="filter-toggle"
934          aria-label="Filter threads"
935          aria-expanded=${this._filterOpen}
936          @click=${()=>this._filterOpen=!this._filterOpen}
937        >
938          ${S}
939          ${"active"!==this._filter?(0,r.qy)`
940                  <span class="filter-dot" part="filter-indicator"></span>
941                `:r.s6}
942        </button>
943        ${this._filterOpen?(0,r.qy)`<div
944              class="filter-popover"
945              part="filters"
946              role="group"
947              aria-label="Filter threads"
948            >
949              <button
950                class="filter-opt"
951                part="filter-active"
952                aria-pressed=${"active"===this._filter}
953                @click=${()=>{this._setFilter("active"),this._filterOpen=!1}}
954              >
955                Active
956              </button>
957              <button
958                class="filter-opt"
959                part="filter-all"
960                aria-pressed=${"all"===this._filter}
961                @click=${()=>{this._setFilter("all"),this._filterOpen=!1}}
962              >
963                All
964              </button>
965            </div>`:r.s6}
966      </div>
967    `}_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)`
968      <div class="licensed" part="licensed" data-testid="drawer-licensed">
969        <slot name="licensed">
970          <p>Threads are a CopilotKit Intelligence feature.</p>
971          <button
972            class="primary"
973            part="licensed-cta"
974            @click=${()=>this._onLicensedCta()}
975          >
976            Upgrade
977          </button>
978        </slot>
979      </div>
980    `}_renderError(){return(0,r.qy)`
981      <div
982        class="state error"
983        part="error"
984        role="alert"
985        data-testid="drawer-error"
986      >
987        <p>${this.error}</p>
988        <button
989          class="primary"
990          part="retry-button"
991          @click=${()=>this._emit("retry",{scope:"initial"})}
992        >
993          Retry
994        </button>
995      </div>
996    `}_renderLoading(){return(0,r.qy)`
997      <div class="state" part="loading" data-testid="drawer-loading" aria-busy="true">
998        Loading threads…
999      </div>
1000    `}_renderList(){let e=this._visibleThreads();return 0===e.length?(0,r.qy)`
1001        <div class="state" part="empty" data-testid="drawer
1001-empty">
1002          <slot name="empty">No threads yet.</slot>
1003        </div>
1004      `:(0,r.qy)`
1005      <ul
1006        class=${null!==this._openMenuId?"list menu-open":"list"}
1007        part="list"
1008        role="listbox"
1009        aria-label=${this.label}
1010      >
1011        ${v(e,e=>e.id,(t,n)=>this._renderRow(t,n,e.length))}
1012      </ul>
1013      ${this._renderFetchMore()}
1014    `}_renderRow(e,t=0,n=1){var i;let s=e.id===this.activeThreadId,a=null!==e.name&&""!==e.name,o=a?e.name:"New thread",l=this._justRevealed.has(e.id),c=this._openMenuId===e.id,u={row:!0,active:s,archived:e.archived,"menu-open":c,"menu-up":c&&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:!a,revealed:l})} part="row-name">
1015      <span class="row-name-text">${o}</span>
1016    </span>`;return(0,r.qy)`
1017      <li
1018        class=${b(u)}
1019        part=${s?"row row-active":"row"}
1020        role="option"
1021        aria-selected=${s?"true":"false"}
1022        tabindex="0"
1023        data-thread-id=${e.id}
1024        @click=${()=>{this._openMenuId=null,this._emit("thread-selected",{threadId:e.id})}}
1025        @keydown=${t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),this._openMenuId=null,this._emit("thread-selected",{threadId:e.id}))}}
1026      >
1027        ${null!==d?(0,r.qy)`<slot name=${d}>${h}</slot>`:h}
1028        <button
1029          class="row-menu"
1030          part="row-menu"
1031          aria-label=${`Actions for ${o}`}
1032          aria-haspopup="menu"
1033          aria-expanded=${c}
1034          @click=${t=>{t.stopPropagation(),this._openMenuId=c?null:e.id}}
1035        >
1036          ${w}
1037        </button>
1038        ${c?(0,r.qy)`<div
1039              class="row-menu-popover"
1040              part="row-menu-popover"
1041              role="menu"
1042            >
1043              ${e.archived?(0,r.qy)`<button
1044                    class="row-menu-item"
1045                    part="row-unarchive"
1046                    role="menuitem"
1047                    aria-label=${`Unarchive thread ${o}`}
1048                    @click=${t=>{t.stopPropagation(),this._openMenuId=null,this._emit("unarchive",{threadId:e.id})}}
1049                  >
1050                    ${_}<span>Unarchive</span>
1051                  </button>`:(0,r.qy)`<button
1052                    class="row-menu-item"
1053                    part="row-archive"
1054                    role="menuitem"
1055                    aria-label=${`Archive thread ${o}`}
1056                    @click=${t=>{t.stopPropagation(),this._openMenuId=null,this._emit("archive",{threadId:e.id})}}
1057                  >
1058                    ${T}<span>Archive</span>
1059                  </button>`}
1060              <button
1061                class="row-menu-item danger"
1062                part="row-delete"
1063                role="menuitem"
1064                aria-label=${`Delete thread ${o}`}
1065                @click=${t=>{t.stopPropagation(),this._openMenuId=null,this._confirmingDeleteId=e.id}}
1066              >
1067                ${k}<span>Delete</span>
1068              </button>
1069            </div>`:r.s6}
1070      </li>
1071    `}_renderFetchMore(){return E(this.fetchMoreError)?(0,r.qy)`
1072        <div class="fetch-more-error" part="fetch-more-error" role="alert">
1073          Couldn't load more —
1074          <button
1075            class="row-action"
1076            part="fetch-more-retry"
1077            @click=${()=>this._emit("retry",{scope:"fetch-more"})}
1078          >
1079            retry
1080          </button>
1081        </div>
1082      `:this.fetchingMore?(0,r.qy)`
1083        <div class="state" part="fetching-more" aria-busy="true">Loading more…</div>
1084      `:this.hasMore?(0,r.qy)`
1085        <button
1086          class="load-more"
1087          part="load-more"
1088          @click=${()=>this._emit("load-more",{})}
1089        >
1090          Load more
1091        </button>
1092      `:r.s6}_renderMemories(){return(0,r.qy)`
1093      <div class="memories" part="memories" ?hidden=${!this._hasMemories}>
1094        <slot
1095          name="memories"
1096          @slotchange=${e=>{this._hasMemories=e.target.assignedElements().length>0}}
1097        ></slot>
1098      </div>
1099    `}_renderFooter(){return(0,r.qy)`
1100      <div class="footer" part="footer" ?hidden=${!this._hasFooter}>
1101        <slot
1102          name="footer"
1103          @slotchange=${e=>{this._hasFooter=e.target.assignedElements().length>0}}
1104        ></slot>
1105      </div>
1106    `}_renderConfirmDialog(){let e=this._confirmingDeleteId;return(0,r.qy)`
1107      <dialog
1108        class="dialog"
1109        part="confirm-dialog"
1110        role="alertdialog"
1111        aria-label="Confirm delete"
1112        data-testid="drawer-confirm-delete"
1113        @cancel=${e=>{e.preventDefault(),this._confirmingDeleteId=null}}
1114        @click=${e=>{e.target===e.currentTarget&&(this._confirmingDeleteId=null)}}
1115      >
1116        ${null!==e?(0,r.qy)`
1117                <p>Delete this thread? This cannot be undone.</p>
1118                <div class="dialog-actions">
1119                  <button
1120                    class="row-action"
1121                    part="confirm-cancel"
1122                    @click=${()=>this._confirmingDeleteId=null}
1123                  >
1124                    Cancel
1125                  </button>
1126                  <button
1127                    class="primary"
1128                    part="confirm-delete"
1129                    @click=${()=>{this._confirmingDeleteId=null,this._emit("delete",{threadId:e})}}
1130                  >
1131                    Delete
1132                  </button>
1133                </div>
1134              `:r.s6}
1135      </dialog>
1136    `}};function N(){"undefined"==typeof customElements||customElements.get(y)||customElements.define(y,I)}},38220:(e,t,n)=>{n.d(t,{y:()=>s});var r=n(17032);let i={}.hasOwnProperty;function s(e){let t={},n=-1;for(;++n<e.length;)!function(e,t){let n;for(n in t){let s,a=(i.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];if(o)for(s in o){i.call(a,s)||(a[s]=[]);let e=o[s];!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)}(a[s],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}},39754:(e,t,n)=>{n.d(t,{m:()=>i});let r=/[ \t\n\f\r]/g;function i(e){return"object"==typeof e?"text"===e.type&&s(e.value):s(e)}function s(e){return""===e.replace(r,"")}},40712:(e,t,n)=>{n.d(t,{$:()=>s});var r=n(45037),i=n(39097);function s(e,t){var n=(0,i.T)(e)?e:function(){return e},s=function(e){return e.error(n())};return new r.c(t?function(e){return t.schedule(s,0,e)}:s)}},41006:(e,t,n)=>{n.d(t,{W:()=>r});function r(e,t,n){let r=[],i=-1;for(;++i<e.length;){let s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}},41370:(e,t,n)=>{n.d(t,{R:()=>r});class r{constructor(e,t){this.attribute=t,this.property=e}}r.prototype.attribute="",r.prototype.booleanish=!1,r.prototype.boolean=!1,r.prototype.commaOrSpaceSeparated=!1,r.prototype.commaSeparated=!1,r.prototype.defined=!1,r.prototype.mustUseProperty=!1,r.prototype.number=!1,r.prototype.overloadedBoolean=!1,r.prototype.property="",r.prototype.spaceSeparated=!1,r.prototype.space=void 0},41423:(e,t,n)=>{n.d(t,{Q:()=>a});var r=n(20437),i=n(96948),s=n(28400);function a(e,t){return void 0===t&&(t=0),(0,i.N)(function(n,i){n.subscribe((0,s._)(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:()=>o,Uv:()=>c});var r=n(71450),i=n(39097),s=(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}}),a=n(12668),o=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,a,o,l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var c=(0,r.Ju)(l),d=c.next();!d.done;d=c.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}else l.remove(this);var h=this.initialTeardown;if((0,i.T)(h))try{h()}catch(e){o=e instanceof s?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{u(g)}catch(e){o=null!=o?o:[],e instanceof s?o=(0,r.fX)((0,r.fX)([],(0,r.zs)(o)),(0,r.zs)(e.errors)):o.push(e)}}}catch(e){n={error:e}}finally{try{m&&!m.done&&(a=f.return)&&a.call(f)}finally{if(n)throw n.error}}}if(o)throw new s(o)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)u(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,a.o)(t,e)},t.prototype.remove=function(e){var n=this._finalizers;n&&(0,a.o)(n,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}
1136(),l=o.EMPTY;function c(e){return e instanceof o||e&&"closed"in e&&(0,i.T)(e.remove)&&(0,i.T)(e.add)&&(0,i.T)(e.unsubscribe)}function u(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)}},42764:(e,t,n)=>{n.d(t,{p:()=>s});var r=n(96948),i=n(28400);function s(e,t){return(0,r.N)(function(n,r){var s=0;n.subscribe((0,i._)(r,function(n){return e.call(t,n,s++)&&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:()=>o});var r=n(96948),i=n(28400),s=n(8286),a=n(34793);function o(e){return(0,r.N)(function(t,n){(0,s.Tg)(e).subscribe((0,i._)(n,function(){return n.complete()},a.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:()=>s});var r=n(45037),i=n(34793),s=new r.c(i.l)},44193:(e,t,n)=>{n.d(t,{G:()=>s,eq:()=>i});var r=n(88658);
1136let 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 s 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 s))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()}}s.create=e=>new s(e)},44289:(e,t,n)=>{n.d(t,{q:()=>a});var r=n(71450),i=n(91239),s=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}(),a=function(e){function t(t,n){void 0===n&&(n=s.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}(s)},44379:(e,t,n)=>{let r;function i(e,...t){return"function"==typeof e?e(...t):e}n.d(t,{xG:()=>A});var s=class{#e=!0;#t;#n;#r;#i;#s;#a;#o;#l=0;#c=5;#u=!1;#d=!1;#h=null;#p=()=>{this.debugLog("Connected to event bus"),this.#s=!0,this.#u=!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.#c){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.#u||(this.#u=!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.#s=!1,this.#d=!1,this.#a=null,this.#o=r}startConnectLoop(){null!==this.#a||this.#s||(this.debugLog(`Starting connect loop (every ${this.#o}ms)`),this.#a=setInterval(this.#f,this.#o))}stopConnectLoop(){this.#u=!1,null!==this.#a&&(clearInterval(this.#a),this.#a=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.#s){this.debugLog("Bus not available, will be pushed as soon as connected"),this.#i.push(this.createEventPayload(e,t)),"undefined"==typeof CustomEvent||this.#u||(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 s=e=>{this.debugLog("Received event from bus",e.detail),t(e.detail)};return this.#n().addEventListener(i,s),this.debugLog("Registered event to bus",i),()=>{r&&this.#h?.removeEventListener(i,s),this.#n().removeEventListener(i,s)}}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 a=new Map;function o(e){if(void 0!==e)try{return JSON.parse(JSON.stringify(e))}catch{return null}}let l=new class extends s{constructor(e){super({pluginId:"pacer",debug:e?.debug,reconnectEveryMs:1e3})}};var c=(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))(c||{});function u(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 s=e.subsTail;if(void 0!==s&&s.version===n&&s.sub===t)return;let a=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:s,nextSub:void 0};void 0!==i&&(i.prevDep=a),void 0!==r?r.nextDep=a:t.deps=a,void 0!==s?s.nextSub=a:e.subs=a},unlink:function(e,t=e.sub){let r=e.dep,i=e.prevDep,s=e.nextDep,a=e.nextSub,o=e.prevSub;return void 0!==s?s.prevDep=i:t.depsTail=i,void 0!==i?i.nextDep=s:t.deps=s,void 0!==a?a.prevSub=o:r.subsTail=o,void 0!==o?o.nextSub=a:void 0===(r.subs=a)&&n(r),s},propagate:function(e){let n,r=e.nextSub;e:for(;;){let i=e.sub,s=i.flags;if(60&s?12&s?4&s?!(48&s)&&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|s,s&=1):s=0:i.flags=-9&s|32:s=0:i.flags=32|s,2&s&&t(i),1&s){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;
1136)if(e=n.value,n=n.prev,void 0!==e){r=e.nextSub;continue e}break}},checkDirty:function(t,n){let i,s=0,a=!1;e:for(;;){let o=t.dep,l=o.flags;if(16&n.flags)a=!0;else if((17&l)==17){if(e(o)){let e=o.subs;void 0!==e.nextSub&&r(e),a=!0}}else if((33&l)==33){(void 0!==t.nextSub||void 0!==t.prevSub)&&(i={value:t,prev:i}),t=o.deps,n=o,++s;continue}if(!a){let e=t.nextDep;if(void 0!==e){t=e;continue}}for(;s--;){let s=n.subs,o=void 0!==s.nextSub;if(o?(t=i.value,i=i.prev):t=s,a){if(e(n)){o&&r(s),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let l=t.nextDep;if(void 0!==l){t=l;continue e}}return a}},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&=~c.Watching},unwatched(e){void 0!==e.depsTail&&(e.depsTail=void 0,e.flags=c.Mutable|c.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?c.None:c.Mutable,get:()=>(void 0!==r&&p(i,r,h),i._snapshot),subscribe(e){let t=u(e),n={current:!1},s=function(e){let t=()=>{let t=r;r=n,++h,n.depsTail=void 0,n.flags=c.Watching|c.RecursedCheck;try{return e()}finally{r=t,n.flags&=~c.RecursedCheck,E(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:c.Watching|c.RecursedCheck,notify(){let e=this.flags;e&c.Dirty||e&c.Pending&&g(this.deps,this)?t():this.flags=c.Watching},stop(){this.flags=c.None,this.depsTail=void 0,E(this)}};return t(),n}(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{s.stop()}}},_update(t){let s=r,a=(void 0)??Object.is;if(n)r=i,++h,i.depsTail=void 0;else if(void 0===t)return!1;n&&(i.flags=c.Mutable|c.RecursedCheck);try{let r=i._snapshot,s="function"==typeof t?t(r):void 0===t&&n?e(r):t;if(void 0===r||!a(r,s))return i._snapshot=s,!0;return!1}finally{r=s,n&&(i.flags&=~c.RecursedCheck),E(i)}}};return n?(i.flags=c.Mutable|c.Dirty,i.get=function(){let e=i.flags;if(e&c.Dirty||e&c.Pending&&g(i.deps,i)){if(i._update()){let e=i.subs;void 0!==e&&v(e)}}else e&c.Pending&&(i.flags=e&~c.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(u(e))}}function _(){return{executionCount:0,isPending:!1,lastArgs:void 0,lastExecutionTime:0,nextExecutionTime:0,status:"idle",maybeExecuteCount:0}}let k={enabled:!0,leading:!0,trailing:!0,wait:0};var A=class{#g;constructor(e,t){this.fn=e,this.store=new T(_()),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(_())},this.key=t.key,this.options={...k,...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&&(a.set(n,t),l.emit(e,function(e){var t;return{key:e.key,store:{state:o("function"==typeof(t=e.store).get?t.get():t.state)},options:o(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)}}}
1136,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)},s=e=>((e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=s=>{if(e.has(s))return e.get(s);let[a,o]=t[s];switch(a){case 0:case -1:return n(o,s);case 1:{let e=n([],s);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},s);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),s);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),s)}case 5:{let e=n(new Map,s);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,s);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(i(e,t),s)}case 8:return n(BigInt(o),s);case"BigInt":return n(Object(BigInt(o)),s);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(i(a,o),s)};return r})(new Map,e)(0),{toString:a}={},{keys:o}=Object,l=e=>{let t=typeof e;if("object"!==t||!e)return[0,t];let n=a.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]},c=([e,t])=>0===e&&("function"===t||"symbol"===t),u=(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},s=r=>{if(n.has(r))return n.get(r);let[a,u]=l(r);switch(a){case 0:{let t=r;switch(u){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw TypeError("unable to serialize "+u);t=null;break;case"undefined":return i([-1],r)}return i([a,t],r)}case 1:{if(u){let e=r;return"DataView"===u?e=new Uint8Array(r.buffer):"ArrayBuffer"===u&&(e=new Uint8Array(r)),i([u,[...e]],r)}let e=[],t=i([a,e],r);for(let t of r)e.push(s(t));return t}case 2:{if(u)switch(u){case"BigInt":return i([u,r.toString()],r);case"Boolean":case"Number":case"String":return i([u,r.valueOf()],r)}if(t&&"toJSON"in r)return s(r.toJSON());let n=[],d=i([a,n],r);for(let t of o(r))(e||!c(l(r[t])))&&n.push([s(t),s(r[t])]);return d}case 3:return i([a,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([a,{source:e,flags:t}],r)}case 5:{let t=[],n=i([a,t],r);
1136for(let[n,i]of r)(e||!(c(l(n))||c(l(i))))&&t.push([s(n),s(i)]);return n}case 6:{let t=[],n=i([a,t],r);for(let n of r)(e||!c(l(n)))&&t.push(s(n));return n}}let{message:d}=r;return i([a,{name:u,message:d}],r)};return s})(!(t||n),!!t,new Map,r)(e),r},d="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?s(u(e,t)):structuredClone(e):(e,t)=>s(u(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),s=n(92556),a=n(97602),o=n(94446),l=n(70222),c=n(95155),u="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,..._}=e,k=i.useContext(d),[A,x]=i.useState(null),S=null!=(h=null==A?void 0:A.ownerDocument)?h:null==(n=globalThis)?void 0:n.document,[,w]=i.useState({}),I=(0,o.s)(t,e=>x(e)),N=Array.from(k.layers),[C]=[...k.layersWithOutsidePointerEventsDisabled].slice(-1),O=N.indexOf(C),R=A?N.indexOf(A):-1,D=k.layersWithOutsidePointerEventsDisabled.size>0,L=R>=O,M=i.useRef(!1),P=function(e,t){var n;let{ownerDocument:r=null==(n=globalThis)?void 0:n.document,deferPointerDownOutside:s=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:o}=t,c=(0,l.c)(e),u=i.useRef(!1),d=i.useRef(!1),h=i.useRef(new Map),p=i.useRef(()=>{});return i.useEffect(()=>{function e(){d.current=!1,a.current=!1,h.current.clear()}function t(e){if(!d.current)return;let t=e.target;t instanceof Node&&[...o].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&&!u.current){let n=function(){r.removeEventListener("click",p.current);let t=Array.from(h.current.values()).some(Boolean);e(),t||f("dismissableLayer.pointerDownOutside",c,i,{discrete:!0})},i={originalEvent:t};d.current=!0,a.current=s&&0===t.button,h.current.clear(),s&&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();u.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,c,s,a,o]),{onPointerDownCapture:()=>u.current=!0}}(e=>{let t=e.target;if(!(t instanceof Node))return;let n=[...k.branches].some(e=>e.contains(t));L&&!n&&(null==b||b(e),null==E||E(e),e.defaultPrevented||null==T||T())},{ownerDocument:S,deferPointerDownOutside:g,isDeferredPointerDownOutsideRef:M,dismissableSurfaces:k.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),s=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!s.current&&f("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}(e=>{if(g&&M.current)return;let t=e.target;![...k.branches].some(e=>e.contains(t))&&(null==y||y(e),null==E||E(e),e.defaultPrevented||null==T||T())},S);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===k.layers.size-1&&(null==v||v(e),!e.defaultPrevented&&T&&(e.preventDefault(),T()))},S),i.useEffect(()=>{if(A)return m&&(0===k.layersWithOutsidePointerEventsDisabled.size&&(r=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),k.layersWithOutsidePointerEventsDisabled.add(A)),
1136k.layers.add(A),p(),()=>{m&&(k.layersWithOutsidePointerEventsDisabled.delete(A),0===k.layersWithOutsidePointerEventsDisabled.size&&(S.body.style.pointerEvents=r))}},[A,S,m,k]),i.useEffect(()=>()=>{A&&(k.layers.delete(A),k.layersWithOutsidePointerEventsDisabled.delete(A),p())},[A,k]),i.useEffect(()=>{let e=()=>w({});return document.addEventListener(u,e),()=>document.removeEventListener(u,e)},[]),(0,c.jsx)(a.sG.div,{..._,ref:I,style:{pointerEvents:D?L?"auto":"none":void 0,...e.style},onFocusCapture:(0,s.mK)(e.onFocusCapture,F.onFocusCapture),onBlurCapture:(0,s.mK)(e.onBlurCapture,F.onBlurCapture),onPointerDownCapture:(0,s.mK)(e.onPointerDownCapture,P.onPointerDownCapture)})});function p(){let e=new CustomEvent(u);document.dispatchEvent(e)}function f(e,t,n,r){let{discrete:i}=r,s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),i?(0,a.hO)(s,o):s.dispatchEvent(o)}h.displayName="DismissableLayer",i.forwardRef((e,t)=>{let n=i.useContext(d),r=i.useRef(null),s=(0,o.s)(t,r);return i.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,c.jsx)(a.sG.div,{...e,ref:s})}).displayName="DismissableLayerBranch"},45037:(e,t,n)=>{n.d(t,{c:()=>u});var r=n(28786),i=n(41449),s=n(60488),a=n(89577),o=n(29846),l=n(39097),c=n(75968),u=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 s=this,a=!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,c.Y)(function(){var e=s.operator,t=s.source;a.add(e?e.call(a,t):t?s._subscribe(a):s._trySubscribe(a))}),a},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 s=new r.Ms({next:function(t){try{e(t)}catch(e){i(e),s.unsubscribe()}},error:i,complete:t});n.subscribe(s)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[s.s]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,a.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:o.$.Promise)?t:Promise}},45150:(e,t,n)=>{n.d(t,{Ar:()=>nN,qB:()=>nC,N4:()=>t0,BR:()=>nt,I$:()=>tJ,bt:()=>ng,l8:()=>nn});var r,i={};n.r(i),n.d(i,{JsonPatchError:()=>b,_areEquals:()=>I,applyOperation:()=>k,applyPatch:()=>A,applyReducer:()=>x,deepClone:()=>y,getValueByPointer:()=>_,validate:()=>w,validator:()=>S});var s={};n.r(s),n.d(s,{compare:()=>P,generate:()=>L,observe:()=>D,unobserve:()=>R});var a=n(33859),o=n(48204),l=function(){var e=function(t,n){return(e=Object.setPrototypeOf||({__proto__:[]})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)}}(),c=Object.prototype.hasOwnProperty;function u(e,t){return c.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)u(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,s){var a=this.constructor,o=e.call(this,g(t,{name:n,index:r,operation:i,tree:s}))||this;return o.name=n,o.index=r,o.operation=i,o.tree=s,Object.setPrototypeOf(o,a.prototype),o.message=g(t,{name:n,index:r,operation:i,tree:s}),o}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=_(n,this.path);r&&(r=h(r));var i=k(n,{op:"remove",path:this.from}).removed;return k(n,{op:"add",path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=_(n,this.from);return k(n,{op:"add",path:this.path,value:h(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:I(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}}
1136,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 _(e,t){if(""==t)return e;var n={op:"_get",path:t};return k(e,n),n.value}function k(e,t,n,r,i,s){if(void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===i&&(i=!0),void 0===s&&(s=0),n&&("function"==typeof n?n(t,0,e,t.path):S(t,0)),""===t.path){var a={newDocument:e};if("add"===t.op)return a.newDocument=t.value,a;if("replace"===t.op)return a.newDocument=t.value,a.removed=e,a;if("move"===t.op||"copy"===t.op)return a.newDocument=_(e,t.from),"move"===t.op&&(a.removed=e),a;else if("test"===t.op){if(a.test=I(e,t.value),!1===a.test)throw new b("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return a.newDocument=e,a}else if("remove"===t.op)return a.removed=e,a.newDocument=null,a;else if("_get"===t.op)return t.value=e,a;else if(!n)return a;else throw new b("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,t,e)}r||(e=h(e));var o=(t.path||"").split("/"),l=e,c=1,u=o.length,d=void 0,f=void 0,g=void 0;for(g="function"==typeof n?n:S;;){if((f=o[c])&&-1!=f.indexOf("~")&&(f=m(f)),i&&("__proto__"==f||"prototype"==f&&c>0&&"constructor"==o[c-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=o.slice(0,c).join("/"):c==u-1&&(d=t.path),void 0!==d&&g(t,0,e,d)),c++,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",s,t,e);else p(f)&&(f=~~f);if(c>=u){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",s,t,e);var a=T[t.op].call(t,l,f,e);if(!1===a.test)throw new b("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return a}}else if(c>=u){var a=E[t.op].call(t,l,f,e);if(!1===a.test)throw new b("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return a}if(l=l[f],n&&c<u&&(!l||"object"!=typeof l))throw new b("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,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 s=Array(t.length),a=0,o=t.length;a<o;a++)s[a]=k(e,t[a],n,!0,i,a),e=s[a].newDocument;return s.newDocument=e,s}function x(e,t,n){var r=k(e,t);if(!1===r.test)throw new b("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function S(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),s=i.length,a=0;a<s;a++)if(e(t[i[a]]))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,s=r.split("/").length;if(i!==s+1&&i!==s)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 a=w([{op:"_get",path:e.from,value:void 0}],n);if(a&&"OPERATION_PATH_UNRESOLVABLE"===a.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 w(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||S;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 I(e,t){if(e===t)return!0;
1136if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,r,i,s=Array.isArray(e),a=Array.isArray(t);if(s&&a){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!I(e[n],t[n]))return!1;return!0}if(s!=a)return!1;var o=Object.keys(e);if((r=o.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!t.hasOwnProperty(o[n]))return!1;for(n=r;0!=n--;)if(!I(e[i=o[n]],t[i]))return!1;return!0}return e!=e&&t!=t}var N=new WeakMap,C=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=N.get(e);if(n){var r,i=n.observers.get(t);r=i&&i.observer}else n=new C(e),N.set(e,n);if(r)return r;if(r={},n.value=h(e),t){r.callback=t,r.next=null;var s=function(){L(r)},a=function(){clearTimeout(r.next),r.next=setTimeout(s)};"undefined"!=typeof window&&(window.addEventListener("mouseup",a),window.addEventListener("keyup",a),window.addEventListener("mousedown",a),window.addEventListener("keydown",a),window.addEventListener("change",a))}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",a),window.removeEventListener("keyup",a),window.removeEventListener("mousedown",a),window.removeEventListener("keydown",a),window.removeEventListener("change",a))},n.observers.set(t,new O(t,r)),r}function L(e,t){void 0===t&&(t=!1);var n=N.get(e.object);M(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 M(e,t,n,r,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var s=d(t),a=d(e),o=!1,l=a.length-1;l>=0;l--){var c=a[l],p=e[c];if(u(t,c)&&(void 0!==t[c]||void 0===p||!1!==Array.isArray(t))){var m=t[c];"object"==typeof p&&null!=p&&"object"==typeof m&&null!=m&&Array.isArray(p)===Array.isArray(m)?M(p,m,n,r+"/"+f(c),i):p!==m&&(i&&n.push({op:"test",path:r+"/"+f(c),value:h(p)}),n.push({op:"replace",path:r+"/"+f(c),value:h(m)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:"test",path:r+"/"+f(c),value:h(p)}),n.push({op:"remove",path:r+"/"+f(c)}),o=!0):(i&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(o||s.length!=a.length)for(var l=0;l<s.length;l++){var c=s[l];u(e,c)||void 0===t[c]||n.push({op:"add",path:r+"/"+f(c),value:h(t[c])})}}}function P(e,t,n){void 0===n&&(n=!1);var r=[];return M(e,t,r,"",n),r}let F=Object.assign({},i,s,{JsonPatchError:v,deepClone:h,escapePathComponent:f,unescapePathComponent:m});var j=n(85755),B=n(47211),U=n(40712),H=n(78242),$=n(78842),G=n(45037),z=n(31536),Y=n(37305),q=n(64354),W=n(29396),V=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),es=n(29279);function ea(e){return" \r\n	".indexOf(e)>=0}function eo(e){for(var t,n,r,i=["topLevel"],s=0,a=function(e){return i.push(e)},o=function(e){return i[i.length-1]=e},l=function(e){null==t&&(t=s,n=i.length,r=e)},c=function(e){e===r&&(t=void 0,n=void 0,r=void 0)},u=function(){return i.pop()},d=function(){return s--},h=function(e){if("0"<=e&&e<="9")return void a("number");switch(e){case'"':a("string");return;case"-":a("numberNeedsDigit");return;case"t":a("true");return;case"f":a("false");return;case"n":a("null");return;case"[":a("arrayNeedsValue");return;case"{":a("objectNeedsKey");return}},p=e.length;s<p;s++){var f=e[s];switch(i[i.length-1]){case"topLevel":h(f);break;case"string":switch(f){case'"':u();break;case"\\":l("stringEscape"),a("stringEscaped")}break;case"stringEscaped":"u"===f?a("stringUnicode"):(c("stringEscape"),u());break;case"stringUnicode":s-e.lastIndexOf("u",s)==4&&(c("stringEscape"),u());break;case"number":"."===f?o("numberNeedsDigit"):"e"===f||"E"===f?o("numberNeedsExponent"):(f<"0"||f>"9")&&(d(),u());break;case"numberNeedsDigit":o("number");break;case"numberNeedsExponent":o("+"===f||"-"===f?"numberNeedsDigit":"number");break;case"true":case"false":case"null":(f<"a"||f>"z")&&(d(),u());break;case"arrayNeedsValue":"]"===f?u():ea(f)||(c("collectionItem"),o("arrayNeedsComma"),h(f));break;
1136case"arrayNeedsComma":"]"===f?u():","===f&&(l("collectionItem"),o("arrayNeedsValue"));break;case"objectNeedsKey":"}"===f?u():'"'===f&&(l("collectionItem"),o("objectNeedsColon"),a("string"));break;case"objectNeedsColon":":"===f&&o("objectNeedsValue");break;case"objectNeedsValue":ea(f)||(c("collectionItem"),o("objectNeedsComma"),h(f));break;case"objectNeedsComma":"}"===f?u():","===f&&(l("collectionItem"),o("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;v--)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 ec(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,s=i>>>7!=0||0!=t,a=(s?128|i:i)&255;if(n.push(a),!s)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,s=(i?128|r:r)&255;if(n.push(s),!i)return}n.push(t>>>31&1)}}function eu(e){let t="-"===e[0];t&&(e=e.slice(1));let n=0,r=0;function i(t,i){let s=Number(e.slice(t,i));r*=1e6,(n=1e6*n+s)>=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,s=n+6777216*r+6710656*i,a=r+8147497*i,o=2*i;return s>=1e7&&(a+=Math.floor(s/1e7),s%=1e7),a>=1e7&&(o+=Math.floor(a/1e7),a%=1e7),o.toString()+ef(a)+ef(s)}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),eu(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),eE(e),eu(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 e_(){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 ek{constructor(e=e_().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(eS(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);
1136if(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){eS(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 ec(t.lo,t.hi,this.buf),this}sint64(e){let t=eb.enc(e),n=t.hi>>31;return ec(t.lo<<1^n,(t.hi<<1|t.lo>>>31)^n,this.buf),this}uint64(e){let t=eb.uEnc(e);return ec(t.lo,t.hi,this.buf),this}}class eA{constructor(e,t=e_().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 eS(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 ew=function(e){return e[e.NULL_VALUE=0]="NULL_VALUE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});function eI(){return{fields:{}}}let eN={encode:(e,t=new ek)=>(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=eI();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=>eN.fromPartial(e??{}),fromPartial(e){let t=eI();return t.fields=Object.entries(e.fields??{}).reduce((e,[t,n])=>(void 0!==n&&(e[t]=n),e),{}),t},wrap(e){let t=eI();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 eC(){return{key:"",value:void 0}}let eO={encode:(e,t=new ek)=>(""!==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=eC();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;
1136n.skip(7&e)}return i},create:e=>eO.fromPartial(e??{}),fromPartial(e){let t=eC();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 ek)=>(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&&eN.encode(eN.wrap(e.structValue),t.uint32(42).fork()).join(),void 0!==e.listValue&&eM.encode(eM.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=eN.unwrap(eN.decode(n,n.uint32()));continue;case 6:if(50!==e)break;i.listValue=eM.unwrap(eM.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=ew.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 eM={encode(e,t=new ek){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=>eM.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},eP=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 ej={encode:(e,t=new ek)=>(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=>ej.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 eB(){return{id:"",type:"",function:void 0}}let eU={encode:(e,t=new ek)=>(""!==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=eB();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;
1136n.skip(7&e)}return i},create:e=>eU.fromPartial(e??{}),fromPartial(e){let t=eB();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 ek)=>(""!==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 eG(){return{value:"",mimeType:""}}let ez={encode:(e,t=new ek)=>(""!==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=eG();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=>ez.fromPartial(e??{}),fromPartial(e){let t=eG();return t.value=e.value??"",t.mimeType=e.mimeType??"",t}};function eY(){return{value:"",mimeType:void 0}}let eq={encode:(e,t=new ek)=>(""!==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 eW(){return{data:void 0,url:void 0}}let eV={encode:(e,t=new ek)=>(void 0!==e.data&&ez.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=eW();for(;n.pos<r;){let e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;i.data=ez.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=>eV.fromPartial(e??{}),fromPartial(e){let t=eW();return t.data=void 0!==e.data&&null!==e.data?ez.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 ek)=>(""!==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 ek)=>(void 0!==e.source&&eV.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=eV.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?eV.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 ek)=>(void 0!==e.source&&eV.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=eV.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;
1136n.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?eV.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 ek)=>(void 0!==e.source&&eV.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=eV.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?eV.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 ek)=>(void 0!==e.source&&eV.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=eV.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?eV.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 ek)=>(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 e8(){return{id:"",role:"",content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0,contentParts:[]}}let e5={encode(e,t=new ek){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=e8();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;
1136n.skip(7&e)}return i},create:e=>e5.fromPartial(e??{}),fromPartial(e){let t=e8();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 ek)=>(""!==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 ek)=>(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 ek)=>(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;
1136n.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 ts(){return{baseEvent:void 0,messageId:"",delta:""}}let ta={encode:(e,t=new ek)=>(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=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;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=>ta.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.delta=e.delta??"",t}};function to(){return{baseEvent:void 0,messageId:""}}let tl={encode:(e,t=new ek)=>(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=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.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=to();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?tn.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??"",t}};function tc(){return{baseEvent:void 0,toolCallId:"",toolCallName:"",parentMessageId:void 0}}let tu={encode:(e,t=new ek)=>(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=tc();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=>tu.fromPartial(e??{}),fromPartial(e){let t=tc();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 ek)=>(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 ek)=>(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;
1136n.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 ek)=>(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 ek){for(let n of(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),e.delta))ej.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(ej.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=>ej.fromPartial(e))||[],t}};function ty(){return{baseEvent:void 0,messages:[]}}let tE={encode(e,t=new ek){for(let n of(void 0!==e.baseEvent&&tn.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messages))e5.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(e5.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=>e5.fromPartial(e))||[],t}};function tT(){return{baseEvent:void 0,event:void 0,source:void 0}}let t_={encode:(e,t=new ek)=>(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=>t_.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 tk(){return{baseEvent:void 0,name:"",value:void 0}}let tA={encode:(e,t=new ek)=>(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=tk();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=tk();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 tS={encode:(e,t=new ek)=>(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;
1136i.runId=n.string();continue}if((7&e)==4||0===e)break;n.skip(7&e)}return i},create:e=>tS.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 tw(){return{baseEvent:void 0,threadId:"",runId:"",result:void 0,outcome:"",interrupts:[]}}let tI={encode(e,t=new ek){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=tw();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=>tI.fromPartial(e??{}),fromPartial(e){let t=tw();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 tN(){return{baseEvent:void 0,code:void 0,message:""}}let tC={encode:(e,t=new ek)=>(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=tN();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=>tC.fromPartial(e??{}),fromPartial(e){let t=tN();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 ek)=>(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 ek)=>(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 tM(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0,name:void 0}}let tP={encode:(e,t=new ek)=>(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=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.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;
1136n.skip(7&e)}return i},create:e=>tP.fromPartial(e??{}),fromPartial(e){let t=tM();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 tj={encode:(e,t=new ek)=>(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=>tj.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 tB(){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 ek)=>(void 0!==e.textMessageStart&&ti.encode(e.textMessageStart,t.uint32(10).fork()).join(),void 0!==e.textMessageContent&&ta.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&&tu.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&&t_.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&&tS.encode(e.runStarted,t.uint32(98).fork()).join(),void 0!==e.runFinished&&tI.encode(e.runFinished,t.uint32(106).fork()).join(),void 0!==e.runError&&tC.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&&tP.encode(e.textMessageChunk,t.uint32(138).fork()).join(),void 0!==e.toolCallChunk&&tj.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=tB();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=ta.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=tu.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=t_.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=tS.decode(n,n.uint32());continue;case 13:if(106!==e)break;i.runFinished=tI.decode(n,n.uint32());continue;case 14:if(114!==e)break;i.runError=tC.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=tP.decode(n,n.uint32());continue;case 18:if(146!==e)break;i.toolCallChunk=tj.decode(n,n.uint32());continue}if((7&e)==4||0===e)break;
1136n.skip(7&e)}return i},create:e=>tU.fromPartial(e??{}),fromPartial(e){let t=tB();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?ta.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?tu.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?t_.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?tS.fromPartial(e.runStarted):void 0,t.runFinished=void 0!==e.runFinished&&null!==e.runFinished?tI.fromPartial(e.runFinished):void 0,t.runError=void 0!==e.runError&&null!==e.runError?tC.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?tP.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=void 0!==e.toolCallChunk&&null!==e.toolCallChunk?tj.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}}},tG="application/vnd.ag-ui.event+proto";var tz=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);
1136if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},tW=e=>"*"===e||"x"===e||"X"===e,tV=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},tK=(e,t)=>{if(tW(e)||tW(t))return 0;let[n,r]=((e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t])(tV(e),tV(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(),s=r.pop(),a=tZ(n,r);return 0!==a?a:i&&s?tZ(i.split("."),s.split(".")):i||s?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,a.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],s=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(s.has(e))continue;if(s.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 s=0;s<t.length;s++){let a=t[s];if((r+=a.length)>n)return!0;i.push(e[a])}}}}return!1}async function t3(e,t,n,r){let i="u">typeof tQ&&void 0!==tQ.env,s=i&&!!tQ.env.VITEST_WORKER_ID,a=i&&!!tQ.env.VITEST_WORKER_ID,o=a&&!t2(t,n,524288),l=o?tJ(t):t,c=o?tJ(n):n,u=!1,d=!1,h;for(let t of e)try{o&&(t1(l),t1(c));let e=await r(t,l,c);if(void 0===e)continue;let n=!1;if(void 0!==e.messages&&e.messages!==l&&(l=tJ(e.messages),u=!0,n=!0),void 0!==e.state&&e.state!==c&&(c=tJ(e.state),d=!0,n=!0),o&&n&&t2(l,c,524288)&&(o=!1),h=e.stopPropagation,!0===h)break}catch(e){if(a&&e instanceof TypeError){if(s)throw e;console.error("AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.",e)}else s||console.error("Subscriber error:",e);continue}return{...u?{messages:Object.isFrozen(l)?tJ(l):l}:{},...d?{state:Object.isFrozen(c)?tJ(c):c}:{},...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 t8?e:!0===e?new t8(t4(!0)):void 0}var t8=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 t5(e){return e.enabled?new t8(e):void 0}let t6=(e,t,n,r,i)=>{var s;let a=t9(i),l=tJ(n.messages),c=tJ(e.state),u={},d=e=>{void 0!==e.messages&&(l=e.messages,u.messages=e.messages),void 0!==e.state&&(c=e.state,u.state=e.state)},h=()=>{let e=tJ(u);return u={},void 0!==e.messages||void 0!==e.state?(0,j.of)(e):B.w};return t.pipe(X(async t=>{let i=await t3(r,l,c,(r,i,s)=>r.onEvent?.({event:t,agent:n,input:e,messages:i,state:s}));if(d(i),!0===i.stopPropagation?a?.event("APPLY","Event dropped:",t,{type:t.type,reason:"stopPropagation by subscriber"}):a?.event("APPLY","Event applied:",t,{type:t.type,subscribers:r.length}),!0===i.stopPropagation)return h();switch(t.type){case o.Bx.TEXT_MESSAGE_START:{let i=await t3(r,l,c,(r,i,s)=>r.onTextMessageStartEvent?.({event:t,messages:i,state:s,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 o.Bx.TEXT_MESSAGE_CONTENT:{let{messageId:i,delta:s}=t,a=l.find(e=>e.id===i);if(!a)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${i}'`),h();let o=await t3(r,l,c,(r,i,s)=>r.onTextMessageContentEvent?.({event:t,messages:i,state:s,agent:n,input:e,textMessageBuffer:"string"==typeof a.content?a.content:""}));return d(o),!0!==o.stopPropagation&&(a.content=`${"string"==typeof a.content?a.content:""}${s}`,d({messages:l})),h()}case o.Bx.TEXT_MESSAGE_END:{let{messageId:i}
1136=t,s=l.find(e=>e.id===i);return s?(d(await t3(r,l,c,(r,i,a)=>r.onTextMessageEndEvent?.({event:t,messages:i,state:a,agent:n,input:e,textMessageBuffer:"string"==typeof s.content?s.content:""}))),await Promise.all(r.map(t=>{t.onNewMessage?.({message:s,messages:l,state:c,agent:n,input:e})}))):console.warn(`TEXT_MESSAGE_END: No message found with ID '${i}'`),h()}case o.Bx.TOOL_CALL_START:{let i=await t3(r,l,c,(r,i,s)=>r.onToolCallStartEvent?.({event:t,messages:i,state:s,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 o.Bx.TOOL_CALL_ARGS:{let{toolCallId:i,delta:s}=t,a=l.find(e=>e.toolCalls?.some(e=>e.id===i));if(!a)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${i}'`),h();let o=a.toolCalls?.find(e=>e.id===i);if(!o)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),h();let u=await t3(r,l,c,(r,i,s)=>{let a=o.function.arguments,l=o.function.name,c={};try{c=eo(a)}catch{}return r.onToolCallArgsEvent?.({event:t,messages:i,state:s,agent:n,input:e,toolCallBuffer:a,toolCallName:l,partialToolCallArgs:c})});return d(u),!0!==u.stopPropagation&&(o.function.arguments+=s,d({messages:l})),h()}case o.Bx.TOOL_CALL_END:{let{toolCallId:i}=t,s=l.find(e=>e.toolCalls?.some(e=>e.id===i));if(!s)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${i}'`),h();let a=s.toolCalls?.find(e=>e.id===i);return a?(d(await t3(r,l,c,(r,i,s)=>{let o=a.function.arguments,l=a.function.name,c={};try{c=JSON.parse(o)}catch{}return r.onToolCallEndEvent?.({event:t,messages:i,state:s,agent:n,input:e,toolCallName:l,toolCallArgs:c})})),await Promise.all(r.map(t=>{t.onNewToolCall?.({toolCall:a,messages:l,state:c,agent:n,input:e})}))):console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),h()}case o.Bx.TOOL_CALL_RESULT:{let i=await t3(r,l,c,(r,i,s)=>r.onToolCallResultEvent?.({event:t,messages:i,state:s,agent:n,input:e}));if(d(i),!0!==i.stopPropagation){let{messageId:i,toolCallId:s,content:a,role:o}=t,u={id:i,toolCallId:s,role:o||"tool",content:a},h=l.findIndex(e=>"assistant"===e.role&&e.toolCalls?.some(e=>e.id===s));if(-1===h)l.push(u);else{let e=h+1;for(;e<l.length&&"tool"===l[e].role;)e++;l.splice(e,0,u)}await Promise.all(r.map(t=>{t.onNewMessage?.({message:u,messages:l,state:c,agent:n,input:e})})),d({messages:l})}return h()}case o.Bx.STATE_SNAPSHOT:{let i=await t3(r,l,c,(r,i,s)=>r.onStateSnapshotEvent?.({event:t,messages:i,state:s,agent:n,input:e}));if(d(i),!0!==i.stopPropagation){let{snapshot:e}=t;d({state:c=e})}return h()}case o.Bx.STATE_DELTA:{let i=await t3(r,l,c,(r,i,s)=>r.onStateDeltaEvent?.({event:t,messages:i,state:s,agent:n,input:e}));if(d(i),!0!==i.stopPropagation){let{delta:e}=t;try{c=F.applyPatch(c,e,!0,!1).newDocument,d({state:c})}catch(n){let t=n instanceof Error?n.message:String(n);console.warn(`Failed to apply state patch:
1137Current state: ${JSON.stringify(c,null,2)}
1138Patch operations: ${JSON.stringify(e,null,2)}
1139Error: ${t}`)}}return h()}case o.Bx.MESSAGES_SNAPSHOT:{let i=await t3(r,l,c,(r,i,s)=>r.onMessagesSnapshotEvent?.({event:t,messages:i,state:s,agent:n,input:e}));if(d(i),!0!==i.stopPropagation){let{messages:e}=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,s=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)s.has(t.id)||l.push(t);d({messages:l})}return h()}case o.Bx.ACTIVITY_SNAPSHOT:{let i=l.findIndex(e=>e.id===t.messageId),s=i>=0?l[i]:void 0,a=s?.role==="activity"?s:void 0,o=t.replace??!0,u=await t3(r,l,c,(r,i,o)=>r.onActivitySnapshotEvent?.({event:t,messages:i,state:o,agent:n,input:e,activityMessage:a,existingMessage:s}));if(d(u),!0!==u.stopPropagation){let s={id:t.messageId,role:"activity",activityType:t.activityType,content:tJ(t.content)},u;-1===i?(l.push(s),u=s):a?o&&(l[i]={...a,activityType:t.activityType,content:tJ(t.content)}):o&&(l[i]=s,u=s),d({messages:l}),u&&await Promise.all(r.map(t=>t.onNewMessage?.({message:u,messages:l,state:c,agent:n,input:e})))}return h()}case o.Bx.ACTIVITY_DELTA:{let i=l.findIndex(e=>e.id===t.messageId);if(-1===i)return h();let s=l[i];if("activity"!==s.role)return console.warn(`ACTIVITY_DELTA: Message '${t.messageId}' is not an activity message`),h();let a=await t3(r,l,c,(r,i,a)=>r.onActivityDeltaEvent?.({event:t,messages:i,state:a,agent:n,input:e,activityMessage:s}));if(d(a),!0!==a.stopPropagation)try{let e=tJ(s.content??{}),n=F.applyPatch(e,t.patch??[],!0,!1).newDocument;l[i]={...s,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 o.Bx.RAW:return d(await t3(r,l,c,(r,i,s)=>r.onRawEvent?.({event:t,messages:i,state:s,agent:n,input:e}))),h();case o.Bx.CUSTOM:return d(await t3(r,l,c,(r,i,s)=>r.onCustomEvent?.({event:t,messages:i,state:s,agent:n,input:e}))),h();case o.Bx.RUN_STARTED:{let i=await t3(r,l,c,(r,i,s)=>r.onRunStartedEvent?.({event:t,messages:i,state:s,agent:n,input:e}));if(d(i),!0!==i.stopPropagation&&t.input?.messages){for(let e of t.input.messages)l.find(t=>
1139t.id===e.id)||l.push(e);d({messages:l})}return h()}case o.Bx.RUN_FINISHED:{let i=t.outcome?.type==="interrupt"?{event:t,outcome:"interrupt",interrupts:t.outcome.interrupts}:{event:t,outcome:"success",result:t.result},s=await t3(r,l,c,(t,r,s)=>t.onRunFinishedEvent?.({...i,messages:r,state:s,agent:n,input:e}));return d(s),!0!==s.stopPropagation&&(n.pendingInterrupts="interrupt"===i.outcome?[...i.interrupts]:[]),h()}case o.Bx.RUN_ERROR:return d(await t3(r,l,c,(r,i,s)=>r.onRunErrorEvent?.({event:t,messages:i,state:s,agent:n,input:e}))),h();case o.Bx.STEP_STARTED:return d(await t3(r,l,c,(r,i,s)=>r.onStepStartedEvent?.({event:t,messages:i,state:s,agent:n,input:e}))),h();case o.Bx.STEP_FINISHED:return d(await t3(r,l,c,(r,i,s)=>r.onStepFinishedEvent?.({event:t,messages:i,state:s,agent:n,input:e}))),h();case o.Bx.TEXT_MESSAGE_CHUNK:throw Error("TEXT_MESSAGE_CHUNK must be tranformed before being applied");case o.Bx.TOOL_CALL_CHUNK:throw Error("TOOL_CALL_CHUNK must be tranformed before being applied");case o.Bx.THINKING_START:case o.Bx.THINKING_END:case o.Bx.THINKING_TEXT_MESSAGE_START:case o.Bx.THINKING_TEXT_MESSAGE_CONTENT:case o.Bx.THINKING_TEXT_MESSAGE_END:return h();case o.Bx.REASONING_START:return d(await t3(r,l,c,(r,i,s)=>r.onReasoningStartEvent?.({event:t,messages:i,state:s,agent:n,input:e}))),h();case o.Bx.REASONING_MESSAGE_START:{let i=await t3(r,l,c,(r,i,s)=>r.onReasoningMessageStartEvent?.({event:t,messages:i,state:s,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 o.Bx.REASONING_MESSAGE_CONTENT:{let{messageId:i,delta:s}=t,a=l.find(e=>e.id===i);if(!a)return console.warn(`REASONING_MESSAGE_CONTENT: No message found with ID '${i}'`),h();let o=await t3(r,l,c,(r,i,s)=>r.onReasoningMessageContentEvent?.({event:t,messages:i,state:s,agent:n,input:e,reasoningMessageBuffer:"string"==typeof a.content?a.content:""}));return d(o),!0!==o.stopPropagation&&(a.content=`${"string"==typeof a.content?a.content:""}${s}`,d({messages:l})),h()}case o.Bx.REASONING_MESSAGE_END:{let{messageId:i}=t,s=l.find(e=>e.id===i);return s?(d(await t3(r,l,c,(r,i,a)=>r.onReasoningMessageEndEvent?.({event:t,messages:i,state:a,agent:n,input:e,reasoningMessageBuffer:"string"==typeof s.content?s.content:""}))),await Promise.all(r.map(t=>{t.onNewMessage?.({message:s,messages:l,state:c,agent:n,input:e})}))):console.warn(`REASONING_MESSAGE_END: No message found with ID '${i}'`),h()}case o.Bx.REASONING_MESSAGE_CHUNK:throw Error("REASONING_MESSAGE_CHUNK must be transformed before being applied");case o.Bx.REASONING_END:return d(await t3(r,l,c,(r,i,s)=>r.onReasoningEndEvent?.({event:t,messages:i,state:s,agent:n,input:e}))),h();case o.Bx.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:s,encryptedValue:a}=t,o=await t3(r,l,c,(r,i,s)=>r.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:s,agent:n,input:e}));if(d(o),!0!==o.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===s);if(n){n.encryptedValue=a,e=!0;break}}}else{let t=l.find(e=>e.id===s);t?.role!=="activity"&&t&&(t.encryptedValue=a,e=!0)}e&&(u.messages=l)}return h()}}return t.type,h()}),(0,Q.U)(),r.length>0?(s={},(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(s),t.complete()}))})):e=>e)},t7=e=>t=>{let n=t9(e),r=new Map,i=new Map,s=!1,a=!1,l=!1,c=new Map,u=!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}),a)return(0,U.$)(()=>new o.$e(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(s&&t!==o.Bx.RUN_ERROR&&t!==o.Bx.RUN_STARTED)return(0,U.$)(()=>new o.$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===o.Bx.RUN_STARTED){if(h&&!s)return(0,U.$)(()=>new o.$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."));s&&(r.clear(),i.clear(),c.clear(),u=!1,d=!1,s=!1,a=!1,h=!0)}}else if(l=!0,t!==o.Bx.RUN_STARTED&&t!==o.Bx.RUN_ERROR)return(0,U.$)(()=>new o.$e("First event must be 'RUN_STARTED'"));switch(t){case o.Bx.TEXT_MESSAGE_START:{let t=e.messageId;return r.has(t)?(0,U.$)(()=>new o.$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,j.of)(e))}case o.Bx.TEXT_MESSAGE_CONTENT:{let t=e.messageId;return r.has(t)?(0,j.of)(e):(0,U.$)(()=>new o.$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 o.Bx.TEXT_MESSAGE_END:{let t=e.messageId;return r.has(t)?(r.delete(t),(0,j.of)(e)):(0,U.$)(()=>new o.$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 o.Bx.TOOL_CALL_START:{let t=e.toolCallId;return i.has(t)?(0,U.$)(()=>new o.$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,j.of)(e))}case o.Bx.TOOL_CALL_ARGS:{let t=e.toolCallId;return i.has(t)?(0,j.of)(e):(0,U.$)(()=>new o.$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 o.Bx.TOOL_CALL_END:{let t=e.toolCallId;return i.has(t)?(i.delete(t),(0,j.of)(e)):(0,U.$)(()=>new o.$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 o.Bx.STEP_STARTED:{let t=e.stepName;return c.has(t)?(0,U.$)(()=>new o.$e(`Step "${t}" is already active for 'STEP_STARTED'`)):(c.set(t,!0),(0,j.of)(e))}case o.Bx.STEP_FINISHED:{let t=e.stepName;return c.has(t)?(c.delete(t),(0,j.of)(e)):(0,U.$)(()=>new o.$e(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}case o.Bx.RUN_STARTED:return h=!0,(0,j.of)(e);case o.Bx.RUN_FINISHED:if(c.size>0){let e=Array.from(c.keys()).join(", ");return(0,U.$)(()=>new o.$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 o.$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 o.$e(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}return s=!0,(0,j.of)(e);case o.Bx.RUN_ERROR:return a=!0,(0,j.of)(e);case o.Bx.CUSTOM:return(0,j.of)(e);case o.Bx.THINKING_TEXT_MESSAGE_START:return u?d?(0,U.$)(()=>new o.$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,j.of)(e)):(0,U.$)(()=>new o.$e("Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first."));case o.Bx.THINKING_TEXT_MESSAGE_CONTENT:return d?(0,j.of)(e):(0,U.$)(()=>new o.$e("Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first."));case o.Bx.THINKING_TEXT_MESSAGE_END:return d?(d=!1,(0,j.of)(e)):(0,U.$)(()=>new o.$e("Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first."));case o.Bx.THINKING_START:return u?(0,U.$)(()=>new o.$e("Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.")):(u=!0,(0,j.of)(e));case o.Bx.THINKING_END:return u?(u=!1,(0,j.of)(e)):(0,U.$)(()=>new o.$e("Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first."));default:return(0,j.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 G.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 z.B,i=new Y.m,s=!1;return e.subscribe({next:e=>{if(i.next(e),e.type!==ne.HEADERS||s)s||r.error(Error("No headers event received before data events"));else{s=!0;let t=e.headers.get("content-type");n?.lifecycle("HTTP","Stream format detected:",{contentType:t,parser:t===tG?"protobuf":"sse"}),t===tG?(e=>{let t=new z.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");
1139if(t.type=te[t.baseEvent.type],t.timestamp=t.baseEvent.timestamp,t.rawEvent=t.baseEvent.rawEvent,delete t.baseEvent,t.type===o.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===o.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===o.Bx.STATE_DELTA)for(let e of t.delta)e.op=eP[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]}),o.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 z.B,i=new TextDecoder("utf-8",{fatal:!1}),s="";function a(e){let t=e.split(`
1140`),i=[];for(let e of t)e.startsWith("data:")&&i.push(e.slice(5).replace(/^ /,""));if(i.length>0)try{let e=i.join(`
1141`),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=(s+=t).split(/\n\n/);for(let e of(s=n.pop()||"",n))a(e)}},error:e=>r.error(e),complete:()=>{s&&a(s+=i.decode()),r.complete()}}),r.asObservable()})(i,n).subscribe({next:e=>{try{let t=o.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:o.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=tz.k5(["TextMessageStart","TextMessageContent","TextMessageEnd","ActionExecutionStart","ActionExecutionArgs","ActionExecutionEnd","ActionExecutionResult","AgentStateMessage","MetaEvent","RunStarted","RunFinished","RunError","NodeStarted","NodeFinished"]),ni=tz.k5(["LangGraphInterruptEvent","PredictState","Exit"]),ns=tz.Ik({type:tz.eu(nr.enum.TextMessageStart),messageId:tz.Yj(),parentMessageId:tz.Yj().optional(),role:tz.Yj().optional()}),na=tz.Ik({type:tz.eu(nr.enum.TextMessageContent),messageId:tz.Yj(),content:tz.Yj()}),no=tz.Ik({type:tz.eu(nr.enum.TextMessageEnd),messageId:tz.Yj()}),nl=tz.Ik({type:tz.eu(nr.enum.ActionExecutionStart),actionExecutionId:tz.Yj(),actionName:tz.Yj(),parentMessageId:tz.Yj().optional()}),nc=tz.Ik({type:tz.eu(nr.enum.ActionExecutionArgs),actionExecutionId:tz.Yj(),args:tz.Yj()}),nu=tz.Ik({type:tz.eu(nr.enum.ActionExecutionEnd),actionExecutionId:tz.Yj()}),nd=tz.Ik({type:tz.eu(nr.enum.ActionExecutionResult),actionName:tz.Yj(),actionExecutionId:tz.Yj(),result:tz.Yj()}),nh=tz.Ik({type:tz.eu(nr.enum.AgentStateMessage),threadId:tz.Yj(),agentName:tz.Yj(),nodeName:tz.Yj(),runId:tz.Yj(),active:tz.zM(),role:tz.Yj(),state:tz.Yj(),running:tz.zM()}),np=tz.Ik({type:tz.eu(nr.enum.MetaEvent),name:ni,value:tz.bz()}),nf=tz.Ik({type:tz.eu(nr.enum.RunError),message:tz.Yj(),code:tz.Yj().optional()});tz.gM("type",[ns,na,no,nl,nc,nu,nd,nh,np,nf]),tz.Ik({id:tz.Yj(),role:tz.Yj(),content:tz.Yj(),parentMessageId:tz.Yj().optional()}),tz.Ik({id:tz.Yj(),name:tz.Yj(),arguments:tz.bz(),parentMessageId:tz.Yj().optional()}),tz.Ik({id:tz.Yj(),result:tz.bz(),actionExecutionId:tz.Yj(),actionName:tz.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(`
1142`)},ng=e=>t=>{let n=t9(e),r,i,s,a,l=()=>"text"===a?[(()=>{if(!r||"text"!==a)throw Error("No text message to close");let e={type:o.Bx.TEXT_MESSAGE_END,messageId:r.messageId};return a=void 0,r=void 0,n?.event("TRANSFORM","TEXT_MESSAGE_END",e,{messageId:e.messageId}),e})()]:"tool"===a?[(()=>{if(!i||"tool"!==a)throw Error("No tool call to close");let e={type:o.Bx.TOOL_CALL_END,toolCallId:i.toolCallId};return a=void 0,i=void 0,n?.event("TRANSFORM","TOOL_CALL_END",e,{toolCallId:e.toolCallId}),e})()]:"reasoning"===a?[(()=>{if(!s||"reasoning"!==a)throw Error("No reasoning message to close");let e={type:o.Bx.REASONING_MESSAGE_END,messageId:s.messageId};return a=void 0,s=void 0,n?.event("TRANSFORM","REASONING_MESSAGE_END",e,{messageId:e.messageId}),e})()]:[];return t.pipe((0,q.Z)(e=>{switch(e.type){case o.Bx.TEXT_MESSAGE_START:case o.Bx.TEXT_MESSAGE_CONTENT:case o.Bx.TEXT_MESSAGE_END:case o.Bx.TOOL_CALL_START:case o.Bx.TOOL_CALL_ARGS:case o.Bx.TOOL_CALL_END:case o.Bx.TOOL_CALL_RESULT:case o.Bx.STATE_SNAPSHOT:case o.Bx.STATE_DELTA:case o.Bx.MESSAGES_SNAPSHOT:case o.Bx.CUSTOM:case o.Bx.RUN_STARTED:case o.Bx.RUN_FINISHED:case o.Bx.RUN_ERROR:case o.Bx.STEP_STARTED:case o.Bx.STEP_FINISHED:case o.Bx.THINKING_START:case o.Bx.THINKING_END:case o.Bx.THINKING_TEXT_MESSAGE_START:case o.Bx.THINKING_TEXT_MESSAGE_CONTENT:case o.Bx.THINKING_TEXT_MESSAGE_END:case o.Bx.REASONING_START:case o.Bx.REASONING_MESSAGE_START:case o.Bx.REASONING_MESSAGE_CONTENT:case o.Bx.REASONING_MESSAGE_END:case o.Bx.REASONING_END:return[...l(),e];case o.Bx.RAW:case o.Bx.ACTIVITY_SNAPSHOT:case o.Bx.ACTIVITY_DELTA:case o.Bx.REASONING_ENCRYPTED_VALUE:return[e];case o.Bx.TEXT_MESSAGE_CHUNK:let t=[];if(("text"!==a||void 0!==e.messageId&&e.messageId!==r?.messageId)&&t.pu
1142sh(...l()),"text"!==a){if(void 0===e.messageId)throw Error("First TEXT_MESSAGE_CHUNK must have a messageId");r={messageId:e.messageId,name:e.name},a="text";let i={type:o.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:o.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 o.Bx.TOOL_CALL_CHUNK:let c=[];if(("tool"!==a||void 0!==e.toolCallId&&e.toolCallId!==i?.toolCallId)&&c.push(...l()),"tool"!==a){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},a="tool";let t={type:o.Bx.TOOL_CALL_START,toolCallId:e.toolCallId,toolCallName:e.toolCallName,parentMessageId:e.parentMessageId};c.push(t),n?.event("TRANSFORM","TOOL_CALL_START",t,{toolCallId:e.toolCallId,toolCallName:e.toolCallName})}if(void 0!==e.delta){let t={type:o.Bx.TOOL_CALL_ARGS,toolCallId:i.toolCallId,delta:e.delta};c.push(t),n?.event("TRANSFORM","TOOL_CALL_ARGS",t,{toolCallId:i.toolCallId})}return c;case o.Bx.REASONING_MESSAGE_CHUNK:let u=[];if(("reasoning"!==a||e.messageId&&e.messageId!==s?.messageId)&&u.push(...l()),"reasoning"!==a){if(void 0===e.messageId)throw Error("First REASONING_MESSAGE_CHUNK must have a messageId");s={messageId:e.messageId},a="reasoning";let t={type:o.Bx.REASONING_MESSAGE_START,messageId:e.messageId};u.push(t),n?.event("TRANSFORM","REASONING_MESSAGE_START",t,{messageId:e.messageId})}if(void 0!==e.delta){let t={type:o.Bx.REASONING_MESSAGE_CONTENT,messageId:s.messageId,delta:e.delta};u.push(t),n?.event("TRANSFORM","REASONING_MESSAGE_CONTENT",t,{messageId:s.messageId})}return u}return e.type,[]}),(0,W.j)(()=>{l()}))};var nv=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)})))}},nb=class extends nv{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function ny(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 nE=class extends nv{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(ny)};return this.runNext(i,t)}};let nT="THINKING_START",n_="THINKING_END",nk="THINKING_TEXT_MESSAGE_START",nA="THINKING_TEXT_MESSAGE_CONTENT",nx="THINKING_TEXT_MESSAGE_END";var nS=class extends nv{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 your .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 nT:{this.currentReasoningId=t0();let{title:t,...n}=e;return this.warnAboutTransformation(nT,o.Bx.REASONING_START),{...n,type:o.Bx.REASONING_START,messageId:this.currentReasoningId}}case nk:return this.currentMessageId=t0(),this.warnAboutTransformation(nk,o.Bx.REASONING_MESSAGE_START),{...e,type:o.Bx.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:"assistant"};case nA:{let{delta:t,...n}=e;return this.warnAboutTransformation(nA,o.Bx.REASONING_MESSAGE_CONTENT),{...n,type:o.Bx.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??t0(),delta:t}}case nx:{let t=this.currentMessageId??t0();return this.warnAboutTransformation(nx,o.Bx.REASONING_MESSAGE_END),{...e,type:o.Bx.REASONING_MESSAGE_END,messageId:t}}case n_:{let t=this.currentReasoningId??t0();return this.warnAboutTransformation(n_,o.Bx.REASONING_END),{...e,type:o.Bx.REASONING_END,messageId:t}}default:return e}}};function nw(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}
1142,...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 nI=class extends nv{run(e,t){let n={...e,messages:e.messages.map(nw)};return this.runNext(n,t)}},nN=class{get maxVersion(){return"0.0.57"}get debug(){return this._debug}set debug(e){this._debug=t4(e),this._debugLogger=t5(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){"boolean"==typeof e?this._debugLogger=e?t5(t4(!0)):void 0:this._debugLogger=e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:s}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.agentId=e,this.description=t??"",this.threadId=n??(0,a.A)(),this.messages=tJ(r??[]),this.state=tJ(i??{}),this._debug=t4(s),this._debugLogger=t5(this._debug),0>=tX(this.maxVersion,"0.0.39")&&this.middlewares.unshift(new nE),0>=tX(this.maxVersion,"0.0.45")&&this.middlewares.unshift(new nS),0>=tX(this.maxVersion,"0.0.47")&&this.middlewares.unshift(new nI)}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 nb(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{let n;this.isRunning=!0,this.agentId=this.agentId??(0,a.A)();let r=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle("LIFECYCLE","Run started:",{agentId:this.agentId,threadId:this.threadId});let i,s=new Set(this.messages.map(e=>e.id)),o=[{onRunFinishedEvent:e=>{"success"===e.outcome&&(i=e.result)}},...this.subscribers,t??{}];await this.onInitialize(r,o),this.activeRunDetach$=new z.B,this.activeRunCompletionPromise=new Promise(e=>{n=e}),await (0,V.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,o),e=>this.processApplyEvents(r,e,o),(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,o))),(0,W.j)(()=>{this.debugLogger?.lifecycle("LIFECYCLE","Run finished:",{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(r,o),n?.(),n=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))((0,j.of)(null)));let l=tJ(this.messages).filter(e=>!s.has(e.id));return{result:i,newMessages:l}}finally{this.isRunning=!1}}connect(e){throw new o.Qk}async connectAgent(e,t){try{let n;this.isRunning=!0,this.agentId=this.agentId??(0,a.A)();let r=this.prepareRunAgentInput(e),i,s=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 z.B,this.activeRunCompletionPromise=new Promise(e=>{n=e}),await (0,V.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 o.Qk?B.w:this.onError(r,e,l))),(0,W.j)(()=>{this.isRunning=!1,this.onFinalize(r,l),n?.(),n=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))((0,j.of)(null)),{defaultValue:void 0});let c=tJ(this.messages).filter(e=>!s.has(e.id));return{result:i,newMessages:c}}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)}
1142processApplyEvents(e,t,n){return t.pipe((0,es.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,a.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 o.$e(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(", ")}`);for(let e of this.pendingInterrupts)if(function(e,t=new Date){return void 0!==e.expiresAt&&new Date(e.expiresAt)<=t}(e))throw new o.$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
1142h(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,a.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={},s=!0,a=!0,l="",c=null,u=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 o.Bx.TEXT_MESSAGE_START:return[{type:nr.enum.TextMessageStart,messageId:e.messageId,role:e.role}];case o.Bx.TEXT_MESSAGE_CONTENT:return[{type:nr.enum.TextMessageContent,messageId:e.messageId,content:e.delta}];case o.Bx.TEXT_MESSAGE_END:return[{type:nr.enum.TextMessageEnd,messageId:e.messageId}];case o.Bx.TOOL_CALL_START:return d.push({id:e.toolCallId,type:"function",function:{name:e.toolCallName,arguments:""}}),a=!0,h[e.toolCallId]=e.toolCallName,[{type:nr.enum.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}];case o.Bx.TOOL_CALL_ARGS:{let o=d.find(t=>t.id===e.toolCallId);if(!o)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${e.toolCallId}'`),[];o.function.arguments+=e.delta;let c=!1;if(u){let e=u.find(e=>e.tool==o.function.name);if(e)try{let t=JSON.parse(eo(o.function.arguments));e.tool_argument&&e.tool_argument in t?(p({...i,[e.state_key]:t[e.tool_argument]}
1142),c=!0):e.tool_argument||(p({...i,[e.state_key]:t}),c=!0)}catch{}}return[{type:nr.enum.ActionExecutionArgs,actionExecutionId:e.toolCallId,args:e.delta},...c?[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:s,role:"assistant",state:JSON.stringify(i),active:a}]:[]]}case o.Bx.TOOL_CALL_END:return[{type:nr.enum.ActionExecutionEnd,actionExecutionId:e.toolCallId}];case o.Bx.TOOL_CALL_RESULT:return[{type:nr.enum.ActionExecutionResult,actionExecutionId:e.toolCallId,result:e.content,actionName:h[e.toolCallId]||"unknown"}];case o.Bx.RAW:return[];case o.Bx.CUSTOM:switch(e.name){case"Exit":s=!1;break;case"PredictState":u=e.value}return[{type:nr.enum.MetaEvent,name:e.name,value:e.value}];case o.Bx.STATE_SNAPSHOT:return p(e.snapshot),[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:s,role:"assistant",state:JSON.stringify(i),active:a}];case o.Bx.STATE_DELTA:{let o=F.applyPatch(i,e.delta,!0,!1);return o?(p(o.newDocument),[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:s,role:"assistant",state:JSON.stringify(i),active:a}]):[]}case o.Bx.MESSAGES_SNAPSHOT:return c=e.messages,[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:s,role:"assistant",state:JSON.stringify({...i,...c?{messages:c}:{}}),active:!0}];case o.Bx.RUN_STARTED:return[];case o.Bx.RUN_FINISHED:return c&&(i.messages=c),0===Object.keys(i).length?[]:[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:s,role:"assistant",state:JSON.stringify({...i,...c?{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}(c)}:{}}),active:!1}];case o.Bx.RUN_ERROR:return[{type:nr.enum.RunError,message:e.message,code:e.code}];case o.Bx.STEP_STARTED:return l=e.stepName,d=[],u=null,[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:s,role:"assistant",state:JSON.stringify(i),active:!0}];case o.Bx.STEP_FINISHED:return d=[],u=null,[{type:nr.enum.AgentStateMessage,threadId:t,agentName:r,nodeName:l,runId:n,running:s,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))))}},nC=class extends nN{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:()=>s});var r=n(69899),i=n(39097);function s(e){return(0,i.T)(null==e?void 0:e[r.l])}},46072:(e,t,n)=>{n.d(t,{S:()=>s});var r=n(96948),i=n(28400);function s(e,t){var n;return(0,r.N)((n=arguments.length>=2,function(r,s){var a=n,o=t,l=0;r.subscribe((0,i._)(s,function(t){var n=l++;o=a?e(o,t,n):(a=!0,t),s.next(o)},void 0))}))}},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:()=>z,UC:()=>V,ZL:()=>W,bL:()=>Y,i3:()=>K,l9:()=>q});var r=n(12115),i=n(92556),s=n(94446),a=n(3468),o=n(44831),l=n(68946),c=n(66093),u=n(75433),d=n(76842),h=n(97602),p=n(32467),f=n(23558),m=n(861),g=n(95155),[v,b]=(0,a.A)("Tooltip",[c.Bk]),y=(0,c.Bk)(),E="TooltipProvider",T="tooltip.open",[_,k]=v(E),A=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:i=300,disableHoverableContent:s=!1,children:a}=e,o=r.useRef(!0),l=r.useRef(!1),c=r.useRef(0);return r.useEffect(()=>
1142{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,g.jsx)(_,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:r.useCallback(()=>{i<=0||(window.clearTimeout(c.current),o.current=!1)},[i]),onClose:r.useCallback(()=>{i<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,i))},[i]),isPointerInTransitRef:l,onPointerInTransitChange:r.useCallback(e=>{l.current=e},[]),disableHoverableContent:s,children:a})};A.displayName=E;var x="Tooltip",[S,w]=v(x),I=e=>{let{__scopeTooltip:t,children:n,open:i,defaultOpen:s,onOpenChange:a,disableHoverableContent:o,delayDuration:u}=e,d=k(x,e.__scopeTooltip),h=y(t),[p,m]=r.useState(null),v=(0,l.B)(),b=r.useRef(0),E=null!=o?o:d.disableHoverableContent,_=null!=u?u:d.delayDuration,A=r.useRef(!1),[w,I]=(0,f.i)({prop:i,defaultProp:null!=s&&s,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(T))):d.onClose(),null==a||a(e)},caller:x}),N=r.useMemo(()=>w?A.current?"delayed-open":"instant-open":"closed",[w]),C=r.useCallback(()=>{window.clearTimeout(b.current),b.current=0,A.current=!1,I(!0)},[I]),O=r.useCallback(()=>{window.clearTimeout(b.current),b.current=0,I(!1)},[I]),R=r.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{A.current=!0,I(!0),b.current=0},_)},[_,I]);return r.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),(0,g.jsx)(c.bL,{...h,children:(0,g.jsx)(S,{scope:t,contentId:v,open:w,stateAttribute:N,trigger:p,onTriggerChange:m,onTriggerEnter:r.useCallback(()=>{d.isOpenDelayedRef.current?R():C()},[d.isOpenDelayedRef,R,C]),onTriggerLeave:r.useCallback(()=>{E?O():(window.clearTimeout(b.current),b.current=0)},[O,E]),onOpen:C,onClose:O,disableHoverableContent:E,children:n})})};I.displayName=x;var N="TooltipTrigger",C=r.forwardRef((e,t)=>{let{__scopeTooltip:n,...a}=e,o=w(N,n),l=k(N,n),u=y(n),d=r.useRef(null),p=(0,s.s)(t,d,o.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)(c.Mz,{asChild:!0,...u,children:(0,g.jsx)(h.sG.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...a,ref:p,onPointerMove:(0,i.mK)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(m.current||l.isPointerInTransitRef.current||(o.onTriggerEnter(),m.current=!0))}),onPointerLeave:(0,i.mK)(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:(0,i.mK)(e.onPointerDown,()=>{o.open&&o.onClose(),f.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:(0,i.mK)(e.onFocus,()=>{f.current||o.onOpen()}),onBlur:(0,i.mK)(e.onBlur,o.onClose),onClick:(0,i.mK)(e.onClick,o.onClose)})})});C.displayName=N;var O="TooltipPortal",[R,D]=v(O,{forceMount:void 0}),L=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,s=w(O,t);return(0,g.jsx)(R,{scope:t,forceMount:n,children:(0,g.jsx)(d.C,{present:n||s.open,children:(0,g.jsx)(u.Z,{asChild:!0,container:i,children:r})})})};L.displayName=O;var M="TooltipContent",P=r.forwardRef((e,t)=>{let n=D(M,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,a=w(M,e.__scopeTooltip);return(0,g.jsx)(d.C,{present:r||a.open,children:a.disableHoverableContent?(0,g.jsx)(H,{side:i,...s,ref:t}):(0,g.jsx)(F,{side:i,...s,ref:t})})}),F=r.forwardRef((e,t)=>{let n=w(M,e.__scopeTooltip),i=k(M,e.__scopeTooltip),a=r.useRef(null),o=(0,s.s)(t,a),[l,c]=r.useState(null),{trigger:u,onClose:d}=n,h=a.current,{onPointerInTransitChange:p}=i,f=r.useCallback(()=>{c(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),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw Error("unreachable")}}(r,n.getBoundingClientRect());c(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(u&&h){let e=e=>m(e,h),t=e=>m(e,u);return u.addEventListener("pointerleave",e),h.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),h.removeEventListener("pointerleave",t)}}},[u,h,m,f]),r.useEffect(()=>{if(l){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.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,s=t.length-1;e<t.length;s=e++){let a=t[e],o=t[s],l=a.x,c=a.y,u=o.x,d=o.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(i=!i)}return i}(n,l);r?f():i&&(f(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,h,l,d,f]),(0,g.jsx)(H,{...e,ref:o})}),[j,B]=v(x,{isInside:!1}),U=(0,p.Dc)("TooltipContent"),H=r.forwardRef((e,t)=>
1142{let{__scopeTooltip:n,children:i,"aria-label":s,onEscapeKeyDown:a,onPointerDownOutside:l,...u}=e,d=w(M,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)(o.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:(0,g.jsxs)(c.UC,{"data-state":d.stateAttribute,...h,...u,ref:t,style:{...u.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)(j,{scope:n,isInside:!0,children:(0,g.jsx)(m.bL,{id:d.contentId,role:"tooltip",children:s||i})})]})})});P.displayName=M;var $="TooltipArrow",G=r.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=y(n);return B($,n).isInside?null:(0,g.jsx)(c.i3,{...i,...r,ref:t})});G.displayName=$;var z=A,Y=I,q=C,W=L,V=P,K=G},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 s=r.Ik({name:r.Yj(),arguments:r.Yj()}),a=r.Ik({id:r.Yj(),type:r.eu("function"),function:s,encryptedValue:r.Yj().optional()}),o=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()}),c=r.Ik({type:r.eu("data"),value:r.Yj(),mimeType:r.Yj()}),u=r.Ik({type:r.eu("url"),value:r.Yj(),mimeType:r.Yj().optional()}),d=r.gM("type",[c,u]),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=o.extend({role:r.eu("developer"),content:r.Yj()}),E=o.extend({role:r.eu("system"),content:r.Yj()}),T=o.extend({role:r.eu("assistant"),content:r.Yj().optional(),toolCalls:r.YO(a).optional()}),_=o.extend({role:r.eu("user"),content:r.KC([r.Yj(),r.YO(b)])}),k=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()}),S=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 w=r.Ik({description:r.Yj(),value:r.Yj()}),I=r.Ik({name:r.Yj(),description:r.Yj(),parameters:r.bz(),metadata:r.g1(r.bz()).optional()}),N=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()}),C=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(S),tools:r.YO(I),context:r.YO(w),forwardedProps:r.bz(),resume:r.YO(C).optional()}),R=r.bz();
1142var 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 M=r.Ik({name:r.Yj(),description:r.Yj().optional()}),P=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()}),j=r.Ik({supported:r.zM().optional(),items:r.YO(I).optional(),parallelCalls:r.zM().optional(),clientProvided:r.zM().optional()}),B=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(M).optional()}),$=r.Ik({supported:r.zM().optional(),streaming:r.zM().optional(),encrypted:r.zM().optional()}),G=r.Ik({image:r.zM().optional(),audio:r.zM().optional(),video:r.zM().optional(),pdf:r.zM().optional(),file:r.zM().optional()}),z=r.Ik({image:r.zM().optional(),audio:r.zM().optional()}),Y=r.Ik({input:G.optional(),output:z.optional()}),q=r.Ik({codeExecution:r.zM().optional(),sandboxed:r.zM().optional(),maxIterations:r.ai().optional(),maxExecutionTime:r.ai().optional()}),W=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:P.optional(),transport:F.optional(),tools:j.optional(),output:B.optional(),state:U.optional(),multiAgent:H.optional(),reasoning:$.optional(),multimodal:Y.optional(),execution:q.optional(),humanInTheLoop:W.optional(),custom:r.g1(r.L5()).optional()});let V=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_
1142SNAPSHOT",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:V.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:V.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()}),es=Z.extend({type:r.eu(K.TOOL_CALL_ARGS),toolCallId:r.Yj(),delta:r.Yj()}),ea=Z.extend({type:r.eu(K.TOOL_CALL_END),toolCallId:r.Yj()}),eo=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()}),ec=Z.extend({type:r.eu(K.THINKING_START),title:r.Yj().optional()}),eu=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(S)}),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(N).min(1)}).strict(),eT=r.gM("type",[ey,eE]),e_=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)}),ek=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()}),eS=r.KC([r.eu("tool-call"),r.eu("message")]),ew=Z.extend({type:r.eu(K.REASONING_START),messageId:r.Yj()}),eI=Z.extend({type:r.eu(K.REASONING_MESSAGE_START),messageId:r.Yj(),role:r.eu("reasoning")}),eN=Z.extend({type:r.eu(K.REASONING_MESSAGE_CONTENT),messageId:r.Yj(),delta:r.Yj()}),eC=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:eS,entityId:r.Yj(),encryptedValue:r.Yj()}),eL=r.gM("type",[X,Q,J,ee,ec,eu,et,en,er,ei,es,ea,el,eo,ed,eh,ep,ef,em,eg,ev,eb,e_,ek,eA,ex,ew,eI,eN,eC,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)=>
1142{Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,i=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){var c;return(void 0===t&&(t={}),!(c=e)||i.test(c)||n.test(c))?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,l):e.replace(s,l)).replace(r,o))}},49914:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(67927),i=n(96948),s=n(28400);function a(){return(0,i.N)(function(e,t){e.subscribe((0,s._)(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 s(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 a,o=n(12115),l=n(3468),c=n(94446),u=n(32467),d=n(95155);function h(e){let t=e+"CollectionProvider",[n,r]=(0,l.A)(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e=>{let{scope:t,children:n}=e,r=o.useRef(null),s=o.useRef(new Map).current;return(0,d.jsx)(i,{scope:t,itemMap:s,collectionRef:r,children:n})};a.displayName=t;let h=e+"CollectionSlot",p=(0,u.TL)(h),f=o.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=s(h,n),a=(0,c.s)(t,i.collectionRef);return(0,d.jsx)(p,{ref:a,children:r})});f.displayName=h;let m=e+"CollectionItemSlot",g="data-radix-collection-item",v=(0,u.TL)(m),b=o.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,a=o.useRef(null),l=(0,c.s)(t,a),u=s(m,n);return o.useEffect(()=>(u.itemMap.set(a,{ref:a,...i}),()=>void u.itemMap.delete(a))),(0,d.jsx)(v,{...{[g]:""},ref:l,children:r})});return b.displayName=m,[{Provider:a,Slot:f,ItemSlot:b},function(t){let n=s(e+"CollectionConsumer",t);return o.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)}a=new WeakMap,class e extends Map{set(e,t){return p.get(this)&&(this.has(e)?i(this,a)[i(this,a).indexOf(e)]=e:i(this,a).push(e)),super.set(e,t),this}insert(e,t,n){let r,s=this.has(t),o=i(this,a).length,l=m(e),c=l>=0?l:o+l,u=c<0||c>=o?-1:c;if(u===this.size||s&&u===this.size-1||-1===u)return this.set(t,n),this;let d=this.size+ +!s;l<0&&c++;let h=[...i(this,a)],p=!1;for(let e=c;e<d;e++)if(c===e){let i=h[e];h[e]===t&&(i=h[e+1]),s&&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,a).indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=i(this,a).indexOf(e);return -1===r?this:this.insert(r,t,n)}after(e){let t=i(this,a).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,a).indexOf(e);return -1===r?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return s(this,a,[]),super.clear()}delete(e){let t=super.delete(e);return t&&i(this,a).splice(i(this,a).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,a),e);if(void 0!==t)return this.get(t)}entryAt(e){let t=f(i(this,a),e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return i(this,a).indexOf(e)}keyAt(e){return f(i(this,a),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++}
1142}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,s=0,a=null!=i?i:this.at(0);for(let e of this)a=0===s&&1===t.length?e:Reflect.apply(r,this,[a,e,s,this]),s++;return a}reduceRight(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let[r,i]=t,s=null!=i?i:this.at(-1);for(let e=this.size-1;e>=0;e--){let n=this.at(e);s=e===this.size-1&&1===t.length?n:Reflect.apply(r,this,[s,n,e,this])}return s}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,a,{writable:!0,value:void 0}),s(this,a,[...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},s=1e3/60,a=!1;function o(e,t){let n=(0,r.useCallback)(t=>(n.current=t,e(t)),t);return n}globalThis.document?.addEventListener("mousedown",()=>{a=!0}),globalThis.document?.addEventListener("mouseup",()=>{a=!1}),globalThis.document?.addEventListener("click",()=>{a=!1});let l=new Map;function c(...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 u=(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),[u,d]=(0,r.useState)(!1),h=(0,r.useRef)(null);h.current=e;let p=(0,r.useCallback)(()=>{if(!a)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||!_.current)return 0;return T.current.scrollHeight-1-T.current.clientHeight},get calculatedTargetScrollTop(){if(!T.current||!_.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:_.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=c(h.current,e.animation),{ignoreEscapes:i=!1}=e,a=g.calculatedTargetScrollTop;e.duration instanceof Promise?e.duration.finally(()=>{t=Date.now()}):t=n+(e.duration??0);let o=async()=>{let e=new Promise(requestAnimationFrame).then(()=>
1142{if(!g.isAtBottom)return g.animation=void 0,!1;let{scrollTop:l}=g,u=performance.now(),d=(u-(g.lastTick??u))/s;if(g.animation||(g.animation={behavior:r,promise:e,ignoreEscapes:i}),g.animation.behavior===r&&(g.lastTick=u),p()||n>Date.now())return o();if(l<Math.min(a,g.calculatedTargetScrollTop)){if(g.animation?.behavior===r){if("instant"===r)return g.scrollTop=g.calculatedTargetScrollTop,o();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 o()}return t>Date.now()?(a=g.calculatedTargetScrollTop,o()):(g.animation=void 0,g.scrollTop<g.calculatedTargetScrollTop)?v({animation:c(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:o()},[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=o(e=>{T.current?.removeEventListener("scroll",y),T.current?.removeEventListener("wheel",E),e?.addEventListener("scroll",y,{passive:!0}),e?.addEventListener("wheel",E,{passive:!0})},[]),_=o(e=>{let t;g.resizeObserver?.disconnect(),g.resizeObserver=void 0,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=c(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:_,scrollRef:T,scrollToBottom:v,stopScroll:b,isAtBottom:i||u,isNearBottom:u,escapedFromLock:t,state:g}})({mass:l,damping:h,stiffness:p,resize:n,initial:i,targetScrollTop:r.useCallback((e,t)=>{let n=S?.targetScrollTop??f;return n?.(e,t)??e},[f])}),{scrollRef:y,contentRef:E,scrollToBottom:T,stopScroll:_,isAtBottom:k,escapedFromLock:A,state:x}=e??b,S=(0,r.useMemo)(()=>({scrollToBottom:T,stopScroll:_,scrollRef:y,isAtBottom:k,escapedFromLock:A,contentRef:E,state:x,get targetScrollTop(){return v.current},set targetScrollTop(targetScrollTop){v.current=targetScrollTop}}),[T,k,E,y,_,A,x]);return(0,r.useImperativeHandle)(m,()=>S,[S]),d(()=>{y.current&&"visible"===getComputedStyle(y.current).overflow&&(y.current.style.overflow="auto")},[]),r.createElement(u.Provider,{value:S},r.createElement("div",{...g},"function"==typeof t?t(S):t))}function p(){let e=(0,r.useContext)(u);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:()=>w,AH:()=>c,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,s=Symbol(),a=new WeakMap;class o{constructor(e,t,n){if(this._$cssResult$=!0,n!==s)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=a.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&a.set(t,e))}return e}toString(){return this.cssText}}let l=e=>new o("string"==typeof e?e:e+"",void 0,s),c=(e,...t)=>new o(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,s),u=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}},_=(e,t)=>
1142!d(e,t),k={attribute:!0,type:String,converter:T,reflect:!1,useDefault:!1,hasChanged:_};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=k){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 s=r?.call(this);i?.call(this,t),this.requestUpdate(e,s,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??k}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(u(n));else void 0!==e&&t.push(u(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 s=i.fromAttribute(t,e.type);this[r]=s??this._$Ej?.get(r)??s,this._$Em=null}}requestUpdate(e,t,n,r=!1,i){if(void 0!==e){let s=this.constructor;if(!1===r&&(i=this[e]),!(((n??=s.getPropertyOptions(e)).hasChanged??_)(i,t)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(s._$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},s){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),!0!==i||void 0!==s)||(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
1142=>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 S=globalThis;class w 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}}w._$litElement$=!0,w.finalized=!0,S.litElementHydrateSupport?.({LitElement:w});let I=S.litElementPolyfillSupport;I?.({LitElement:w}),(S.litElementVersions??=[]).push("4.2.2")},52321:(e,t,n)=>{n.d(t,{XX:()=>G,c0:()=>S,ge:()=>H,qy:()=>x,s6:()=>w});let r=globalThis,i=e=>e,s=r.trustedTypes,a=s?s.createPolicy("lit-html",{createHTML:e=>e}):void 0,o="$lit$",l=`lit$${Math.random().toFixed(9).slice(2)}$`,c="?"+l,u=`<${c}>`,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}*(?:[^ 	
1143\f\r"'\`<>=]|("|')|))|$)`,"g"),T=/'/g,_=/"/g,k=/^(?:script|style|textarea|title)$/i,A=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),x=A(1),S=(A(2),A(3),Symbol.for("lit-noChange")),w=Symbol.for("lit-nothing"),I=new WeakMap,N=d.createTreeWalker(d,129);function C(e,t){if(!f(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==a?a.createHTML(t):t}let O=(e,t)=>{let n=e.length-1,r=[],i,s=2===t?"<svg>":3===t?"<math>":"",a=v;for(let t=0;t<n;t++){let n=e[t],c,d,h=-1,p=0;for(;p<n.length&&(a.lastIndex=p,null!==(d=a.exec(n)));)p=a.lastIndex,a===v?"!--"===d[1]?a=b:void 0!==d[1]?a=y:void 0!==d[2]?(k.test(d[2])&&(i=RegExp("</"+d[2],"g")),a=E):void 0!==d[3]&&(a=E):a===E?">"===d[0]?(a=i??v,h=-1):void 0===d[1]?h=-2:(h=a.lastIndex-d[2].length,c=d[1],a=void 0===d[3]?E:'"'===d[3]?_:T):a===_||a===T?a=E:a===b||a===y?a=v:(a=E,i=void 0);let f=a===E&&e[t+1].startsWith("/>")?" ":"";s+=a===v?n+u:h>=0?(r.push(c),n.slice(0,h)+o+n.slice(h)+l+f):n+l+(-2===h?t:f)}return[C(e,s+(e[n]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),r]};class R{constructor({strings:e,_$litType$:t},n){let r;this.parts=[];let i=0,a=0,u=e.length-1,d=this.parts,[p,f]=O(e,t);if(this.el=R.createElement(p,n),N.currentNode=this.el.content,2===t||3===t){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(r=N.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(let e of r.getAttributeNames())if(e.endsWith(o)){let t=f[a++],n=r.getAttribute(e).split(l),s=/([.?@])?(.*)/.exec(t);d.push({type:1,index:i,name:s[2],strings:n,ctor:"."===s[1]?F:"?"===s[1]?j:"@"===s[1]?B:P}),r.removeAttribute(e)}else e.startsWith(l)&&(d.push({type:6,index:i}),r.removeAttribute(e));if(k.test(r.tagName)){let e=r.textContent.split(l),t=e.length-1;if(t>0){r.textContent=s?s.emptyScript:"";for(let n=0;n<t;n++)r.append(e[n],h()),N.nextNode(),d.push({type:2,index:++i});r.append(e[t],h())}}}else if(8===r.nodeType)if(r.data===c)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===S)return t;let i=void 0!==r?n._$Co?.[r]:n._$Cl,s=p(t)?void 0:t._$litDirective$;return i?.constructor!==s&&(i?._$AO?.(!1),void 0===s?i=void 0:(i=new s(e))._$AT(e,n,r),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(t=
1143D(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);N.currentNode=r;let i=N.nextNode(),s=0,a=0,o=n[0];for(;void 0!==o;){if(s===o.index){let t;2===o.type?t=new M(i,i.nextSibling,this,e):1===o.type?t=new o.ctor(i,o.name,o.strings,this,e):6===o.type&&(t=new U(i,this,e)),this._$AV.push(t),o=n[++a]}s!==o?.index&&(i=N.nextNode(),s++)}return N.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 M{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,r){this.type=2,this._$AH=w,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===w||null==e||""===e?(this._$AH!==w&&this._$AR(),this._$AH=w):e!==this._$AH&&e!==S&&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!==w&&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(C(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=I.get(e.strings);return void 0===t&&I.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 M(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 P{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,r,i){this.type=1,this._$AH=w,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=w}_$AI(e,t=this,n,r){let i=this.strings,s=!1;if(void 0===i)(s=!p(e=D(this,e,t,0))||e!==this._$AH&&e!==S)&&(this._$AH=e);else{let r,a,o=e;for(e=i[0],r=0;r<i.length-1;r++)(a=D(this,o[n+r],t,r))===S&&(a=this._$AH[r]),s||=!p(a)||a!==this._$AH[r],a===w?e=w:e!==w&&(e+=(a??"")+i[r+1]),this._$AH[r]=a}s&&!r&&this.j(e)}j(e){e===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class F extends P{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===w?void 0:e}}class j extends P{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==w)}}class B extends P{constructor(e,t,n,r,i){super(e,t,n,r,i),this.type=5}
1143_$AI(e,t=this){if((e=D(this,e,t,0)??w)===S)return;let n=this._$AH,r=e===w&&n!==w||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==w&&(n===w||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:o,P:l,A:c,C:1,L:O,R:L,D:m,V:D,I:M,H:P,N:j,U:B,B:F,F:U},$=r.litHtmlPolyfillSupport;$?.(R,M),(r.litHtmlVersions??=[]).push("3.3.3");let G=(e,t,n)=>{let r=n?.renderBefore??t,i=r._$litPart$;if(void 0===i){let e=n?.renderBefore??null;r._$litPart$=i=new M(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,s=!1;for(;!s;){-1===r&&(r=n.length,s=!0);let e=n.slice(i,r).trim();(e||!s)&&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:()=>u,N4:()=>d});var r=n(33859);function i(e,t){return e<<t|e>>>32-t}let s=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 s=Math.ceil(((e=r).length/4+2)/16),a=Array(s);for(let t=0;t<s;++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];a[t]=n}a[s-1][14]=(e.length-1)*8/0x100000000,a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=(e.length-1)*8|0;for(let e=0;e<s;++e){let r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=a[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 s=n[0],o=n[1],l=n[2],c=n[3],u=n[4];for(let e=0;e<80;++e){let n=Math.floor(e/20),a=i(s,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,o,l,c)+u+t[n]+r[e]>>>0;u=c,c=l,l=i(o,30)>>>0,o=s,s=a}n[0]=n[0]+s>>>0,n[1]=n[1]+o>>>0,n[2]=n[2]+l>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+u>>>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]>
1143>24,n[3]>>16,n[3]>>8,n[3],n[4]>>24,n[4]>>16,n[4]>>8,n[4])},a=/^(?:[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,o=function(e){let t;if(!("string"==typeof e&&a.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 c(e,t,n,r){var i=t,a=r;let c="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,u="string"==typeof i?o(i):i;if("string"==typeof i&&(i=o(i)),i?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let d=new Uint8Array(16+c.length);if(d.set(u),d.set(c,u.length),(d=s(d))[6]=15&d[6]|80,d[8]=63&d[8]|128,n){if((a=a||0)<0||a+16>n.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;++e)n[a+e]=d[e];return n}return(0,l.k)(d)}function u(){return"ck-"+(0,r.A)()}function d(){return(0,r.A)()}function h(e,t){let n="e4b01160-ff74-4c6e-9b27-d53cd930fe8e",r=t?c(t,n):n;return c("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)}c.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",c.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(71729)),i=n(49677);function s(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}s.default=s,e.exports=s},55180:(e,t,n)=>{n.d(t,{m:()=>s});var r=n(29846),i=n(14192);function s(e){i.f.setTimeout(function(){var t=r.$.onUnhandledError;if(t)t(e);else throw e})}},56522:(e,t,n)=>{n.d(t,{IN:()=>s,dc:()=>a,_Z:()=>o,VG:()=>l});var r=n(95502);let i=[],s=!0,a=!1,o="skip";function l(e,t,n,l){let c;"function"==typeof t&&"function"!=typeof n?(l=n,n=t):c=t;let u=(0,r.C)(c),d=l?-1:1;(function e(r,c,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||u(r,c,h[h.length-1]||void 0))&&(v=Array.isArray(p=n(r,h))?p:"number"==typeof p?[s,p]:null==p?i:[p])[0]===a)return v;if("children"in r&&r.children&&r.children&&v[0]!==o)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]===a)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,s=("undefined"!=typeof self?self:null)||i||globalThis,a={connecting:0,open:1,closing:2,closed:3},o={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"},c={longpoll:"longpoll",websocket:"websocket"},u={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}
1143matchReceive({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=o.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=o.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(e=>e.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=o.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=o.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=o.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=o.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=o.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}
1143isMember(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=o.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 s=this.bindings.filter(t=>t.event===e);for(let e=0;e<s.length;e++)s[e].callback(i,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===o.closed}isErrored(){return this.state===o.errored}isJoined(){return this.state===o.joined}isJoining(){return this.state===o.joining}isLeaving(){return this.state===o.leaving}},m=class{static request(e,t,n,r,i,a,o){if(s.XDomainRequest){let n=new s.XDomainRequest;return this.xdomainRequest(n,e,t,r,i,a,o)}if(s.XMLHttpRequest){let l=new s.XMLHttpRequest;return this.xhrRequest(l,e,t,n,r,i,a,o)}if(s.fetch&&s.AbortController)return this.fetchRequest(e,t,n,r,i,a,o);throw Error("No suitable XMLHttpRequest implementation found")}static fetchRequest(e,t,n,r,i,a,o){let l={method:e,headers:n,body:r},c=null;return i&&(c=new AbortController,setTimeout(()=>c.abort(),i),l.signal=c.signal),s.fetch(t,l).then(e=>e.text()).then(e=>this.parseJSON(e)).then(e=>o&&o(e)).catch(e=>{"AbortError"===e.name&&a?a():o&&o(null)}),c}static xdomainRequest(e,t,n,r,i,s,a){return e.timeout=i,e.open(t,n),e.onload=()=>{let t=this.parseJSON(e.responseText);a&&a(t)},s&&(e.ontimeout=s),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,i,s,a,o){for(let[i,a]of(e.open(t,n,!0),e.timeout=s,Object.entries(r)))e.setRequestHeader(i,a);return e.onerror=()=>o&&o(null),e.onreadystatechange=()=>{e.readyState===u.complete&&o&&o(this.parseJSON(e.responseText))},a&&(e.ontimeout=a),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,s=e[r];"object"==typeof s?n.push(this.serialize(s,i)):n.push(encodeURIComponent(i)+"="+encodeURIComponent(s))}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=a.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(RegExp("(.*)/"+c.websocket),"$1/"+c.longpoll)}endpointURL(){return m.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=a.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===a.open||this.readyState===a.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=a.open,this.onopen({}),this.poll();break;
1143case 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=a.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 s,a=()=>{this.reqs.delete(s),r()};s=m.request(e,this.endpointURL(),t,n,this.timeout,a,e=>{this.reqs.delete(s),this.isActive()&&i(e)}),this.reqs.add(s)}},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,s,a]=JSON.parse(e);return t({join_ref:n,ref:r,topic:i,event:s,payload:a})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:i,payload:s}=e,a=new TextEncoder,o=a.encode(t),l=a.encode(n),c=a.encode(i),u=a.encode(r);this.assertFieldSize(o.byteLength,"join_ref"),this.assertFieldSize(l.byteLength,"ref"),this.assertFieldSize(c.byteLength,"topic"),this.assertFieldSize(u.byteLength,"event");let d=this.META_LENGTH+o.byteLength+l.byteLength+c.byteLength+u.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++,o.byteLength),f.setUint8(m++,l.byteLength),f.setUint8(m++,c.byteLength),f.setUint8(m++,u.byteLength),p.set(o,m),m+=o.byteLength,p.set(l,m),m+=l.byteLength,p.set(c,m),m+=c.byteLength,p.set(u,m),m+=u.byteLength;var g=new Uint8Array(h.byteLength+s.byteLength);return g.set(p,0),g.set(new Uint8Array(s),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),s=t.getUint8(3),a=this.HEADER_LENGTH+this.META_LENGTH-1,o=n.decode(e.slice(a,a+r));a+=r;let l=n.decode(e.slice(a,a+i));a+=i;let c=n.decode(e.slice(a,a+s));return a+=s,{join_ref:o,ref:null,topic:l,event:c,payload:e.slice(a,e.byteLength)}},decodeReply(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),s=t.getUint8(3),a=t.getUint8(4),o=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(o,o+r));o+=r;let u=n.decode(e.slice(o,o+i));o+=i;let d=n.decode(e.slice(o,o+s));o+=s;let h=n.decode(e.slice(o,o+a));o+=a;let p=e.slice(o,e.byteLength);return{join_ref:c,ref:u,topic:d,event:l.reply,payload:{status:h,response:p}}},decodeBroadcast(e,t,n){let r=t.getUint8(1),i=t.getUint8(2),s=this.HEADER_LENGTH+2,a=n.decode(e.slice(s,s+r));s+=r;let o=n.decode(e.slice(s,s+i));return s+=i,{join_ref:null,ref:null,topic:a,event:o,payload:e.slice(s,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||s.WebSocket||g,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=t.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=t.sessionStorage||s&&s.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}/${c.websocket}`,this.vsn=t.vsn||"2.0.0",this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new p(()=>
1143{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
1143allback(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,s=!0,a=this.transportName(e),o=t=>{this.log("transport",`falling back to ${a}...`,t),this.off([n,r]),s=!1,this.replaceTransport(e),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return o("memorized");this.fallbackTimer=setTimeout(o,t),r=this.onError(e=>{this.log("transport","error",e),s&&!i&&(clearTimeout(this.fallbackTimer),o(e))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(i=!0,!s){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(o,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===a.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()}
1143triggerChanError(){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(l.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case a.connecting:return"connecting";case a.open:return"open";case a.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:s}=e;this.log("push",`${t} ${n} (${s}, ${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:s}=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 a=this.channels[e];a.isMember(t,n,r,s)&&a.trigger(n,r,i,s)}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,{$:()=>c});var r=n(71450),i=n(96948),s=n(50729),a=n(95868),o=n(78842);function l(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(0,a.lI)(e);return(0,i.N)(function(t,i){(0,s.K)()((0,o.H)((0,r.fX)([t],(0,r.zs)(e)),n)).subscribe(i)})}function c(){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:()=>a});var r=n(50729),i=n(95868),s=n(78842);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return(0,r.K)()((0,s.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 s(e){return"number"==typeof e&&Number.isSafeInteger(e)&&e>=0}function a(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),a=function(e){if(r(e))switch(e.state){case"valid":case"none":case"expired":case"unknown":return{state:e.state};default:return}}(e.license),o=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 s=n.slice(r+3),a=s.indexOf("/");if((-1===a?s:s.slice(0,a)).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 o="localhost"===t.hostname||"127.0.0.1"===t.hostname||"[::1]"===t.hostname;if("http:"===t.protocol&&o)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;
1143if(!s(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"),a=s(i)?i:void 0;return{used:n,limit:t,...void 0===a?{}:{expiringSoonCount:a}}}(e.usage);return{schemaVersion:1,...void 0===t?{}:{identity:t},...void 0===n?{}:{plan:n},...void 0===a?{}:{license:a},...void 0===o?{}:{action:o},...void 0===l?{}:{usage:l}}}n.d(t,{f:()=>a})},62432:(e,t,n)=>{n.d(t,{j1:()=>T,km:()=>y,h9:()=>v,Ru:()=>g,w7:()=>h,L7:()=>E,Cj:()=>b,D1:()=>u,tS:()=>_,AI:()=>c});let r=/\r\n|[\n\r]/g;function i(e,t){let n=0,i=1;for(let s of e.body.matchAll(r)){if("number"==typeof s.index||function(e,t){if(!e)throw Error("Unexpected invariant triggered.")}(!1),s.index>=t)break;n=s.index+s[0].length,i+=1}return{line:i,column:t+1-n}}function s(e,t){let n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,s=e.locationOffset.line-1,o=t.line+s,l=1===t.line?n:0,c=t.column+l,u=`${e.name}:${o}:${c}
1144`,d=r.split(/\r\n|[\n\r]/g),h=d[i];if(h.length>120){let e=Math.floor(c/80),t=[];for(let e=0;e<h.length;e+=80)t.push(h.slice(e,e+80));return u+a([[`${o} |`,t[0]],...t.slice(1,e+1).map(e=>["|",e]),["|","^".padStart(c%80)],["|",t[e+1]]])}return u+a([[`${o-1} |`,d[i-1]],[`${o} |`,h],["|","^".padStart(c)],[`${o+1} |`,d[i+1]]])}function a(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 o extends Error{constructor(e,...t){var n,r,s;let{nodes:a,source:c,positions:u,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(a)?a:a?[a]:void 0);let f=l(null==(n=this.nodes)?void 0:n.map(e=>e.loc).filter(e=>null!=e));this.source=null!=c?c:null==f||null==(r=f[0])?void 0:r.source,this.positions=null!=u?u:null==f?void 0:f.map(e=>e.start),this.locations=u&&c?u.map(e=>i(c,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!=(s=null!=p?p:m)?s: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,o):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"+s((t=n.loc).source,i(t.source,t.start)))}else if(this.source&&this.locations)for(let t of this.locations)e+="\n\n"+s(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 c=function(e){return e.CRITICAL="critical",e.WARNING="warning",e.INFO="info",e}({}),u=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;
1144let 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:u.BANNER,severity:c.CRITICAL},[h.NOT_FOUND]:{statusCode:404,troubleshootingUrl:`${p}/troubleshooting/common-issues#network-errors-api-not-found`,visibility:u.BANNER,severity:c.CRITICAL},[h.AGENT_NOT_FOUND]:{statusCode:500,troubleshootingUrl:`${p}/langgraph-python/coagent-troubleshooting/common-coagent-issues#i-am-getting-agent-not-found-error`,visibility:u.BANNER,severity:c.CRITICAL},[h.API_NOT_FOUND]:{statusCode:404,troubleshootingUrl:`${p}/troubleshooting/common-issues#network-errors-api-not-found`,visibility:u.BANNER,severity:c.CRITICAL},[h.REMOTE_ENDPOINT_NOT_FOUND]:{statusCode:404,troubleshootingUrl:`${p}/troubleshooting/common-issues#remote-endpoint-not-found-error`,visibility:u.BANNER,severity:c.CRITICAL},[h.AUTHENTICATION_ERROR]:{statusCode:401,troubleshootingUrl:`${p}/troubleshooting/common-issues`,visibility:u.BANNER,severity:c.CRITICAL},[h.MISUSE]:{statusCode:400,troubleshootingUrl:null,visibility:u.DEV_ONLY,severity:c.WARNING},[h.UNKNOWN]:{statusCode:500,visibility:u.TOAST,severity:c.CRITICAL},[h.CONFIGURATION_ERROR]:{statusCode:400,troubleshootingUrl:null,severity:c.WARNING,visibility:u.BANNER},[h.MISSING_PUBLIC_API_KEY_ERROR]:{statusCode:400,troubleshootingUrl:null,severity:c.CRITICAL,visibility:u.BANNER},[h.UPGRADE_REQUIRED_ERROR]:{statusCode:402,troubleshootingUrl:null,severity:c.WARNING,visibility:u.BANNER},[h.VERSION_MISMATCH]:{statusCode:400,troubleshootingUrl:null,visibility:u.DEV_ONLY,severity:c.INFO}};var g=class extends o{constructor({message:e="Unknown error occurred",code:t,severity:n,visibility:r}){let i=d.COPILOT_ERROR,s=m[t],{statusCode:a}=s,o=r??s.visibility??u.TOAST,l=n??("severity"in s?s.severity:void 0);super(e,{extensions:{name:i,statusCode:a,code:t,visibility:o,severity:l,troubleshootingUrl:"troubleshootingUrl"in s?s.troubleshootingUrl:null,originalError:{message:e,stack:Error().stack}}}),this.code=t,this.name=i,this.statusCode=a,this.severity=l,this.visibility=o}},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}.
1145
1146${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,s=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.
1147
1148${s}`:`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.
1149
1150${s}`}else t=`${n?`Agent '${n}'`:"The requested agent"} was not found. Please set up at least one agent before proceeding. ${s}`;super({message:t,code:i}),this.name=d.COPILOT_KIT_AGENT_DISCOVERY_ERROR}},E=class extends g{constructor({error:e,url:t,message:n}
1150){let r=h.NETWORK_ERROR;super({message:n??k({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=c.WARNING}},_=class extends T{constructor(e){super(e),this.name=d.MISSING_PUBLIC_API_KEY_ERROR,this.severity=c.CRITICAL}};let k=({errorCode:e,url:t})=>{let n=m[h.NETWORK_ERROR].troubleshootingUrl,r=(e=`Failed to fetch from url ${t}.`)=>`${e}.
1151
1152Possible reasons:
1153- -The server may have an error preventing it from returning a response (Check the server logs for more info).
1154- -The server might be down or unreachable
1155- -There might be a network issue (e.g., DNS failure, connection timeout) 
1156- -The URL might be incorrect
1157- -The server is not running on the specified port
1158
1159${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.
1160
1161${f(n)}`;case"ENOTFOUND":return`The server on ${t} could not be found. Check the URL or your network configuration.
1162
1163${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.
1164
1165${f(n)}`;default:return}}},62473:(e,t,n)=>{n.d(t,{w:()=>a});var r=n(96948),i=n(28400),s=n(34793);function a(){return(0,r.N)(function(e,t){e.subscribe((0,i._)(t,s.l))})}},63704:(e,t,n)=>{n.d(t,{T:()=>s});var r=n(96948),i=n(28400);function s(e,t){return(0,r.N)(function(n,r){var s=0;n.subscribe((0,i._)(r,function(n){r.next(e.call(t,n,s++))}))})}},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,o.T)(n))?e(function(e,s){return(0,r.T)(function(t,r){return n(e,t,s,r)})((0,i.Tg)(t(e,s)))},l):("number"==typeof n&&(l=n),(0,s.N)(function(e,n){var r,s,o,c,u,d,h,p,f;return r=l,o=[],c=0,u=0,d=!1,h=function(){!d||o.length||c||n.complete()},p=function(e){return c<r?f(e):o.push(e)},f=function(e){c++;var l=!1;(0,i.Tg)(t(e,u++)).subscribe((0,a._)(n,function(e){s?p(e):n.next(e)},function(){l=!0},void 0,function(){if(l)try{for(c--;o.length&&c<r;)!function(){var e=o.shift();f(e)}();h()}catch(e){n.error(e)}}))},e.subscribe((0,a._)(n,p,function(){d=!0,h()})),function(){}}))}});var r=n(63704),i=n(8286),s=n(96948),a=(n(20437),n(28400)),o=n(39097)},65333:(e,t,n)=>{n.d(t,{E:()=>u});var r=n(71450),i=n(96948),s=n(28400),a=n(8286),o=n(77163),l=n(34793),c=n(95868);function u(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=(0,c.ms)(e);return(0,i.N)(function(t,i){for(var c=e.length,u=Array(c),d=e.map(function(){return!1}),h=!1,p=function(t){(0,a.Tg)(e[t]).subscribe((0,s._)(i,function(e){u[t]=e,!h&&!d[t]&&(d[t]=!0,(h=d.every(o.D))&&(d=null))},l.l))},f=0;f<c;f++)p(f);t.subscribe((0,s._)(i,function(e){if(h){var t=(0,r.fX)([e],(0,r.zs)(u));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:()=>eV,Bk:()=>eR});var i=n(12115);let s=["top","right","bottom","left"],a=Math.min,o=Math.max,l=Math.round,c=Math.floor,u=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"],_=["bottom","top"];function k(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 S(e,t,n){let r,{reference:i,floating:s}=e,a=v(t),o=m(v(t)),l=g(o),c=p(t),u="y"===a,d=i.x+i.width/2-s.width/2,h=i.y+i.height/2-s.height/2,b=i[l]/2-s[l]/2;switch(c){case"top":r={x:d,y:i.y-s.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-s.width,y:h};break;default:r={x:i.x,y:i.y}}switch(f(t)){case"start":r[o]-=b*(n&&u?-1:1);break;case"end":r[o]+=b*(n&&u?-1:1)}return r}async function w(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=h(t,e),m=A(f),g=o[p?"floating"===d?"reference":"floating":d],v=x(await s.getClippingRect
vendor: 1,244 bytes, line 1165
1165({element:null==(n=await (null==s.isElement?void 0:s.isElement(g)))||n?g:g.contextElement||await (null==s.getDocumentElement?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),b="floating"===d?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,y=await (null==s.getOffsetParent?void 0:s.getOffsetParent(o.floating)),E=await (null==s.isElement?void 0:s.isElement(y))&&await (null==s.getScale?void 0:s.getScale(y))||{x:1,y:1},T=x(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,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 I=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,o=a.detectOverflow?a:{...a,detectOverflow:w},l=await (null==a.isRTL?void 0:a.isRTL(t)),c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=S(c,r,l),h=r,p=0,f={};for(let n=0;n<s.length;n++){let m=s[n];if(!m)continue;let{name:g,fn:v}=m,{x:b,y:y,data:E,reset:T}=await v({x:u,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:f,re
1165cts:c,platform:o,elements:{reference:e,floating:t}});u=null!=b?b:u,d=null!=y?y:d,f[g]={...f[g],...E},T&&p<50&&(p++,"object"==typeof T&&(T.placement&&(h=T.placement),T.rects&&(c=!0===T.rects?await a.getElementRects({reference:e,floating:t,strategy:i}):T.rects),{x:u,y:d}=S(c,h,l)),n=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:f}};function N(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function C(e){return s.some(t=>e[t]>=0)}let O=new Set(["left","top"]);async function R(e,t){let{placement:n,platform:r,elements:i}=e,s=await (null==r.isRTL?void 0:r.isRTL(i.floating)),a=p(n),o=f(n),l="y"===v(n),c=O.has(a)?-1:1,u=s&&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 o&&"number"==typeof b&&(g="end"===o?-1*b:b),l?{x:g*u,y:m*c}:{x:m*c,y:g*u}}function D(){return"undefined"!=typeof window}function L(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function M(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(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 M(e).Node)}function j(e){return!!D()&&(e instanceof Element||e instanceof M(e).Element)}function B(e){return!!D()&&(e instanceof HTMLElement||e instanceof M(e).HTMLElement)}function U(e){return!!D()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof M(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 G=/transform|translate|scale|rotate|perspective|filter/,z=/paint|layout|strict|content/,Y=e=>!!e&&"none"!==e;function q(e){let t=j(e)?K(e):e;return Y(t.transform)||Y(t.translate)||Y(t.scale)||Y(t.rotate)||Y(t.perspective)||!W()&&(Y(t.backdropFilter)||Y(t.filter))||G.test(t.willChange||"")||z.test(t.contain||"")}function W(){return null==r&&(r="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),r}function V(e){return/^(html|body|#document)$/.test(L(e))}function K(e){return M(e).getComputedStyle(e)}function Z(e){return j(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||P(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 V(n)?t.ownerDocument?t.ownerDocument.body:t.body:B(n)&&H(n)?n:e(n)}(e),s=i===(null==(r=e.ownerDocument)?void 0:r.body),a=M(i);if(!s)return t.concat(i,Q(i,[],n));{let e=J(a);return t.concat(a,a.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=B(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,o=l(n)!==s||l(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function et(e){return j(e)?e:e.contextElement}function en(e){let t=et(e);if(!B(t))return u(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:s}=ee(t),a=(s?l(n.width):n.width)/r,o=(s?l(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),o&&Number.isFinite(o)||(o=1),{x:a,y:o}}let er=u(0);function ei(e){let t=M(e);return W()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:er}function es(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let s=e.getBoundingClientRect(),a=et(e),o=u(1);t&&(r?j(r)&&(o=en(r)):o=en(e));let l=(void 0===(i=n)&&(i=!1),r&&(!i||r===M(a))&&i)?ei(a):u(0),c=(s.left+l.x)/o.x,d=(s.top+l.y)/o.y,h=s.width/o.x,p=s.height/o.y;if(a){let e=M(a),t=r&&j(r)?M(r):r,n=e,i=J(n);for(;i&&r&&t!==n;){let e=en(i),t=i.getBoundingClientRect(),r=K(i),s=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.to
1165p+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,d*=e.y,h*=e.x,p*=e.y,c+=s,d+=a,i=J(n=M(i))}}return x({width:h,height:p,x:c,y:d})}function ea(e,t){let n=Z(e).scrollLeft;return t?t.left+n:es(P(e)).left+n}function eo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ea(e,n),y:n.top+t.scrollTop}}function el(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=M(e),r=P(e),i=n.visualViewport,s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;let e=W();(!e||e&&"fixed"===t)&&(o=i.offsetLeft,l=i.offsetTop)}let c=ea(r);if(c<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-i);a<=25&&(s-=a)}else c<=25&&(s+=c);return{width:s,height:a,x:o,y:l}}(e,n);else if("document"===t)r=function(e){let t=P(e),n=Z(e),r=e.ownerDocument.body,i=o(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=o(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+ea(e),l=-n.scrollTop;return"rtl"===K(r).direction&&(a+=o(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:l}}(P(e));else if(j(t))r=function(e,t){let n=es(e,!0,"fixed"===t),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=B(e)?en(e):u(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y;return{width:a,height:o,x:i*s.x,y:r*s.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 ec(e){return"static"===K(e).position}function eu(e,t){if(!B(e)||"fixed"===K(e).position)return null;if(t)return t(e);let n=e.offsetParent;return P(e)===n&&(n=n.ownerDocument.body),n}function ed(e,t){var n;let r=M(e);if($(e))return r;if(!B(e)){let t=X(e);for(;t&&!V(t);){if(j(t)&&!ec(t))return t;t=X(t)}return r}let i=eu(e,t);for(;i&&(n=i,/^(table|td|th)$/.test(L(n)))&&ec(i);)i=eu(i,t);return i&&V(i)&&ec(i)&&!q(i)?r:i||function(e){let t=X(e);for(;B(t)&&!V(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=B(t),i=P(t),s="fixed"===n,a=es(e,!0,s,t),o={scrollLeft:0,scrollTop:0},l=u(0);if(r||!r&&!s)if(("body"!==L(t)||H(i))&&(o=Z(t)),r){let e=es(t,!0,s,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=ea(i));s&&!r&&i&&(l.x=ea(i));let c=!i||r||s?u(0):eo(i,o);return{x:a.left+o.scrollLeft-l.x-c.x,y:a.top+o.scrollTop-l.y-c.y,width:a.width,height:a.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,s="fixed"===i,a=P(r),o=!!t&&$(t.floating);if(r===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},c=u(1),d=u(0),h=B(r);if((h||!h&&!s)&&(("body"!==L(r)||H(a))&&(l=Z(r)),h)){let e=es(r);c=en(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let p=!a||h||s?u(0):eo(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-l.scrollTop*c.y+d.y+p.y}},getDocumentElement:P,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,s=[..."clippingAncestors"===n?$(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=Q(e,[],!1).filter(e=>j(e)&&"body"!==L(e)),i=null,s="fixed"===K(e).position,a=s?X(e):e;for(;j(a)&&!V(a);){let t=K(a),n=q(a);n||"fixed"!==t.position||(i=null),(s?n||i:!(!n&&"static"===t.position&&i&&("absolute"===i.position||"fixed"===i.position)||H(a)&&!n&&function e(t,n){let r=X(t);return!(r===n||!j(r)||V(r))&&("fixed"===K(r).position||e(r,n))}(e,a)))?i=t:r=r.filter(e=>e!==a),a=X(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],l=el(t,s[0],i),c=l.top,u=l.right,d=l.bottom,h=l.left;for(let e=1;e<s.length;e++){let n=el(t,s[e],i);c=o(n.top,c),u=a(n.right,u),d=a(n.bottom,d),h=o(n.left,h)}return{width:u-h,height:d-c,x:h,y:c}},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:j,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:s,platform:l,elements:c,middlewareData:u}=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),_=await l.getDimensions(d),k="y"===E,x=k?"clientHeight":"clientWidth",S=s.reference[T]+s.reference[E]-y[E]-s.floating[T],w=y[E]-s.reference[E],I=await (null==l.getOffsetParent?void 0:l.getOffsetParent(d)),N=I?I[x]:0;N&&await (null==l.isElement?void 0:l.isElement(I))||(N=c.floating[x]||s.floating[T]);let C=N/2-_[T]/2-1,O=a(b[k?"top":"left"],C),R=a(b[k?"bottom":"right"],C),D=N-_[T]-R,L=N/2-_[T]/2+(S/2-w/2),M=o(O,a(L,D)),P=!u.arrow&&null!=f(i)&&L!==M&&s.reference[T]/2-(L<O?O:R)-_[T]/2<0,F=P?L<O?L-O:L-D:0;return{[E]:y[E]+F,data:{[E]:M,centerOffset:L-M-F,...P&&{alignmentOffset:F}},reset:P}}});var eg=n(47650),ev="undefined"!=typeof document?i.useLayoutEffect:function(){};function eb(e,t){let n,r,i;if(e===t)return!0;
1165if(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 e_=n(97602),ek=n(95155),eA=i.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...s}=e;return(0,ek.jsx)(e_.sG.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,ek.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eA.displayName="Arrow";var ex=n(94446),eS=n(3468),ew=n(70222),eI=n(4129),eN=n(84288),eC="Popper",[eO,eR]=(0,eS.A)(eC),[eD,eL]=eO(eC),eM=e=>{let{__scopePopper:t,children:n}=e,[r,s]=i.useState(null),[a,o]=i.useState(void 0);return(0,ek.jsx)(eD,{scope:t,anchor:r,onAnchorChange:s,placementState:a,setPlacementState:o,children:n})};eM.displayName=eC;var eP="PopperAnchor",eF=i.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...s}=e,a=eL(eP,n),o=i.useRef(null),l=a.onAnchorChange,c=i.useCallback(e=>{o.current=e,e&&l(e)},[l]),u=(0,ex.s)(t,c),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=a.placementState&&eW(a.placementState),p=null==h?void 0:h[0],f=null==h?void 0:h[1];return r?null:(0,ek.jsx)(e_.sG.div,{"data-radix-popper-side":p,"data-radix-popper-align":f,...s,ref:u})});eF.displayName=eP;var ej="PopperContent",[eB,eU]=eO(ej),eH=i.forwardRef((e,t)=>{var n,r,s,l,u,d,A,x;let{__scopePopper:S,side:w="bottom",sideOffset:D=0,align:L="center",alignOffset:M=0,arrowPadding:F=0,avoidCollisions:j=!0,collisionBoundary:B=[],collisionPadding:U=0,sticky:H="partial",hideWhenDetached:$=!1,updatePositionStrategy:G="optimized",onPlaced:z,...Y}=e,q=eL(ej,S),[W,V]=i.useState(null),K=(0,ex.s)(t,e=>V(e)),[Z,X]=i.useState(null),J=(0,eN.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(B)?B:[B],ea=ei.length>0,eo={padding:er,boundary:ei.filter(eY),altBoundary:ea},{refs:el,floatingStyles:ec,placement:eu,isPositioned:ed,middlewareData:eh}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=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!==k.current&&(k.current=e,g(e))},[]),E=i.useCallback(e=>{e!==A.current&&(A.current=e,b(e))},[]),T=a||m,_=o||v,k=i.useRef(null),A=i.useRef(null),x=i.useRef(d),S=null!=c,w=eT(c),N=eT(s),C=eT(u),O=i.useCallback(()=>{if(!k.current||!A.current)return;let e={placement:t,strategy:n,middleware:p};N.current&&(e.platform=N.current),((e,t,n)=>{let r=new Map,i={platform:ep,...n},s={...i.platform,_c:r};return I(e,t,{...i,platform:s})})(k.current,A.current,e).then(e=>{let t={...e,isPositioned:!1!==C.current};R.current&&!eb(x.current,t)&&(x.current=t,eg.flushSync(()=>{h(t)}))})},[p,t,n,N,C]);ev(()=>{!1===u&&x.current.isPositioned&&(x.current.isPositioned=!1,h(e=>({...e,isPositioned:!1})))},[u]);let R=i.useRef(!1);ev(()=>(R.current=!0,()=>{R.current=!1}),[]),ev(()=>{if(T&&(k.current=T),_&&(A.current=_),T&&_){if(w.current)return w.current(T,_,O);O()}},[T,_,O,w,S]);let D=i.useMemo(()=>({reference:k,floating:A,setReference:y,setFloating:E}),[y,E]),L=i.useMemo(()=>({reference:T,floating:_}),[T,_]),M=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:M}),[d,O,D,L,M])}({strategy:"fixed",placement:w+("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:s=!0,ancestorResize:l=!0,elementResize:u="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:h=!1}=r,p=et(e),f=s||l?[...p?Q(p):[],...t?Q(t):[]]:[];
1165f.forEach(e=>{s&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)});let m=p&&d?function(e,t){let n,r=null,i=P(e);function s(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function l(u,d){void 0===u&&(u=!1),void 0===d&&(d=1),s();let h=e.getBoundingClientRect(),{left:p,top:f,width:m,height:g}=h;if(u||t(),!m||!g)return;let v=c(f),b=c(i.clientWidth-(p+m)),y={rootMargin:-v+"px "+-b+"px "+-c(i.clientHeight-(f+g))+"px "+-c(p)+"px",threshold:o(0,a(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),s}(p,n):null,g=-1,v=null;u&&(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?es(e):null;return h&&function t(){let r=es(e);b&&!ef(b,r)&&n(),b=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;f.forEach(e=>{s&&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"===G})},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:s,placement:a,middlewareData:o}=t,l=await R(t,e);return a===(null==(n=o.offset)?void 0:n.placement)&&null!=(r=o.arrow)&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({mainAxis:D+en,alignmentAxis:M}),j&&((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:s}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...d}=h(e,t),f={x:n,y:r},g=await s.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=o(n,a(E,r))}if(c){let e="y"===b?"top":"left",t="y"===b?"bottom":"right",n=T+g[e],r=T-g[t];T=o(n,a(T,r))}let _=u.fn({...t,[y]:E,[b]:T});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[y]:l,[b]:c}}}}}}(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:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=h(e,t),u={x:n,y:r},d=v(i),f=m(d),g=u[f],b=u[d],y=h(o,t),E="number"==typeof y?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){let e="y"===f?"height":"width",t=s.reference[f]-s.floating[e]+E.mainAxis,n=s.reference[f]+s.reference[e]-E.mainAxis;g<t?g=t:g>n&&(g=n)}if(c){var T,_;let e="y"===f?"width":"height",t=O.has(p(i)),n=s.reference[d]-s.floating[e]+(t&&(null==(T=a.offset)?void 0:T[d])||0)+(t?0:E.crossAxis),r=s.reference[d]+s.reference[e]+(t?0:(null==(_=a.offset)?void 0:_[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,...eo}),j&&((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r,i,s,a;let{placement:o,middlewareData:l,rects:c,initialPlacement:u,platform:d,elements:A}=t,{mainAxis:x=!0,crossAxis:S=!0,fallbackPlacements:w,fallbackStrategy:I="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:C=!0,...O}=h(e,t);if(null!=(n=l.arrow)&&n.alignmentOffset)return{};let R=p(o),D=v(u),L=p(u)===u,M=await (null==d.isRTL?void 0:d.isRTL(A.floating)),P=w||(L||!C?[k(u)]:function(e){let t=k(e);return[b(e),t,b(t)]}(u)),F="none"!==N;!w&&F&&P.push(...function(e,t,n,r){let i=f(e),s=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:_;default:return[]}}(p(e),"start"===n,r);return i&&(s=s.map(e=>e+"-"+i),t&&(s=s.concat(s.map(b)))),s}(u,C,N,M));let j=[u,...P],B=await d.detectOverflow(t,O),U=[],H=(null==(r=l.flip)?void 0:r.overflows)||[];if(x&&U.push(B[R]),S){let e=function(e,t,n){void 0===n&&(n=!1);let r=f(e),i=m(v(e)),s=g(i),a="x"===i?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=k(a)),[a,k(a)]}(o,c,M);U.push(B[e[0]],B[e[1]])}if(H=[...H,{placement:o,overflows:U}],!U.every(e=>e<=0)){let e=((null==(i=l.flip)?void 0:i.index)||0)+1,t=j[e];if(t&&("alignment"!==S||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==(s=H.filter(e=>e.overflows[0]<=0).sort((e,t)=>
1165e.overflows[1]-t.overflows[1])[0])?void 0:s.placement;if(!n)switch(I){case"bestFit":{let e=null==(a=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:a[0];e&&(n=e);break}case"initialPlacement":n=u}if(o!==n)return{reset:{placement:n}}}return{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...eo}),((e,t)=>{let n=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;let i,s,{placement:l,rects:c,platform:u,elements:d}=t,{apply:m=()=>{},...g}=h(e,t),b=await u.detectOverflow(t,g),y=p(l),E=f(l),T="y"===v(l),{width:_,height:k}=c.floating;"top"===y||"bottom"===y?(i=y,s=E===(await (null==u.isRTL?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(s=y,i="end"===E?"top":"bottom");let A=k-b.top-b.bottom,x=_-b.left-b.right,S=a(k-b[i],A),w=a(_-b[s],x),I=!t.middlewareData.shift,N=S,C=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=x),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(N=A),I&&!E){let e=o(b.left,0),t=o(b.right,0),n=o(b.top,0),r=o(b.bottom,0);T?C=_-2*(0!==e||0!==t?e+t:o(b.left,b.right)):N=k-2*(0!==n||0!==r?n+r:o(b.top,b.bottom))}await m({...t,availableWidth:C,availableHeight:N});let O=await u.getDimensions(d.floating);return _!==O.width||k!==O.height?{reset:{rects:!0}}:{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...eo,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:i}=e,{width:s,height:a}=n.reference,o=t.floating.style;o.setProperty("--radix-popper-available-width","".concat(r,"px")),o.setProperty("--radix-popper-available-height","".concat(i,"px")),o.setProperty("--radix-popper-anchor-width","".concat(s,"px")),o.setProperty("--radix-popper-anchor-height","".concat(a,"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",...s}=h(e,t);switch(i){case"referenceHidden":{let e=N(await r.detectOverflow(t,{...s,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:C(e)}}}case"escaped":{let e=N(await r.detectOverflow(t,{...s,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:C(e)}}}default:return{}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}})({strategy:"referenceHidden",...eo,boundary:ea?eo.boundary:void 0})]}),eA=q.setPlacementState;(0,eI.N)(()=>(eA(eu),()=>{eA(void 0)}),[eu,eA]);let[eS,eC]=eW(eu),eO=(0,ew.c)(z);(0,eI.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,eM=(null==(s=eh.arrow)?void 0:s.centerOffset)!==0,[eP,eF]=i.useState();return(0,eI.N)(()=>{W&&eF(window.getComputedStyle(W).zIndex)},[W]),(0,ek.jsx)("div",{ref:el.setFloating,"data-radix-popper-content-wrapper":"",style:{...ec,transform:ed?ec.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eP,"--radix-popper-transform-origin":[null==(l=eh.transformOrigin)?void 0:l.x,null==(u=eh.transformOrigin)?void 0:u.y].join(" "),...(null==(d=eh.hide)?void 0:d.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,ek.jsx)(eB,{scope:S,placedSide:eS,placedAlign:eC,onArrowChange:X,arrowX:eR,arrowY:eD,shouldHideArrow:eM,children:(0,ek.jsx)(e_.sG.div,{"data-side":eS,"data-align":eC,...Y,ref:K,style:{...Y.style,animation:ed?void 0:"none"}})})})});eH.displayName=ej;var e$="PopperArrow",eG={top:"bottom",right:"left",bottom:"top",left:"right"},ez=i.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=eU(e$,n),s=eG[i.placedSide];return(0,ek.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]: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,ek.jsx)(eA,{...r,ref:t,style:{...r.style,display:"block"}})})});function eY(e){return null!==e}ez.displayName=e$;var eq=e=>({name:"transformOrigin",options:e,fn(t){var n,r,i,s,a;let{placement:o,rects:l,middlewareData:c}=t,u=(null==(n=c.arrow)?void 0:n.centerOffset)!==0,d=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[p,f]=eW(o),m={start:"0%",center:"50%",end:"100%"}[f],g=(null!=(s=null==(r=c.arrow)?void 0:r.x)?s:0)+d/2,v=(null!=(a=null==(i=c.arrow)?void 0:i.y)?a:0)+h/2,b="",y="";return"bottom"===p?(b=u?m:"".concat(g,"px"),y="".concat(-h,"px")):"top"===p?(b=u?m:"".concat(g,"px"),y="".concat(l.floating.height+h,"px")):"right"===p?(b="".concat(-h,"px"),y=u?m:"".concat(v,"px")):"left"===p&&(b="".concat(l.floating.width+h,"px"),y=u?m:"".concat(v,"px")),{data:{x:b,y}}}});function eW(e){let[t,n="center"]=e.split("-");return[t,n]}var eV=eM,eK=eF,eZ=eH,eX=ez},66218:(e,t,n)=>{n.d(t,{jH:()=>s});var r=n(12115);n(95155);var i=r.createContext(void 0);function s(e){let t=r.useContext(i);return e||t||"ltr"}},66986:(e,t,n)=>{n.d(t,{E:()=>a});var r=n(41370),i=n(74515);let s=Object.keys(i);class a extends r.R{constructor(e,t,n,r){let a=-1;if(super(e,t),function(e,t,n){n&&(e[t]=n)}(this,"space",r),"number"==typeof n)for(;++a<s.length;){let e=s[a];!function(e,t,n){n&&(e[t]=n)}(this,s[a],(n&i[e])===i[e])}}}a.prototype.defined=!0},67131:(e,t,n)=>{n.d(t,{c:()=>p});var r=n(12718),i=n(61270),s=n(16433),a=n(62473),o=n(63704),l=n(64354),c=n(8286),u=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 u.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,s.s)(1),(0,a.w)()),r.pipe(e(t)))}:(0,l.Z)(function(e,n){return(0,c.Tg)(t(e,n)).pipe((0,s.s)(1),(0,o.T)(function(){return e}))})}(function(){return g})}},67927:(e,t,n)=>{n.d(t,{Eg:()=>l,gV:()=>c});var r,i=n(47211),s=n(85755),a=n(40712),o=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 c(this,e)},e.prototype.do=function(e,t,n){var r=this.kind,i=this.value,s=this.error;return"N"===r?null==e?void 0:e(i):"E"===r?null==t?void 0:t(s):null==n?void 0:n()},e.prototype.accept=function(e,t,n){return(0,o.T)(null==e?void 0:e.next)?this.observe(e):this.do(e,t,n
1165)},e.prototype.toObservable=function(){var e=this.kind,t=this.value,n=this.error,r="N"===e?(0,s.of)(t):"E"===e?(0,a.$)(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 c(e,t){var n,r,i,s=e.kind,a=e.value,o=e.error;if("string"!=typeof s)throw TypeError('Invalid notification, missing "kind"');"N"===s?null==(n=t.next)||n.call(t,a):"E"===s?null==(r=t.error)||r.call(t,o):null==(i=t.complete)||i.call(t)}},68283:(e,t,n)=>{n.d(t,{q:()=>a});var r=n(71450),i=n(61270),s=n(85755);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return(0,i.x)(t,s.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:()=>c});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');s(e);let r=0,i=-1,a=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else i<0&&(n=!0,i=a+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let o=-1,l=t.length-1;for(;a--;)if(47===e.codePointAt(a)){if(n){r=a+1;break}}else o<0&&(n=!0,o=a+1),l>-1&&(e.codePointAt(a)===t.codePointAt(l--)?l<0&&(i=a):(l=-1,i=o));return r===i?i=o:i<0&&(i=e.length),e.slice(r,i)},dirname:function(e){let t;if(s(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;s(e);let n=e.length,r=-1,i=0,a=-1,o=0;for(;n--;){let s=e.codePointAt(n);if(47===s){if(t){i=n+1;break}continue}r<0&&(t=!0,r=n+1),46===s?a<0?a=n:1!==o&&(o=1):a>-1&&(o=-1)}return a<0||r<0||0===o||1===o&&a===r-1&&a===i+1?"":e.slice(a,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)s(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){s(e);let t=47===e.codePointAt(0),n=function(e,t){let n,r,i="",s=0,a=-1,o=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(a===l-1||1===o);else if(a!==l-1&&2===o){if(i.length<2||2!==s||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="",s=0):s=(i=i.slice(0,r)).length-1-i.lastIndexOf("/"),a=l,o=0;continue}}else if(i.length>0){i="",s=0,a=l,o=0;continue}}t&&(i=i.length>0?i+"/..":"..",s=2)}else i.length>0?i+="/"+e.slice(a+1,l):i=e.slice(a+1,l),s=l-a-1;a=l,o=0}else 46===n&&o>-1?o++:o=-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 s(e){if("string"!=typeof e)throw TypeError("Path must be a string. Received "+JSON.stringify(e))}let a={cwd:function(){return"/"}};function o(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 c{constructor(e){let t,n;t=e?o(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?"":a.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"),u(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(u(e,"extname"),h(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw Error("`extname` must start with `.`");
1165if(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){o(e)&&(e=function(e){if("string"==typeof e)e=new URL(e);else if(!o(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"),u(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 u(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),s=n(4129),a=(r||(r=n.t(i,2)))[" useId ".trim().toString()]||(()=>void 0),o=0;function l(e){let[t,n]=i.useState(a());return(0,s.N)(()=>{e||n(e=>e??String(o++))},[e]),e||(t?`radix-${t}`:"")}},69666:(e,t,n)=>{n.d(t,{n:()=>d});var r=n(12115),i=n(94446),s=n(97602),a=n(70222),o=n(95155),l="focusScope.autoFocusOnMount",c="focusScope.autoFocusOnUnmount",u={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,a.c)(g),_=(0,a.c)(v),k=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)?k.current=t:f(k.current,{select:!0})},t=function(e){if(x.paused||!y)return;let t=e.relatedTarget;null!==t&&(y.contains(t)||f(k.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,u);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(c,u);y.addEventListener(c,_),y.dispatchEvent(t),t.defaultPrevented||f(null!=e?e:document.body,{select:!0}),y.removeEventListener(c,_),m.remove(x)},0)}}},[y,T,_,x]);let S=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,s]=function(e){let t=h(e);return[p(t,e),p(t.reverse(),e)]}(t);i&&s?e.shiftKey||r!==s?e.shiftKey&&r===i&&(e.preventDefault(),n&&f(s,{select:!0})):(e.preventDefault(),n&&f(i,{select:!0})):r===t&&e.preventDefault()}},[n,d,x.paused]);return(0,o.jsx)(s.sG.div,{tabIndex:-1,...b,ref:A,onKeyDown:S})});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}}
1165,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,s=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),s=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!s)return!1;for(r in e);return void 0===r||t.call(e,r)},o=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,c,u,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&&(a(i)||(c=s(i)))?(c?(c=!1,u=r&&s(r)?r:[]):u=r&&a(r)?r:{},o(d,{name:n,newValue:e(f,u,i)})):void 0!==i&&o(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:()=>s,Ju:()=>c,N3:()=>h,Tt:()=>a,YH:()=>l,fX:()=>d,sH:()=>o,xN:()=>f,zs:()=>u});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 s=function(){return(s=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 a(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 o(e,t,n,r){return new(n||(n=Promise))(function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,o)}l((r=r.apply(e,t||[])).next())})}function l(e,t){var n,r,i,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(o){return function(l){var c=[o,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(s=0)),s;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,r=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===c[0]||2===c[0])){s=0;continue}if(3===c[0]&&(!i||c[1]>i[0]&&c[1]<i[3])){s.label=c[1];break}if(6===c[0]&&s.label<i[1]){s.label=i[1],i=c;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(c);break}i[2]&&s.ops.pop(),s.trys.pop();continue}c=t.call(e,s)}catch(e){c=[6,e],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function c(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 u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return a}function d(e,t,n){if(n||2==arguments.length)for(var r,i=0,s=t.length;i<s;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||[]),s=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){i[e]&&(r[e]=function(t){return new Promise(function(n,r){s.push([e,t,n,r])>1||o(e,t)})},t&&(r[e]=t(r[e])))}function o(e,t){try{var n;(n=i[e](t)).value instanceof h?Promise.resolve(n.value.v).then(l,c):u(s[0][2],n)}catch(e){u(s[0][3],e)}}function l(e){o("next",e)}function c(e){o("throw",e)}function u(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[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=c(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 s,a,o;s=r,a=i,o=(t=e[n](t)).done,Promise.resolve(t.value).then(function(e){s({value:e,done:o})},a)})}}}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError},71729:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esMo
1165dule?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),s="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;let{property:r,value:i}=e;s?t(r,i,e):i&&((n=n||{})[r]=i)}),n};let i=r(n(6997))},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_ERROR="network_error",e.INVALID_REQUEST="invalid_request",e}({})},73545:(e,t,n)=>{n.d(t,{G1:()=>a,PW:()=>i,Y:()=>r});let r=s("end"),i=s("start");function s(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 a(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])}},74515:(e,t,n)=>{n.r(t),n.d(t,{boolean:()=>i,booleanish:()=>s,commaOrSpaceSeparated:()=>u,commaSeparated:()=>c,number:()=>o,overloadedBoolean:()=>a,spaceSeparated:()=>l});let r=0,i=d(),s=d(),a=d(),o=d(),l=d(),c=d(),u=d();function d(){return 2**++r}},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 s=i.invalid,a=i.handlers;if(t&&r.call(t,e)){let n=String(t[e]);s=r.call(a,n)?a[n]:i.unknown}if(s)return s.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:()=>a,Sr:()=>o,kr:()=>s,y6:()=>i});var r=n(12115);n(65695).Wp;let i=(0,r.createContext)(null),s=()=>{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},a=(0,r.createContext)({status:null,license:null,checkFeature:()=>!0,getLimit:()=>null}),o=()=>(0,r.useContext)(a)},75433:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(12115),i=n(47650),s=n(97602),a=n(4129),o=n(95155),l=r.forwardRef((e,t)=>{var n,l;let{container:c,...u}=e,[d,h]=r.useState(!1);(0,a.N)(()=>h(!0),[]);let p=c||d&&(null==(l=globalThis)||null==(n=l.document)?void 0:n.body);return p?i.createPortal((0,o.jsx)(s.sG.div,{...u,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=[],s=(e,t,n)=>{if(0==e.length-t)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=s(e,t+1,i);if(n)return n}let a=n.validators;if(null===a)return;let o=0===t?e.join("-"):e.slice(t).join("-"),l=a.length;for(let e=0;e<l;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},a=(e,t)=>{let n=r();for(let r in e)o(e[r],n,r,t);return n},o=(e,t,n,r)=>{let i=e.length;for(let s=0;s<i;s++)l(e[s],t,n,r)},l=(e,t,n,r)=>
1165"string"==typeof e?void c(e,t,n):"function"==typeof e?void u(e,t,n,r):void d(e,t,n,r),c=(e,t,n)=>{(""===e?t:h(t,e)).classGroupId=n},u=(e,t,n,r)=>{if(p(e))return void o(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),s=i.length;for(let e=0;e<s;e++){let[s,a]=i[e];o(a,h(t,s),n,r)}},h=(e,t)=>{let n=e,i=t.split("-"),s=i.length;for(let e=0;e<s;e++){let t=i[e],s=n.nextPart.get(t);s||(s=r(),n.nextPart.set(t,s)),n=s}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,o,l,c=e=>{let t=r(e);if(t)return t;let i=((e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s,postfixLookupClassGroupIds:a}=t,o=[],l=e.trim().split(g),c="";for(let e=l.length-1;e>=0;e-=1){let t,u=l[e],{isExternal:d,modifiers:h,hasImportantModifier:p,baseClassName:f,maybePostfixModifierPosition:m}=n(u);if(d){c=u+(c.length>0?" "+c:c);continue}let g=!!m;if(g){let e=(t=r(f.substring(0,m)))&&a[t]?r(f):void 0;e&&e!==t&&(t=e,g=!1)}else t=r(f);if(!t){if(!g||!(t=r(f))){c=u+(c.length>0?" "+c:c);continue}g=!1}let v=0===h.length?"":1===h.length?h[0]:s(h).join(":"),b=p?v+"!":v,y=b+t;if(o.indexOf(y)>-1)continue;o.push(y);let E=i(t,g);for(let e=0;e<E.length;++e){let t=E[e];o.push(b+t)}c=u+(c.length>0?" "+c:c)}return c})(e,n);return o(e,i),i};return l=u=>(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,s)=>{n[i]=s,++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,s=0,a=e.length;for(let o=0;o<a;o++){let a=e[o];if(0===r&&0===i){if(":"===a){n.push(e.slice(s,o)),s=o+1;continue}if("/"===a){t=o;continue}}"["===a?r++:"]"===a?r--:"("===a?i++:")"===a&&i--}let o=0===n.length?e:e.slice(s),l=o,c=!1;return o.endsWith("!")?(l=o.slice(0,-1),c=!0):o.startsWith("!")&&(l=o.slice(1),c=!0),m(n,c,l,t&&t>s?t-s: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 s=e[i],a="["===s[0],o=t.has(s);a||o?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(s)):r.push(s)}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 a(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 s(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],s=n[e];return t?s?((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})(s,t):t:s||i}return n[e]||i}}})(e)}))(t.reduce((e,t)=>t(e),e()))).cache.get,o=n.cache.set,l=c,c(u)),(...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,_=/^\((?:(\w[\w-]*):)?(.+)\)$/i,k=/^\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$/,S=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,w=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,I=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,N=e=>k.test(e),C=e=>!!e&&!Number.isNaN(Number(e)),O=e=>!!e&&Number.isInteger(Number(e)),R=e=>e.endsWith("%")&&C(e.slice(0,-1)),D=e=>A.test(e),L=()=>!0,M=e=>x.test(e)&&!S.test(e),P=()=>!1,F=e=>w.test(e),j=e=>I.test(e),B=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
1165=>ei(e,el,P),$=e=>T.test(e),G=e=>ei(e,ec,M),z=e=>ei(e,eu,C),Y=e=>ei(e,eh,L),q=e=>ei(e,ed,P),W=e=>ei(e,ea,P),V=e=>ei(e,eo,j),K=e=>ei(e,ep,F),Z=e=>_.test(e),X=e=>es(e,ec),Q=e=>es(e,ed),J=e=>es(e,ea),ee=e=>es(e,el),et=e=>es(e,eo),en=e=>es(e,ep,!0),er=e=>es(e,eh,!0),ei=(e,t,n)=>{let r=T.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},es=(e,t,n=!1)=>{let r=_.exec(e);return!!r&&(r[1]?t(r[1]):n)},ea=e=>"position"===e||"percentage"===e,eo=e=>"image"===e||"url"===e,el=e=>"length"===e||"size"===e||"bg-size"===e,ec=e=>"length"===e,eu=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"),s=E("leading"),a=E("breakpoint"),o=E("container"),l=E("spacing"),c=E("radius"),u=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"],_=()=>[...T(),Z,$],k=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],x=()=>[Z,$,l],S=()=>[N,"full","auto",...x()],w=()=>[O,"none","subgrid",Z,$],I=()=>["auto",{span:["full",O,Z,$]},O,Z,$],M=()=>[O,"auto",Z,$],P=()=>["auto","min","max","fr",Z,$],F=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],j=()=>["start","end","center","stretch","center-safe","end-safe"],ei=()=>["auto",...x()],es=()=>[N,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],ea=()=>[N,"screen","full","dvw","lvw","svw","min","max","fit",...x()],eo=()=>[N,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],el=()=>[e,Z,$],ec=()=>[...T(),J,W,{position:[Z,$]}],eu=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ed=()=>["auto","cover","contain",ee,H,{size:[Z,$]}],eh=()=>[R,X,G],ep=()=>["","none","full",c,Z,$],ef=()=>["",C,X,G],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=()=>[C,R,J,W],eb=()=>["","none",f,Z,$],ey=()=>["none",C,Z,$],eE=()=>["none",C,Z,$],eT=()=>[C,Z,$],e_=()=>[N,"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:[B],"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",C],text:[D],"text-shadow":[D],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",N,$,Z,g]}],container:["container"],"container-type":[{"@container":["","normal","size",Z,$]}],"container-named":[U],columns:[{columns:[C,$,Z,o]}],"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:_()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:S()}],"inset-x":[{"inset-x":S()}],"inset-y":[{"inset-y":S()}],start:[{"inset-s":S(),start:S()}],end:[{"inset-e":S(),end:S()}],"inset-bs":[{"inset-bs":S()}],"inset-be":[{"inset-be":S()}],top:[{top:S()}
vendor: 4,749 bytes, line 1165
1165],right:[{right:S()}],bottom:[{bottom:S()}],left:[{left:S()}],visibility:["visible","invisible","collapse"],z:[{z:[O,"auto",Z,$]}],basis:[{basis:[N,"full","auto",o,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[C,N,"auto","initial","none",$]}],grow:[{grow:["",C,Z,$]}],shrink:[{shrink:["",C,Z,$]}],order:[{order:[O,"first","last","none",Z,$]}],"grid-cols":[{"grid-cols":w()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":w()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...F(),"normal"]}],"justify-items":[{"justify-items":[...j(),"normal"]}],"justify-self":[{"justify-self":["auto",...j()]}],"align-content":[{content:["normal",...F()]}],"align-items":[{items:[...j(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...j(),{baseline:["","last"]}]}],"place-content":[{"place-content":F()}],"place-items":[{"place-items":[...j(),"baseline"]}],"place-self":[{"place-self":["auto",...j()]}],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:es()}],"inline-size":[{inline:["auto",...ea()]}],"min-inline-size":[{"min-inline":["auto",...ea()]}],"max-inline-size":[{"max-inline":["none",...ea()]}],"block-size":[{block:["auto",...eo()]}],"min-block-size":[{"min-block":["auto",...eo()]}],"max-block-size":[{"max-block":["none",...eo()]}],w:[{w:[o,"screen",...es()]}],"min-w":[{"min-w":[o,"screen","none",...es()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...es()]}],h:[{h:["screen","lh",...es()]}],"min-h":[{"min-h":["screen","lh","none",...es()]}],"max-h":[{"max-h":["screen","lh",...es()]}],"font-size":[{text:["base",n,X,G]}],"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":[C,"none",Z,z]}],leading:[{leading:[s,...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:[C,"from-font","auto",Z,G]}],"text-decoration-color":[{decoration:el()}],"underline-offset":[{"underline-offset":[C,"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:ec()}],"bg-repeat":[{bg:eu()}],"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,V]}],"bg-color":[{bg:el()}],"gradient-from-pos":[{from:eh()}
vendor: 7,384 bytes, line 1165
1165],"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":[C,Z,$]}],"outline-w":[{outline:["",C,X,G]}],"outline-color":[{outline:el()}],shadow:[{shadow:["","none",u,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":[C,G]}],"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:[C,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":[C]}],"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":[C]}],"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:ec()}],"mask-repeat":[{mask:eu()}],"mask-size":[{mask:ed()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Z,$]}],filter:[{filter:["","none",Z,$]}],blur:[{blur:eb()}],brightness:[{brightness:[C,Z,$]}],contrast:[{contrast:[C,Z,$]}],"drop-shadow":[{"drop-shadow":["","none",p,en,K]}],"drop-shadow-color":[{"drop-shadow":el()}],grayscale:[{grayscale:["",C,Z,$]}],"hue-rotate":[{"hue-rotate":[C,Z,$]}],invert:[{invert:["",C,Z,$]}],saturate:[{saturate:[C,Z,$]}],sepia:[{sepia:["",C,Z,$]}],"backdrop-filter":[{"backdrop-filter":["","none",Z,$]}],"backdrop-blur":[{"backdrop-blur":eb()}],"backdrop-brightness":[{"backdrop-brightness":[C,Z,$]}],"backdrop-contrast":[{"backdrop-contrast":[C,Z,$]}],"backdrop-grayscale":[{"backdrop-grayscale":["",C,Z,$]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C,Z,$]}],"backdrop-invert":[{"backdrop-invert":["",C,Z,$]}],"backdrop-opacity":[{"backdrop-opacity":[C,Z,$]}],"backdrop-saturate":[{"backdrop-saturate":[C,Z,$]}],"backdrop-sepia":[{"backdrop-sepia":["",C,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:[C,"initial",Z,$]}],ease:[{ease:["linear","initial",v,Z,$]}],delay:[{delay:[C,Z,$]}],animate:[{animate:["none",b,Z,$]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Z,$]}],"perspective-origin":[{"perspective-origin":_()}],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:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:e_()}],"translate-x":[{"translate-x":e_()}],"translate-y":[{"translate-y":e_()}],"translate-z":[{"translate-z":e_()}],"translate-none":["translate-none"],zoom:[{zoom:[O,Z,$]}],accent:[{accent:el()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:el()}
vendor: 5,017 bytes, line 1165
1165],"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:[C,X,G,z]}],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"]}}
1165,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:s={}})=>(em(e,"cacheSize",t),em(e,"prefix",n),em(e,"experimentalParseClassName",r),eg(e.theme,s.theme),eg(e.classGroups,s.classGroups),eg(e.conflictingClassGroups,s.conflictingClassGroups),eg(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),em(e,"postfixLookupClassGroups",s.postfixLookupClassGroups),em(e,"orderSensitiveModifiers",s.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:()=>s,l:()=>a});var r=n(29846),i=null;function s(e){if(r.$.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var n=i,s=n.errorThrown,a=n.error;if(i=null,s)throw a}}else e()}function a(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:()=>s});var r=n(12115),i=n(4129),s=e=>{let{present:t,children:n}=e,s=function(e){var t,n;let[s,a]=r.useState(),l=r.useRef(null),c=r.useRef(e),u=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=o(l.current);u.current="mounted"===d?e:"none"},[d]),(0,i.N)(()=>{let t=l.current,n=c.current;if(n!==e){let r=u.current,i=o(t);e?h("MOUNT"):"none"===i||(null==t?void 0:t.display)==="none"?h("UNMOUNT"):n&&r!==i?h("ANIMATION_OUT"):h("UNMOUNT"),c.current=e}},[e,h]),(0,i.N)(()=>{if(s){var e;let t,n=null!=(e=s.ownerDocument.defaultView)?e:window,r=e=>{let r=o(l.current).includes(CSS.escape(e.animationName));if(e.target===s&&r&&(h("ANIMATION_END"),!c.current)){let e=s.style.animationFillMode;s.style.animationFillMode="forwards",t=n.setTimeout(()=>{"forwards"===s.style.animationFillMode&&(s.style.animationFillMode=e)})}},i=e=>{e.target===s&&(u.current=o(l.current))};return s.addEventListener("animationstart",i),s.addEventListener("animationcancel",r),s.addEventListener("animationend",r),()=>{n.clearTimeout(t),s.removeEventListener("animationstart",i),s.removeEventListener("animationcancel",r),s.removeEventListener("animationend",r)}}h("ANIMATION_END")},[s,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:r.useCallback(e=>{l.current=e?getComputedStyle(e):null,a(e)},[])}}(t),l="function"==typeof n?n({present:s.isPresent}):r.Children.only(n),c=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=a(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():a(t[e],null)}}},[])}(s.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||s.isPresent?r.cloneElement(l,{ref:c}):null};function a(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function o(e){return(null==e?void 0:e.animationName)||"none"}s.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"}]])}
1165,77133:(e,t,n)=>{n.d(t,{W:()=>function e(t){return(0,s.N)(function(n,s){var a,o=null,l=!1;o=n.subscribe((0,i._)(s,void 0,void 0,function(i){a=(0,r.Tg)(t(i,e(t)(n))),o?(o.unsubscribe(),o=null,a.subscribe(s)):l=!0})),l&&(o.unsubscribe(),o=null,a.subscribe(s))})}});var r=n(8286),i=n(28400),s=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),s=n(31536),a=n(28786),o=n(96948);function l(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new s.B}:t,r=e.resetOnError,l=void 0===r||r,u=e.resetOnComplete,d=void 0===u||u,h=e.resetOnRefCountZero,p=void 0===h||h;return function(e){var t,r,s,u=0,h=!1,f=!1,m=function(){null==r||r.unsubscribe(),r=void 0},g=function(){m(),t=s=void 0,h=f=!1},v=function(){var e=t;g(),null==e||e.unsubscribe()};return(0,o.N)(function(e,o){u++,f||h||m();var b=s=null!=s?s:n();o.add(function(){0!=--u||f||h||(r=c(v,p))}),b.subscribe(o),!t&&u>0&&(t=new a.Ms({next:function(e){return b.next(e)},error:function(e){f=!0,m(),r=c(g,l,e),b.error(e)},complete:function(){h=!0,m(),r=c(g,d),b.complete()}}),(0,i.Tg)(e).subscribe(t))})(e)}}function c(e,t){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];if(!0===t)return void e();if(!1!==t){var o=new a.Ms({next:function(){o.unsubscribe(),e()}});return(0,i.Tg)(t.apply(void 0,(0,r.fX)([],(0,r.zs)(n)))).subscribe(o)}}},78232:(e,t,n)=>{n.d(t,{S:()=>r});function r(e){return e.toLowerCase()}},78242:(e,t,n)=>{n.d(t,{v:()=>s});var r=n(45037),i=n(8286);function s(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),s=n(96948);function a(e,t){return void 0===t&&(t=0),(0,s.N)(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}var o=n(45037),l=n(69899),c=n(39097),u=n(20437);function d(e,t){if(!e)throw Error("Iterable cannot be null");return new o.c(function(n){(0,u.N)(n,t,function(){var r=e[Symbol.asyncIterator]();(0,u.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(a(t),(0,i.Q)(t));if((0,f.X)(e))return new o.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(a(t),(0,i.Q)(t));if((0,g.T)(e))return d(e,t);if((0,m.x)(e))return new o.c(function(n){var r;return(0,u.N)(n,t,function(){r=e[l.l](),(0,u.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,c.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)}},79168:(e,t,n)=>{n.d(t,{N:()=>i});var r=n(3407);function i(e,t,n,i){let s=i?i-1:1/0,a=0;return function(i){return(0,r.On)(i)?(e.enter(n),function i(o){return(0,r.On)(o)&&a++<s?(e.consume(o),i):(e.exit(n),t(o))}(i)):t(i)}}},79572:(e,t,n)=>{n.d(t,{jH:()=>r.i});var r=n(8532)},81933:(e,t,n)=>{n.d(t,{U:()=>s});var r=n(64354),i=n(77163);function s(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:()=>a,my:()=>s});let r="https://api.cloud.copilotkit.ai",i=`${r}/copilotkit/v1`,s="X-CopilotCloud-Public-Api-Key",a="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:()=>a});var r=n(2821);let i=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,s=r.$,a=(e,t)=>n=>{var r;if((null==t?void 0:t.variants)==null)return s(e,null==n?void 0:n.class,null==n?void 0:n.className);let{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(e=>{let t=null==n?void 0:n[e],r=null==o?void 0:o[e];if(null===t)return null;let s=i(t)||i(r);return a[e][s]}),c=n&&Object.entries(n).reduce((e,t)=>
1165{let[n,r]=t;return void 0===r||(e[n]=r),e},{});return s(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({...o,...c}[t]):({...o,...c})[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 s(e,"boolean"!=typeof n.includeImageAlt||n.includeImageAlt,"boolean"!=typeof n.includeHtml||n.includeHtml)}function s(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 a(e.children,t,n)}return Array.isArray(e)?a(e,t,n):""}function a(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=s(e[i],t,n);return r.join("")}},84288:(e,t,n)=>{n.d(t,{X:()=>s});var r=n(12115),i=n(4129);function s(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 s=t[0];if("borderBoxSize"in s){let e=s.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:()=>a,j:()=>s,qF:()=>i});var r=n(14764);function i(e,t="unset"){try{return JSON.parse(e)}catch{return"unset"===t?null:t}}function s(e){try{let t=r.parse(e);if(t&&"object"==typeof t&&!Array.isArray(t))return t;return{}}catch{return{}}}function a(e,t){return n=>Math.min(e*2**(n-1),t)}},85755:(e,t,n)=>{n.d(t,{of:()=>s});var r=n(95868),i=n(78842);function s(){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,s,a,o,l,c,u;n.d(t,{FQ:()=>nH,FB:()=>nq,Xs:()=>nW,WC:()=>ex,AO:()=>n0,O3:()=>nV,CE:()=>nZ,U3:()=>nK,SJ:()=>nX,NZ:()=>nJ,QG:()=>nQ,Mf:()=>n$,p6:()=>nG,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),s=r.map((t,n)=>({id:e.componentId,basePath:i.nested(String(n)).path}));this.updateDeepValue(n,s),this.notify()});r?t.unsubscribe():this.dataListeners.push(()=>t.unsubscribe());let i=Array.isArray(t.value)?t.value:[],s=this.context.dataContext.nested(e.path);return i.map((t,n)=>({id:e.componentId,basePath:s.nested(String(n)).path}))}return e;case"CHECKABLE":{let t=Array.isArray(e)?e:[],i=t.map(()=>({valid:!0,message:""})),s=n.slice(0,-1),a=()=>{let e=i.filter(e=>!e.valid).map(e=>e.message);this.updateDeepValue([...s,"isValid"],0===e.length),this.updateDeepValue([...s,"validationErrors"],e),this.notify()};t.forEach((e,t)=>{let n=e.condition||e,s=e.message||"Validation failed";i[t].message=s;let o=this.context.dataContext.subscribeDynamicValue(n,e=>{i[t].valid=!!e,a()});r?o.unsubscribe():this.dataListeners.push(()=>o.unsubscribe()),i[t].valid=!!o.value});let o=i.filter(e=>!e.valid).map(e=>e.message);return this.updateDeepValue([...s,"isValid"],0===o.length),this.updateDeepValue([...s,"validationErrors"],o),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[s,a]of Object.entries(e)){let e=t.shape[s]||{type:"STATIC"};i[s]=this.resolveAndBind(a,e,[...n,s],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
1165h(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 s=i.current,a=(0,d.useSyncExternalStore)((0,d.useCallback)(e=>{let t=s.subscribe(e);return()=>t.unsubscribe()},[s]),(0,d.useCallback)(()=>s.snapshot,[s]));return(0,d.useEffect)(()=>()=>s.dispose(),[s]),(0,p.jsx)(n,{props:a||{},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."),_=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."),k=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."),S=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."),w=y.Yj().describe("REF:common_types.json#/$defs/ComponentId|The unique identifier for a component."),I=y.KC([y.YO(w).describe("A static list of child component IDs."),y.Ik({componentId:w,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"),N=y.KC([y.Ik({event:y.Ik({name:y.Yj(),context:y.g1(S).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"),C=y.Ik({condition:_,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(C).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:k.optional().describe("REF:common_types.json#/$defs/DynamicString|A short string used by assistive technologies to convey the purpose of an element."),description:k.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:w.optional(),weight:y.ai().optional()}).passthrough().describe("A generic A2UI component definition."),{ComponentId:w,ChildList:I,DynamicString:k,Action:N}),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()},M={name:"Text",schema:y.Ik({...L,text:k.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()},P={name:"Image",schema:y.Ik({...L,url:k.describe("The URL of the image to display."),description:k.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.")}
1165).strict()},j={name:"Video",schema:y.Ik({...L,url:k.describe("The URL of the video to display.")}).strict()},B={name:"AudioPlayer",schema:y.Ik({...L,url:k.describe("The URL of the audio to be played."),description:k.describe("A description of the audio, such as a title or summary.").optional()}).strict()},U={name:"Row",schema:y.Ik({...L,children:I.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:I.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:I.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()},G={name:"Card",schema:y.Ik({...L,child:w.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()},z={name:"Tabs",schema:y.Ik({...L,tabs:y.YO(y.Ik({title:k.describe("The tab title."),child:w.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:w.describe("The ID of the component that opens the modal when interacted with (e.g., a button). Do NOT define the component inline."),content:w.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()},W={name:"Button",schema:y.Ik({...L,child:w.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:N,checks:O.shape.checks}
1165).strict()},V={name:"TextField",schema:y.Ik({...L,label:k.describe("The text label for the input field."),value:k.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:k.describe("The text to display next to the checkbox."),value:_.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:k.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:k.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:k.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:k.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([k,y.Yj().date(),y.Yj().time(),y.Yj().datetime()]).describe("The minimum allowed date/time in ISO 8601 format.").optional(),max:y.KC([k,y.Yj().date(),y.Yj().time(),y.Yj().datetime()]).describe("The maximum allowed date/time in ISO 8601 format.").optional(),label:k.describe("The text label for the input field.").optional(),checks:O.shape.checks}).strict()},J=f(M,({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(P,({props:e})=>{let t={...b(),objectFit:(e=>"scaleDown"===e?"scale-down":e||"fill")(e.fit),width:"100%",height:"auto",display:"block"};
1165return"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(j,({props:e})=>{let t={...b(),width:"100%",aspectRatio:"16/9"};return(0,p.jsx)("video",{src:e.url,controls:!0,style:t})}),er=f(B,({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,es=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})})),ea=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})})),eo=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(G,({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})),ec=f(z,({props:e,buildChild:t})=>{let[n,r]=(0,d.useState)(0),i=e.tabs||[],s=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:s?t(s.child):null})]})}),eu=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(W,({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(V,({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"},s=d.useId(),a=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:s,style:{fontSize:"14px",fontWeight:"bold"},children:e.label}
1165),n?(0,p.jsx)("textarea",{id:s,style:{...i,border:a?"1px solid red":m},value:e.value||"",onChange:t}):(0,p.jsx)("input",{id:s,type:r,style:{...i,border:a?"1px solid red":m},value:e.value||"",onChange:t}),a&&(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:[],s="mutuallyExclusive"===e.variant,a=t=>{if(s)e.setValue([t]);else{let n=i.includes(t)?i.filter(e=>e!==t):[...i,t];e.setValue(n)}},o=(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:o.map((n,r)=>{let o=i.includes(n.value);return"chips"===e.displayStyle?(0,p.jsx)("button",{onClick:()=>a(n.value),style:{padding:"4px 12px",borderRadius:"16px",border:o?"1px solid var(--a2ui-primary-color, #007bff)":m,backgroundColor:o?"var(--a2ui-primary-color, #007bff)":"#fff",color:o?"#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:s?"radio":"checkbox",checked:o,onChange:()=>a(n.value),name:s?`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 e_ extends ey{constructor(e,t,n){super(e,"EXPRESSION_ERROR"),this.expression=t,this.details=n}}class ek 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 s=new Map;for(let e of n)s.set(e.name,e);this.functions=s,this.themeSchema=r,this.invoker=(e,t,n,r)=>{let i=this.functions.get(e);if(!i)throw new e_(`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 e_(`Validation failed for function '${e}': ${t.message}`,e,t.errors??t.issues);throw t}}}}class eS{static{this.MAX_DEPTH=10}parse(e,t=0){if(t>eS.MAX_DEPTH)throw new e_("Max recursion depth reached in parse");if(!e||!e.includes("${"))return[e];let n=[],r=new ew(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 e_("Unclosed interpolation: missing '}'");return e.input.substring(t,e.pos-1)}parseExpression(e,t=0){if(!(e=e.trim()))return"";let n=new ew(e),r=this.parseExpressionInternal(n,t);if(!n.isAtEnd())throw new e_(`Unexpected characters at end of expression: '${n.input.substring(n.pos)}'`);return r}
1165parseExpressionInternal(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 e_(`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 e_(`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 ew{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 eI=Symbol.for("preact-signals");function eN(){if(eL>1)eL--;else{var e,t=!1,n=ej;for(ej=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 s=eD;for(eD=void 0,eM++;void 0!==s;){var a=s.u;if(s.u=void 0,s.f&=-3,!(8&s.f)&&e$(s))try{s.c()}catch(n){t||(e=n,t=!0)}s=a}}if(eM=0,eL--,t)throw e}}var eC,eO=void 0;function eR(e){var t=eO,n=eC;eO=void 0,eC=void 0;try{return e()}finally{eO=t,eC=n}}var eD=void 0,eL=0,eM=0,eP=0,eF=0,ej=void 0,eB=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 eG(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 ez(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=eB-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,eW(e),t}finally{eO=n,eN()}}}function eW(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 eV(e){if(eO!==this)throw Error("Out-of-order effect");
1165ez(this),eO=e,this.f&=-2,8&this.f&&eW(this),eN()}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,eC&&eC.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=eI,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(eM>100)throw Error("Cycle detected");0!==eL&&0===eM&&this.l!==eF&&(this.l=eF,ej={S:this,v:this.v,i:this.i,o:ej}),this.v=e,this.i++,eB++,eL++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{eN()}}}}),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===eB))return!0;if(this.g=eB,this.f|=1,this.i>0&&!e$(this))return this.f&=-2,!0;var e=eO;try{eG(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,ez(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),eG(this),eL++;var e=eO;return eO=this,eV.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||eW(this)},eK.prototype.dispose=function(){this.d()},!function(e){r=e.signal,i=e.computed,s=e.effect,a=e.batchWrite,o=e.isSignal,l=e.getValue,c=e.setValue,u=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=++eP,eL++;try{return e()}finally{eN()}},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,s=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],a=t.match(s);if(!a)return null;let o=a[0],l=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(l,e=>e.test(o)):function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(l,e=>e.test(o));return n=e.valueCallback?e.valueCallback(c):c,{value:n=r.valueCallback?r.valueCallback(n):n,rest:t.slice(o.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
1165ay","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],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];return{value:a=n.valueCallback?n.valueCallback(a):a,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 e8(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 e5(e,t){return e8(t||e,e)}function e6(e){let t=e5(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=e5(e,null==t?void 0:t.in);return n.setHours(0,0,0,0),n}function te(e,t){var n,r,i,s,a,o,l,c;let u=null!=(c=null!=(l=null!=(o=null!=(a=null==t?void 0:t.weekStartsOn)?a:null==t||null==(r=t.locale)||null==(n=r.options)?void 0:n.weekStartsOn)?o:e4.weekStartsOn)?l:null==(s=e4.locale)||null==(i=s.options)?void 0:i.weekStartsOn)?c:0,d=e5(e,null==t?void 0:t.in),h=d.getDay();return d.setDate(d.getDate()-(7*(h<u)+h-u)),d.setHours(0,0,0,0),d}function tt(e,t){return te(e,{...t,weekStartsOn:1})}function tn(e,t){let n=e5(e,null==t?void 0:t.in),r=n.getFullYear(),i=e8(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);let s=tt(i),a=e8(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let o=tt(a);return n.getTime()>=s.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function tr(e,t){var n,r,i,s,a,o,l,c;let u=e5(e,null==t?void 0:t.in),d=u.getFullYear(),h=null!=(c=null!=(l=null!=(o=null!=(a=null==t?void 0:t.firstWeekContainsDate)?a:null==t||null==(r=t.locale)||null==(n=r.options)?void 0:n.firstWeekContainsDate)?o:e4.firstWeekContainsDate)?l:null==(s=e4.locale)||null==(i=s.options)?void 0:i.firstWeekContainsDate)?c:1,p=e8((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=e8((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+u>=+f?d+1:+u>=+g?d:d-1}function ti(e,t){let n=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+n}let ts={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];
1165default: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)}},ta={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},to={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 ts.y(e,t)},Y:function(e,t,n,r){let i=tr(e,r),s=i>0?i:1-i;return"YY"===t?ti(s%100,2):"Yo"===t?n.ordinalNumber(s,{unit:"year"}):ti(s,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 ts.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=e5(e,null==t?void 0:t.in);return Math.round((te(n,t)-function(e,t){var n,r,i,s,a,o,l,c;let u=null!=(c=null!=(l=null!=(o=null!=(a=null==t?void 0:t.firstWeekContainsDate)?a:null==t||null==(r=t.locale)||null==(n=r.options)?void 0:n.firstWeekContainsDate)?o:e4.firstWeekContainsDate)?l:null==(s=e4.locale)||null==(i=s.options)?void 0:i.firstWeekContainsDate)?c:1,d=tr(e,t),h=e8((null==t?void 0:t.in)||e,0);return h.setFullYear(d,0,u),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=e5(e,void 0);return Math.round((tt(n)-function(e,t){let n=tn(e,void 0),r=e8(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"}):ts.d(e,t)},D:function(e,t,n){let r=function(e,t){let n=e5(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=e8.bind(null,e||n.find(e=>"object"==typeof e));return n.map(i)}(void 0,e,t),s=e7(r),a=e7(i);return Math.round((s-e6(s)-(a-e6(a)))/864e5)}(n,function(e,t){let n=e5(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(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return ti(s,2);case"eo":return n.ordinalNumber(s,{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(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return ti(s,t.length);case"co":return n.ordinalNumber(s,{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?ta.noon:0===i?ta.midnight:i/12>
1165=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?ta.evening:i>=12?ta.afternoon:i>=4?ta.morning:ta.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 ts.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):ts.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"}):ts.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ts.s(e,t)},S:function(e,t){return ts.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return tc(r);case"XXXX":case"XX":return tu(r);
1165default:return tu(r,":")}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"x":return tc(r);case"xxxx":case"xx":return tu(r);default:return tu(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"+tu(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"+tu(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),s=r%60;return 0===s?n+String(i):n+String(i)+t+ti(s,2)}function tc(e,t){return e%60==0?(e>0?"-":"+")+ti(Math.abs(e)/60,2):tu(e,t)}function tu(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],s=r[2];if(!s)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(s,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]/,t_={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())})},tk={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())})},tS={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")})},tw={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")})},tI={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())})},tN={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())})},tC={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())})},tM={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())})},tP={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())})},tj={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'"})},tB={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)})},tG={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)})},tz={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())})},tW=eA(t_,e=>e.a+e.b),tV=eA(tk,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(tS,e=>e.a===e.b),tQ=eA(tw,e=>e.a!==e.b),tJ=eA(tI,e=>e.a>e.b),t0=eA(tN,e=>e.a<e.b),t1=eA(tC,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)),t8=eA(tM,e=>e.string.endsWith(e.suffix)),t5=eA(tP,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 e_(`Invalid regex pattern: ${e.pattern}`,"regex",t)}}),t7=eA(tj,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(tB,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 eS().parse(n);if(0===r.length)return"";let s=r.map(e=>"object"!=typeof e||null===e||Array.isArray(e)?e:t.resolveSignal(e));return i(()=>s.map(e=>(function(e){if(null==e)return"";if("object"==typeof e)try{return JSON.stringify(e)??String(e)}catch{}return String(e)})(o(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);
1165return 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 ns=new Map;function na(e){return eA(tG,t=>{if(isNaN(t.value))return"";try{return(function(e,t,n,r){let i=`${e??"default"}:${t}:${n??"undef"}:${r??"true"}`,s=ns.get(i);return s||(s=new Intl.NumberFormat(e,{style:"currency",currency:t,minimumFractionDigits:n,maximumFractionDigits:n,useGrouping:r}),ns.set(i,s)),s})(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)}})}na();let no=eA(tz,e=>{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,s,a,o,l,c,u,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==(a=e4.locale)||null==(s=a.options)?void 0:s.firstWeekContainsDate)?m:1,_=null!=(y=null!=(b=null!=(v=null!=(g=null==n?void 0:n.weekStartsOn)?g:null==n||null==(l=n.locale)||null==(o=l.options)?void 0:o.weekStartsOn)?v:e4.weekStartsOn)?b:null==(u=e4.locale)||null==(c=u.options)?void 0:c.weekStartsOn)?y:0,k=e5(e,null==n?void 0:n.in);if(!(k instanceof Date||"object"==typeof k&&"[object Date]"===Object.prototype.toString.call(k))&&"number"!=typeof k||isNaN(+e5(k)))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(to[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(k,A));let x={firstWeekContainsDate:T,weekStartsOn:_,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 `").
1165concat(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,to[i[0]])(k,i,E.localize,x)}).join("")}(t,e.format)}catch(e){return console.warn("Error formatting date:",e),t.toISOString()}}),nl=new Map;function nc(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??"")}})}nc();let nu=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 e_(`Invalid URL specified: ${e.url}`,"openUrl",t)}if("https:"!==t.protocol&&"http:"!==t.protocol)throw new e_(`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,es,ea,eo,el,ec,eu,ed,eh,ep,ef,em,eg,ev],function(e){let t=void 0;return[tW,tV,tK,tZ,tX,tQ,tJ,t0,t1,t2,t3,t4,t9,t8,t5,t6,t7,ne,nt,nn,ni(t),na(t),no,nc(t),nu]}()),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 o(r)?u(r):r}return e}subscribeDynamicValue(e,t){let n=this.resolveSignal(e),r=!0,i=u(n),a=s(()=>{let e=l(n);i=e,r||t(e)});return r=!1,{get value(){return i},unsubscribe:()=>{a(),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,a,u={};for(let[t,n]of Object.entries(e.args))u[t]=this.resolveSignal(n);if(0===Object.keys(u).length){let t=new AbortController,n=this.evaluateFunctionReactive(e.call,{},t.signal),i=o(n)?n:r(n);return i.unsubscribe=()=>t.abort(),i}let d=Object.keys(u),h=r(void 0),p=i(()=>{let e={};for(let n=0;n<d.length;n++){var t;e[d[n]]=(t=u[d[n]],l(t))}return e}),f=(t=()=>{try{let t=l(p);n&&n.abort(),a&&(a(),a=void 0),n=new AbortController;let r=this.evaluateFunctionReactive(e.call,t,n.signal);o(r)?a=s(()=>{var e;e=l(r),c(h,e)}):c(h,r)}catch(t){this.dispatchExpressionError(t,e.call),c(h,void 0)}},s(t));return h.unsubscribe=()=>{f(),a&&a(),n&&n.abort();for(let e=0;e<d.length;e++)u[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 e_(`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 e_?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>
11651&&(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 ek(`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 s=r.render,a=(0,d.useMemo)(()=>new nm(e,t,n),[e,t,n,i]);return(0,p.jsx)(s,{context:a,buildChild:(0,d.useCallback)((t,n)=>{let r=n||a.dataContext.path;return(0,p.jsx)(nv,{surface:e,id:t,basePath:r},`${t}-${r}`)},[e,a.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())}),s=e.componentsModel.onDeleted.subscribe(e=>{e===t&&(n++,r())});return()=>{i.unsubscribe(),s.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 s=e.catalog.components.get(i.type);return s?(0,p.jsx)(ng,{surface:e,id:t,basePath:n,componentModel:i,compImpl:s}):(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,n_=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})})),nk=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,n_,nk,f({name:"TextField",
1165schema: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",s={padding:"8px",width:"100%",border:"1px solid #ccc",borderRadius:"4px",boxSizing:"border-box"},a=`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:a,style:{fontSize:"14px",fontWeight:"bold"},children:e.label}),r?(0,p.jsx)("textarea",{id:a,style:s,value:e.value||"",onChange:n}):(0,p.jsx)("input",{id:a,type:i,style:s,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 s=n[t];if(Array.isArray(i)&&!nA(s))throw new eT(`Cannot use non-numeric segment '${s}' on an array in path '${e}'.`,e);if(void 0!==i[s]&&null!==i[s]&&"object"!=typeof i[s])throw new eT(`Cannot set path '${e}': segment '${s}' is a primitive value.`,e);if(void 0===i[s]||null===i[s]){let e=t<n.length-1?n[t+1]:r;i[s]=nA(e)?[]:{}}i=i[s]}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=u(n),a=s(()=>{let e=l(n);i=e,r||t(e)});return r=!1,this.subscriptions.add(a),{get value(){return i},unsubscribe:()=>{a(),this.subscriptions.delete(a)}}}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);a(()=>{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],c(t,n)):"object"==typeof i&&null!==i?(r={...i},c(t,r)):c(t,i)}}notifyAllSignals(){a(()=>{for(let e of this.signals.keys())this.updateSignal(e)})}isDescendant(e,t){return"/"===t||""===t?"/"!==e:e.startsWith(t+"/")}}class nS{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 nw{constructor(){this.components=new Map,this._onCreated=new nS,this._onDeleted=new nS,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 ek(`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 nI=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
1165ontaining the key-value pairs from the component's action.event.context, after resolving all data bindings.")}).strict(),nN=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(),nC=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([nN,nC]),nR=y.Ik({version:y.eu("v0.9")}).and(y.KC([y.Ik({action:nI}),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 nS,this._onError=new nS,this.onAction=this._onAction,this.onError=this._onError,this.dataModel=new nx({}),this.componentsModel=new nw}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=nI.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 nM{constructor(){this.surfaces=new Map,this.surfaceUnsubscribers=new Map,this._onSurfaceCreated=new nS,this._onSurfaceDeleted=new nS,this._onAction=new nS,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 nP{constructor(e,t,n){this.id=e,this.type=t,this._onUpdated=new nS,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()}
1165get componentTree(){return{id:this.id,type:this.type,...this._properties}}}var nF=n(22220);class nj{constructor(e,t){this.catalogs=e,this.actionHandler=t,this.model=new nM,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,s=this.catalogs.find(e=>e.id===n);if(!s)throw new ek(`Catalog not found: ${n}`);if(this.model.getSurface(t))throw new ek(`Surface ${t} already exists.`);let a=new nL(t,s,r,i??!1);this.model.addSurface(a)}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 ek(`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 s=n.componentsModel.get(t);if(s)if(r&&r!==s.type){n.componentsModel.removeComponent(t);let e=new nP(t,r,i);n.componentsModel.addComponent(e)}else s.properties=i;else{if(!r)throw new eE(`Cannot create component ${t} without a type.`);let e=new nP(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 ek(`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 nB=(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 s=(0,d.useRef)(null);s.current||(s.current=new nj([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 a=s.current,[o,l]=(0,d.useState)(0),[c,u]=(0,d.useState)(null),h=(0,d.useRef)(null);h.current||(h.current={processMessages:e=>{try{a.processMessages(e)}catch(e){console.warn("[A2UI] processMessages error:",e),u(e instanceof Error?e.message:String(e));return}u(null),l(e=>e+1)},dispatch:e=>{i.current&&i.current(e)},getSurface:e=>a.model.getSurface(e),clearSurfaces:()=>{for(let[e]of a.model.surfacesMap)a.processMessages([{version:"v0.9",deleteSurface:{surfaceId:e}}]);l(e=>e+1)}});let f=h.current,m=(0,d.useMemo)(()=>({version:o,error:c}),[o,c]);return(0,p.jsx)(nB.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)(nB);if(!e)throw Error("useA2UIActions must be used within an A2UIProvider");return e}function nG(){return(0,d.useContext)(nU)?.error??null}var nz=n(2821);let nY=(0,d.memo)(function(){return(0,p.jsx)("div",{className:"a2ui-loading",style:{padding:"16px",o
1165pacity:.5},children:"Loading..."})}),nq=(0,d.memo)(function({surfaceId:e,className:t,fallback:n=null,loadingFallback:r}){let{getSurface:i,version:s}=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}}(),a=i(e);if(!a)return(0,p.jsx)(p.Fragment,{children:n});let o=r??(0,p.jsx)(nY,{});return(0,p.jsx)("div",{className:function(...e){return(0,nz.$)(e)}("a2ui-surface",t),"data-surface-id":e,"data-version":s,children:(0,p.jsx)(d.Suspense,{fallback:o,children:(0,p.jsx)(nb,{surface:a})})})}),nW="A2UI Component Schema — available components for generating UI surfaces. Use these component names and properties when creating A2UI operations.";function nV(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,s=[];for(let[n,r]of Object.entries(e)){let e={name:n,schema:r.props},i=t[n],a=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})});s.push(a)}return new ex(r,i?[...Array.from(nd.components.values()),...s]:s,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:()=>a,ZS:()=>r,Zp:()=>s}),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 s=r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),a=e=>{switch(typeof e){case"undefined":return s.undefined;case"string":return s.string;case"number":return Number.isNaN(e)?s.nan:s.number;case"boolean":return s.boolean;case"function":return s.function;case"bigint":return s.bigint;case"symbol":return s.symbol;case"object":if(Array.isArray(e))return s.array;if(null===e)return s.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return s.promise;if("undefined"!=typeof Map&&e instanceof Map)return s.map;if("undefined"!=typeof Set&&e instanceof Set)return s.set;if("undefined"!=typeof Date&&e instanceof Date)return s.date;return s.object;default:return s.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:()=>s});var r=n(77163);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s(e)}function s(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)},s=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];
1165return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var a={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 o=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:l,className:c="",children:u,iconNode:d,...h}=e;return(0,r.createElement)("svg",{ref:t,...a,width:i,height:i,stroke:n,strokeWidth:l?24*Number(o)/Number(i):o,className:s("lucide",c),...!u&&!(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(u)?u:[u]])}),l=(e,t)=>{let n=(0,r.forwardRef)((n,a)=>{let{className:l,...c}=n;return(0,r.createElement)(o,{ref:a,iconNode:t,className:s("lucide-".concat(i(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),l),...c})});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:()=>a});var r=n(8286),i=n(96948),s=n(28400);function a(e,t){return(0,i.N)(function(n,i){var a=null,o=0,l=!1,c=function(){return l&&!a&&i.complete()};n.subscribe((0,s._)(i,function(n){null==a||a.unsubscribe();var l=0,u=o++;(0,r.Tg)(e(n,u)).subscribe(a=(0,s._)(i,function(e){return i.next(t?t(n,e,u,l++):e)},function(){a=null,c()}))},function(){l=!0,c()}))})}},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=`\
1166Generate A2UI v0.9 JSON.
1167
1168## A2UI Protocol Instructions
1169
1170A2UI (Agent to UI) is a protocol for rendering rich UI surfaces from agent responses.
1171
1172CRITICAL: You MUST call the render_a2ui tool with ALL of these arguments:
1173- surfaceId: A unique ID for the surface (e.g. "product-comparison")
1174- components: REQUIRED — the A2UI component array. NEVER omit this. Only use
1175  components listed in the Available Components schema provided as context.
1176- data: OPTIONAL — a JSON object written to the root of the surface data model.
1177  Use for pre-filling form values or providing data for path-bound components.
1178- every component must have the "component" field specifying the component type.
1179  ONLY use component names from the Available Components schema — do NOT invent
1180  component names or use names not in the schema.
1181
1182COMPONENT ID RULES:
1183- Exactly one component MUST have id="root". This is the surface's entry
1184  point — the renderer begins at "root" and walks the child/children tree
1185  from there. Every other component must be reachable from "root". If no
1186  component has id="root", the surface renders an empty loading placeholder
1187  and none of your components will be shown.
1188- Every component ID must be unique within the surface.
1189- A component MUST NOT reference itself as child/children. This causes a
1190  circular dependency error. For example, if a component has id="avatar",
1191  its child must be a DIFFERENT id (e.g. "avatar-img"), never "avatar".
1192- The child/children tree must be a DAG — no cycles allowed.
1193
1194REPEATING CONTENT (TEMPLATES):
1195To repeat a component for each item in an array, use the structural children format:
1196  children: { componentId: "card-id", path: "/items" }
1197This tells the renderer to create one instance of "card-id" per item in the "/items" array.
1198
1199PATH RULES FOR TEMPLATES:
1200Components inside a repeating template use RELATIVE paths (no leading slash).
1201The path is resolved relative to each array item automatically.
1202If a container has children: { componentId: "card", path: "/items" } and each item
1203has a key "name", use { "path": "name" } (NO leading slash — relative to item).
1204CRITICAL: Do NOT use "/name" (absolute) inside templates — use "name" (relative).
1205The container's path ("/items") uses a leading slash (absolute), but all
1206components INSIDE the template use paths WITHOUT leading slash.
1207
1208COMPONENT VALUES — DEFAULT RULE:
1209Use inline literal values for ALL component properties. Pass strings, numbers,
1210arrays, and objects directly on the component. Do NOT use { "path": "..." }
1211objects unless the property's schema explicitly allows it (see exception below).
1212CRITICAL: USING { "path": "..." } ON A PROPERTY THAT DOES NOT DECLARE PATH
1213SUPPORT IN ITS SCHEMA WILL CAUSE A RUNTIME CRASH AND BREAK THE ENTIRE UI.
1214ALWAYS CHECK THE COMPONENT SCHEMA FIRST — IF THE PROPERTY ONLY ACCEPTS A
1215PLAIN TYPE, YOU MUST USE A LITERAL VALUE.
1216VERY IMPORTANT: THE APPLICATION WILL BREAK IF YOU DO NOT FOLLOW THIS RULE!
1217
1218For example, a chart's "data" must always be an inline array:
1219  "data": [{"label": "Jan", "value": 100}, {"label": "Feb", "value": 200}]
1220A metric's "value" must always be an inline string:
1221  "value": "$1,200"
1222
1223PATH BINDING EXCEPTION — SCHEMA-DRIVEN:
1224A few properties accept { "path": "/some/path" } as an alternative to a literal
1225value. You can identify these in the Available Components schema: the property
1226will list BOTH a literal type AND an object-with-path option. If a property only
1227shows a single type (string, number, array, etc.), it does NOT support path
1228binding — use a literal value only.
1229
1230Path binding is typically used for editable form inputs so the client can write
1231user input back to the data model. When building forms:
1232- Bind input "value" to a data model path: "value": { "path": "/form/name" }
1233- Pre-fill via the "data" tool argument: "data": { "form": { "name": "Alice" } }
1234- Capture values on submit via button action context:
1235    "action": { "event": { "name": "submit", "context": { "name": { "path": "/form/name" } } } }
1236
1237REPEATING CONTENT uses a structural children format (not the same as value binding):
1238  children: { componentId: "card-id", path: "/items" }
1239Components inside templates use RELATIVE paths (no leading slash): { "path": "name" }.`,i=`\
1240Create polished, visually appealing interfaces. ONLY use components listed in the
1241Available Components schema — do NOT use component names that are not in the schema.
1242
1243Design principles:
1244- Create clear visual hierarchy within cards and layouts.
1245- Keep cards clean — avoid clutter. Whitespace is good.
1246- Use consistent surfaceIds (lowercase, hyphenated).
1247- NEVER use the same ID for a component and its child — this creates a
1248  circular dependency. E.g. if id="avatar", child must NOT be "avatar".
1249- For side-by-side comparisons, use a container with structural children
1250  (children: { componentId, path }) to repeat a card template per data item.
1251- Include images when relevant (logos, icons, product photos):
1252  - Prefer company logos via Google favicons: https://www.google.com/s2/favicons?domain=example.com&sz=128
1253  - Do NOT invent Unsplash photo-IDs — they will 404. Only use real, known URLs.
1254- For buttons: action MUST use this exact nested format:
1255    "action": { "event": { "name": "myAction", "context": { "key": "value" } } }
1256  The "event" key holds an OBJECT with "name" (required) and "context" (optional).
1257  Do NOT use a flat format like {"event": "name"} — "event" must be an object.
1258- For forms: check the component schema — if an input's "value" property
1259  supports path binding, use it for editable fields. The submit button's
1260  action context should reference the same paths to capture user input.
1261
1262Use the SAME surfaceId as the main surface. Match action names to button action event names.`},92453:(e,t,n)=>{n.d(t,{$:()=>o});var r=n(71450),i=n(28400),s=n(45037),a=n(8286);function o(e,t){void 0===t&&(t={});var n=t.selector,o=(0,r.Tt)(t,["selector"]);return new s.c(function(t){var s=new AbortController,l=s.signal,c=!0,u=o.signal;if(u)if(u.aborted)s.abort();else{var d=function(){l.aborted||s.abort()};u.addEventListener("abort",d),t.add(function(){return u.removeEventListener("abort",d)})}var h=(0,r.Cl)((0,r.Cl)({},o),{signal:l}),p=function(e){c=!1,t.error(e)};return fetch(e,h).then(function(e){n?(0,a.Tg)(n(e)).subscribe((0,i._)(t,void 0,function(){c=!1,t.complete()},p)):(c=!1,t.next(e),t.complete())}).catch(p),function(){c&&s.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},94094:(e,t,n)=>{n.d(t,{I:()=>c});var r=n(66986),i=n(41370),s=n(78232);let a=/[A-Z]/g,o=/-[a-z]/g,l=/^data[-\w.:]+$/i;function c(e,t){let n=(0,s.S)(t),c=t,h=i.R;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&l.test(t)){if("-"===t.charAt(4)){let e=t.slice(5).replace(o,d);c="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!o.test(e)){let n=e.replace(a,u);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}h=r.E}return new h(c,t)}function u(e){return"-"+e.toLowerCase()}function d(e){return e.charAt(1).toUpperCase()}},94446:(e,t,n)=>{n.d(t,{s:()=>a,t:()=>s});var r=n(12115);function i(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function s(...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 a(...e){return r.useCallback(s(...e),e)}}
1262,95139:(e,t,n)=>{n.d(t,{YR:()=>i});var r=n(56522);function i(e,t,n,i){let s,a,o;"function"==typeof t&&"function"!=typeof n?(a=void 0,o=t,s=n):(a=t,o=n,s=i),(0,r.VG)(e,a,function(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)},s)}},95502:(e,t,n)=>{n.d(t,{C:()=>r});let r=function(e){var t,n;if(null==e)return s;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 s(){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,s=0,a=0;if("string"!=typeof t)throw TypeError("Expected substring");for(;-1!==r;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}},95736:(e,t,n)=>{n.d(t,{UC:()=>tn,q7:()=>tr,ZL:()=>tt,bL:()=>e7,wv:()=>ti,Pb:()=>ts,G5:()=>to,ZP:()=>ta,l9:()=>te});var r=n(12115),i=n(92556),s=n(94446),a=n(3468),o=n(23558),l=n(97602),c=n(49972),u=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},_="RovingFocusGroup",[k,A,x]=(0,c.N)(_),[S,w]=(0,a.A)(_,[x]),[I,N]=S(_),C=r.forwardRef((e,t)=>(0,y.jsx)(k.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,y.jsx)(k.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,y.jsx)(O,{...e,ref:t})})}));C.displayName=_;var O=r.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:a,loop:c=!1,dir:d,currentTabStopId:h,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:f,onEntryFocus:m,preventScrollOnEntryFocus:g=!1,...v}=e,k=r.useRef(null),x=(0,s.s)(t,k),S=(0,u.jH)(d),[w,N]=(0,o.i)({prop:h,defaultProp:null!=p?p:null,onChange:f,caller:_}),[C,O]=r.useState(!1),R=(0,b.c)(m),D=A(n),L=r.useRef(!1),[P,F]=r.useState(0);return r.useEffect(()=>{let e=k.current;if(e)return e.addEventListener(E,R),()=>e.removeEventListener(E,R)},[R]),(0,y.jsx)(I,{scope:n,orientation:a,dir:S,loop:c,currentTabStopId:w,onItemFocus:r.useCallback(e=>N(e),[N]),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:C||0===P?-1:0,"data-orientation":a,...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&&!C){let t=new CustomEvent(E,T);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=D().filter(e=>e.focusable);M([e.find(e=>e.active),e.find(e=>e.id===w),...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:s=!0,active:a=!1,tabStopId:o,children:c,...u}=e,d=(0,f.B)(),h=o||d,p=N(R,n),m=p.currentTabStopId===h,g=A(n),{onFocusableItemAdd:v,onFocusableItemRemove:b,currentTabStopId:E}=p;return r.useEffect(()=>{if(s)return v(),()=>b()},[s,v,b]),(0,y.jsx)(k.ItemSlot,{scope:n,id:h,focusable:s,active:a,children:(0,y.jsx)(l.sG.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...u,ref:t,onMouseDown:(0,i.mK)(e.onMouseDown,e=>{s?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=>
1262e.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(()=>M(n))}}),children:"function"==typeof c?c({isCurrentTabStop:m,hasTabStop:null!=E}):c})})});D.displayName=R;var L={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function M(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 P=n(32467),F=n(97745),j=n(14432),B=["Enter"," "],U=["ArrowUp","PageDown","End"],H=["ArrowDown","PageUp","Home",...U],$={ltr:[...B,"ArrowRight"],rtl:[...B,"ArrowLeft"]},G={ltr:["ArrowLeft"],rtl:["ArrowRight"]},z="Menu",[Y,q,W]=(0,c.N)(z),[V,K]=(0,a.A)(z,[W,m.Bk,w]),Z=(0,m.Bk)(),X=w(),[Q,J]=V(z),[ee,et]=V(z),en=e=>{let{__scopeMenu:t,open:n=!1,children:i,dir:s,onOpenChange:a,modal:o=!0}=e,l=Z(t),[c,d]=r.useState(null),h=r.useRef(!1),p=(0,b.c)(a),f=(0,u.jH)(s);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:c,onContentChange:d,children:(0,y.jsx)(ee,{scope:t,onClose:r.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:h,dir:f,modal:o,children:i})})})};en.displayName=z;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",[es,ea]=V(ei,{forceMount:void 0}),eo=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,s=J(ei,t);return(0,y.jsx)(es,{scope:t,forceMount:n,children:(0,y.jsx)(v.C,{present:n||s.open,children:(0,y.jsx)(g.Z,{asChild:!0,container:i,children:r})})})};eo.displayName=ei;var el="MenuContent",[ec,eu]=V(el),ed=r.forwardRef((e,t)=>{let n=ea(el,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,s=J(el,e.__scopeMenu),a=et(el,e.__scopeMenu);return(0,y.jsx)(Y.Provider,{scope:e.__scopeMenu,children:(0,y.jsx)(v.C,{present:r||s.open,children:(0,y.jsx)(Y.Slot,{scope:e.__scopeMenu,children:a.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),a=r.useRef(null),o=(0,s.s)(t,a);return r.useEffect(()=>{let e=a.current;if(e)return(0,F.Eq)(e)},[]),(0,y.jsx)(em,{...e,ref:o,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,P.TL)("MenuContent.ScrollLock"),em=r.forwardRef((e,t)=>{let{__scopeMenu:n,loop:a=!1,trapFocus:o,onOpenAutoFocus:l,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:f,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:b,onInteractOutside:E,onDismiss:T,disableOutsideScroll:_,...k}=e,A=J(el,n),x=et(el,n),S=Z(n),w=X(n),I=q(n),[N,O]=r.useState(null),R=r.useRef(null),D=(0,s.s)(t,R,A.onContentChange),L=r.useRef(0),M=r.useRef(""),P=r.useRef(0),F=r.useRef(null),B=r.useRef("right"),$=r.useRef(0),G=_?j.A:r.Fragment;r.useEffect(()=>()=>window.clearTimeout(L.current),[]),(0,h.Oh)();let z=r.useCallback(e=>{var t,n;return B.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,s=t.length-1;e<t.length;s=e++){let a=t[e],o=t[s],l=a.x,c=a.y,u=o.x,d=o.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+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)(ec,{scope:n,searchRef:M,onItemEnter:r.useCallback(e=>{z(e)&&e.preventDefault()},[z]),onItemLeave:r.useCallback(e=>{var t;
1262z(e)||(null==(t=R.current)||t.focus(),O(null))},[z]),onTriggerLeave:r.useCallback(e=>{z(e)&&e.preventDefault()},[z]),pointerGraceTimerRef:P,onPointerGraceIntentChange:r.useCallback(e=>{F.current=e},[]),children:(0,y.jsx)(G,{..._?{as:ef,allowPinchZoom:!0}:void 0,children:(0,y.jsx)(p.n,{asChild:!0,trapped:o,onMountAutoFocus:(0,i.mK)(l,e=>{var t;e.preventDefault(),null==(t=R.current)||t.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:(0,y.jsx)(d.qW,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:g,onPointerDownOutside:v,onFocusOutside:b,onInteractOutside:E,onDismiss:T,children:(0,y.jsx)(C,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:a,currentTabStopId:N,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":eG(A.open),"data-radix-menu-content":"",dir:x.dir,...S,...k,ref:D,style:{outline:"none",...k.style},onKeyDown:(0,i.mK)(k.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=M.current+e,i=I().filter(e=>!e.disabled),s=document.activeElement,a=null==(t=i.find(e=>e.ref.current===s))?void 0:t.textValue,o=function(e,t,n){var r;let i=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,s=n?e.indexOf(n):-1,a=(r=Math.max(s,0),e.map((t,n)=>e[(r+n)%e.length]));1===i.length&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(i.toLowerCase()));return o!==n?o:void 0}(i.map(e=>e.textValue),r,a),l=null==(n=i.find(e=>e.textValue===o))?void 0:n.ref.current;!function e(t){M.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 s=I().filter(e=>!e.disabled).map(e=>e.ref.current);U.includes(e.key)&&s.reverse(),function(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}(s)}),onBlur:(0,i.mK)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(L.current),M.current="")}),onPointerMove:(0,i.mK)(e.onPointerMove,eq(e=>{let t=e.target,n=$.current!==e.clientX;e.currentTarget.contains(t)&&n&&(B.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:a,...o}=e,c=r.useRef(null),u=et(eb,e.__scopeMenu),d=eu(eb,e.__scopeMenu),h=(0,s.s)(t,c),p=r.useRef(!1);return(0,y.jsx)(eT,{...o,ref:h,disabled:n,onClick:(0,i.mK)(e.onClick,()=>{let e=c.current;if(!n&&e){let t=new CustomEvent(ey,{bubbles:!0,cancelable:!0});e.addEventListener(ey,e=>null==a?void 0:a(e),{once:!0}),(0,l.hO)(e,t),t.defaultPrevented?p.current=!1:u.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||B.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});eE.displayName=eb;var eT=r.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:a=!1,textValue:o,...c}=e,u=eu(eb,n),d=X(n),h=r.useRef(null),p=(0,s.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())}},[c.children]),(0,y.jsx)(Y.ItemSlot,{scope:n,disabled:a,textValue:null!=o?o:g,children:(0,y.jsx)(D,{asChild:!0,...d,focusable:!a,children:(0,y.jsx)(l.sG.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...c,ref:p,onPointerMove:(0,i.mK)(e.onPointerMove,eq(e=>{a?u.onItemLeave(e):(u.onItemEnter(e),e.defaultPrevented||e.currentTarget.focu
1262s({preventScroll:!0}))})),onPointerLeave:(0,i.mK)(e.onPointerLeave,eq(e=>u.onItemLeave(e))),onFocus:(0,i.mK)(e.onFocus,()=>m(!0)),onBlur:(0,i.mK)(e.onBlur,()=>m(!1))})})})}),e_=r.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...s}=e;return(0,y.jsx)(eC,{scope:e.__scopeMenu,checked:n,children:(0,y.jsx)(eE,{role:"menuitemcheckbox","aria-checked":ez(n)?"mixed":n,...s,ref:t,"data-state":eY(n),onSelect:(0,i.mK)(s.onSelect,()=>null==r?void 0:r(!!ez(n)||!n),{checkForDefaultPrevented:!1})})})});e_.displayName="MenuCheckboxItem";var ek="MenuRadioGroup",[eA,ex]=V(ek,{value:void 0,onValueChange:()=>{}}),eS=r.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,s=(0,b.c)(r);return(0,y.jsx)(eA,{scope:e.__scopeMenu,value:n,onValueChange:s,children:(0,y.jsx)(eg,{...i,ref:t})})});eS.displayName=ek;var ew="MenuRadioItem",eI=r.forwardRef((e,t)=>{let{value:n,...r}=e,s=ex(ew,e.__scopeMenu),a=n===s.value;return(0,y.jsx)(eC,{scope:e.__scopeMenu,checked:a,children:(0,y.jsx)(eE,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":eY(a),onSelect:(0,i.mK)(r.onSelect,()=>{var e;return null==(e=s.onValueChange)?void 0:e.call(s,n)},{checkForDefaultPrevented:!1})})})});eI.displayName=ew;var eN="MenuItemIndicator",[eC,eO]=V(eN,{checked:!1}),eR=r.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,s=eO(eN,n);return(0,y.jsx)(v.C,{present:r||ez(s.checked)||!0===s.checked,children:(0,y.jsx)(l.sG.span,{...i,ref:t,"data-state":eY(s.checked)})})});eR.displayName=eN;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 eM="MenuSub",[eP,eF]=V(eM),ej=e=>{let{__scopeMenu:t,children:n,open:i=!1,onOpenChange:s}=e,a=J(eM,t),o=Z(t),[l,c]=r.useState(null),[u,d]=r.useState(null),h=(0,b.c)(s);return r.useEffect(()=>(!1===a.open&&h(!1),()=>h(!1)),[a.open,h]),(0,y.jsx)(m.bL,{...o,children:(0,y.jsx)(Q,{scope:t,open:i,onOpenChange:h,content:u,onContentChange:d,children:(0,y.jsx)(eP,{scope:t,contentId:(0,f.B)(),triggerId:(0,f.B)(),trigger:l,onTriggerChange:c,children:n})})})};ej.displayName=eM;var eB="MenuSubTrigger",eU=r.forwardRef((e,t)=>{let n=J(eB,e.__scopeMenu),a=et(eB,e.__scopeMenu),o=eF(eB,e.__scopeMenu),l=eu(eB,e.__scopeMenu),c=r.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=l,h={__scopeMenu:e.__scopeMenu},p=r.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return r.useEffect(()=>p,[p]),r.useEffect(()=>{let e=u.current;return()=>{window.clearTimeout(e),d(null)}},[u,d]),(0,y.jsx)(er,{asChild:!0,...h,children:(0,y.jsx)(eT,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?o.contentId:void 0,"data-state":eG(n.open),...e,ref:(0,s.t)(t,o.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||c.current||(l.onPointerGraceIntentChange(null),c.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,s="right"===t,a=i[s?"left":"right"],o=i[s?"right":"left"];l.onPointerGraceIntentChange({area:[{x:e.clientX+(s?-5:5),y:e.clientY},{x:a,y:i.top},{x:o,y:i.top},{x:o,y:i.bottom},{x:a,y:i.bottom}],side:t}),window.clearTimeout(u.current),u.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)&&$[a.dir].includes(t.key)){var i;n.onOpenChange(!0),null==(i=n.content)||i.focus(),t.preventDefault()}})})})});eU.displayName=eB;var eH="MenuSubContent",e$=r.forwardRef((e,t)=>
1262{let n=ea(el,e.__scopeMenu),{forceMount:a=n.forceMount,align:o="start",...l}=e,c=J(el,e.__scopeMenu),u=et(el,e.__scopeMenu),d=eF(eH,e.__scopeMenu),h=r.useRef(null),p=(0,s.s)(t,h);return(0,y.jsx)(Y.Provider,{scope:e.__scopeMenu,children:(0,y.jsx)(v.C,{present:a||c.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:o,side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;u.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&&c.onOpenChange(!1)}),onEscapeKeyDown:(0,i.mK)(e.onEscapeKeyDown,e=>{u.onClose(),e.preventDefault()}),onKeyDown:(0,i.mK)(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=G[u.dir].includes(e.key);if(t&&n){var r;c.onOpenChange(!1),null==(r=d.trigger)||r.focus(),e.preventDefault()}})})})})})});function eG(e){return e?"open":"closed"}function ez(e){return"indeterminate"===e}function eY(e){return ez(e)?"indeterminate":e?"checked":"unchecked"}function eq(e){return t=>"mouse"===t.pointerType?e(t):void 0}e$.displayName=eH;var eW="DropdownMenu",[eV,eK]=(0,a.A)(eW,[K]),eZ=K(),[eX,eQ]=eV(eW),eJ=e=>{let{__scopeDropdownMenu:t,children:n,dir:i,open:s,defaultOpen:a,onOpenChange:l,modal:c=!0}=e,u=eZ(t),d=r.useRef(null),[h,p]=(0,o.i)({prop:s,defaultProp:null!=a&&a,onChange:l,caller:eW});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:c,children:(0,y.jsx)(en,{...u,open:h,onOpenChange:p,dir:i,modal:c,children:n})})};eJ.displayName=eW;var e0="DropdownMenuTrigger",e1=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,o=eQ(e0,n),c=eZ(n);return(0,y.jsx)(er,{asChild:!0,...c,children:(0,y.jsx)(l.sG.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:(0,s.t)(t,o.triggerRef),onPointerDown:(0,i.mK)(e.onPointerDown,e=>{!r&&0===e.button&&!1===e.ctrlKey&&(o.onOpenToggle(),o.open||e.preventDefault())}),onKeyDown:(0,i.mK)(e.onKeyDown,e=>{!r&&(["Enter"," "].includes(e.key)&&o.onOpenToggle(),"ArrowDown"===e.key&&o.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)(eo,{...r,...n})};e2.displayName="DropdownMenuPortal";var e3="DropdownMenuContent",e4=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...s}=e,a=eQ(e3,n),o=eZ(n),l=r.useRef(!1);return(0,y.jsx)(ed,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...s,ref:t,onCloseAutoFocus:(0,i.mK)(e.onCloseAutoFocus,e=>{var t;l.current||null==(t=a.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;(!a.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)(e_,{...i,...r,ref:t})}).displayName="DropdownMenuCheckboxItem",r.forwardRef((e,t)=>
1262{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(eS,{...i,...r,ref:t})}).displayName="DropdownMenuRadioGroup",r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(eI,{...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 e8=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(eD,{...i,...r,ref:t})});e8.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 e5=r.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=eZ(n);return(0,y.jsx)(eU,{...i,...r,ref:t})});e5.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=e8,ts=e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:s}=e,a=eZ(t),[l,c]=(0,o.i)({prop:r,defaultProp:null!=s&&s,onChange:i,caller:"DropdownMenuSub"});return(0,y.jsx)(ej,{...a,open:l,onOpenChange:c,children:n})},ta=e5,to=e6},95868:(e,t,n)=>{n.d(t,{R0:()=>l,lI:()=>o,ms:()=>a});var r=n(39097),i=n(89526);function s(e){return e[e.length-1]}function a(e){return(0,r.T)(s(e))?e.pop():void 0}function o(e){return(0,i.m)(s(e))?e.pop():void 0}function l(e,t){return"number"==typeof s(e)?e.pop():t}},96195:(e,t,n)=>{let r;n.d(t,{Te:()=>T});var i=n(12115),s=n(47650);function a(e,t,n){let r,i=n.initialDeps??[],s=!0;function a(){let a=e();return a.length!==i.length||a.some((e,t)=>i[t]!==e)?(i=a,r=t(...a),(null==n?void 0:n.onChange)&&!(s&&n.skipInitialOnChange)&&n.onChange(r),s=!1,r):r}return a.updateDeps=e=>{i=e},a}function o(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let l=()=>{if(void 0!==r)return r;if("undefined"==typeof navigator)return r=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return r=!0;let e=navigator.maxTouchPoints;return r="MacIntel"===navigator.platform&&void 0!==e&&e>0},c=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},u=e=>e,d=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},h=(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(c(n)),!r.ResizeObserver)return()=>{};let s=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(c(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},p={passive:!0},f="undefined"==typeof window||"onscrollend"in window,m=(e,t)=>
1262((e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let s=e.options.useScrollendEvent&&f,a=0,o=s?null:((e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}})(i,()=>t(a,!1),e.options.isScrollingResetDelay),l=e=>()=>{a=n(r),null==o||o(),t(a,e)},c=l(!0),u=l(!1);return r.addEventListener("scroll",c,p),s&&r.addEventListener("scrollend",u,p),()=>{r.removeEventListener("scroll",c),s&&r.removeEventListener("scrollend",u)}})(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),g=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(void 0!==i)return i}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},v=(e,{adjustments:t=0,behavior:n},r)=>{var i,s;null==(s=null==(i=r.scrollElement)?void 0:i.scrollTo)||s.call(i,{[r.options.horizontal?"left":"top"]:e+t,behavior:n})};class b{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,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){for(let[e,n]of(this.observer.unobserve(t),this.elementsCache))if(n===t){this.elementsCache.delete(e);break}return}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=>{var t,n;let r={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:u,rangeExtractor:d,onChange:()=>{},measureElement:g,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(let t in e){let n=e[t];void 0!==n&&(r[t]=n)}let i=this.options,s=null,a=null,o=!1;if(void 0!==i&&i.enabled&&r.enabled&&"end"===r.anchorTo&&null!==this.scrollElement){let e=i.count,l=r.count,c=this.getMeasurements(),u=e>0?(null==(t=c[0])?void 0:t.key)??i.getItemKey(0):null,d=e>0?(null==(n=c[e-1])?void 0:n.key)??i.getItemKey(e-1):null;if(l!==e||e>0&&l>0&&(r.getItemKey(0)!==u||r.getItemKey(l-1)!==d)){o=!0;let t=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??c[0]:null;t&&(s=[t.key,this.getScrollOffset()-t.start]);let n=!0===r.followOnAppend?"auto":r.followOnAppend||null;n&&l>e&&this.isAtEnd(i.scrollEndThreshold)&&(0===e||r.getItemKey(l-1)!==d)&&(a=n)}}this.options=r,o&&(this.pendingMin=0,this.itemSizeCacheVersion++);let l=!1,c=0;if(s&&null!==this.scrollOffset){let[e,t]=s,n=this.getMeasurements(),{count:r,getItemKey:i}=this.options,a=0;for(;a<r&&i(a)!==e;)a++;if(a<r){let e=n[a];if(e){let n=e.start+t;n!==this.scrollOffset&&(c=n-this.scrollOffset,this.scrollOffset=n,l=!0)}}}(l||a)&&(this.pendingScrollAnchor=[l?s[0]:null,l?s[1]:0,a,c])},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=()=>
1262{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();if(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)=>{null!==this._intendedScrollOffset&&1.5>Math.abs(e-this._intendedScrollOffset)&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,l()&&null!=this.targetWindow&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener("touchstart",t,p),e.addEventListener("touchend",n,p),this.unsubs.push(()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchend",n),null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let n=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,n&&this.scrollElement&&this.options.enabled){let[e,t,r,i]=n;null===e||r||(l()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?0!==i&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(0===this._iosDeferredAdjustment||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,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 s=r.get(t.lane);if(null==s||t.end>s.end?r.set(t.lane,t):t.end<s.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)=>e.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,s,a)=>(void 0!==this.prevLanes&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:s,laneAssignmentMode:
1262a}),{key:!1}),this.getMeasurements=a(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:s,laneAssignmentMode:a},o)=>{let l=this.itemSizeCache;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.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let c=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),1===s){let i,s=this.options.gap,a=2*e,o=this._flatMeasurements;if(!o||o.length<a){let e=new Float64Array(a);o&&c>0&&e.set(o.subarray(0,2*c)),o=e,this._flatMeasurements=o}if(0===c)i=t+n;else{let e=c-1;i=o[2*e]+o[2*e+1]+s}for(let t=c;t<e;t++){let e=r(t),n=l.get(e),a="number"==typeof n?n:this.options.estimateSize(t);o[2*t]=i,o[2*t+1]=a,i+=a+s}let u=function(e,t,n){return new Proxy(Array(e),{get(r,i,s){if("string"==typeof i){let s=i.charCodeAt(0);if(s>=48&&s<=57){let s=+i;if(Number.isInteger(s)&&s>=0&&s<e){let e=r[s];if(!e){let i=t[2*s];e=r[s]={index:s,key:n(s),start:i,size:t[2*s+1],end:i+t[2*s+1],lane:0}}return e}}if("length"===i)return e}return Reflect.get(r,i,s)}})}(e,o,r);return this.measurementsCache=u,u}let u=this.measurementsCache.slice(0,c),d=Array(s).fill(void 0);for(let e=0;e<c;e++){let t=u[e];t&&(d[t.lane]=e)}for(let i=c;i<e;i++){let e,s,o=r(i),c=this.laneAssignments.get(i),h="estimate"===a||l.has(o);if(void 0!==c&&this.options.lanes>1){let r=d[e=c],i=void 0!==r?u[r]:void 0;s=i?i.end+this.options.gap:t+n}else{let r=1===this.options.lanes?u[i-1]:this.getFurthestMeasurement(u,i);s=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=l.get(o),f="number"==typeof p?p:this.options.estimateSize(i),m=s+f;u[i]={index:i,start:s,size:f,end:m,key:o,lane:e},d[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,flat:i}){let s=e.length-1,a=i?e=>i[2*e]:t=>e[t].start,o=i?e=>i[2*e]+i[2*e+1]:t=>e[t].end;if(e.length<=r)return{startIndex:0,endIndex:s};let l=y(0,s,a,n),c=l;if(1===r)for(;c<s&&o(c)<n+t;)c++;else if(r>1){let i=Array(r).fill(0);for(;c<s&&i.some(e=>e<n+t);){let t=e[c];i[t.lane]=t.end,c++}let a=Array(r).fill(n+t);for(;l>=0&&a.some(e=>e>=n);){let t=e[l];a[t.lane]=t.start,l--}l=Math.max(0,l-l%r),c=Math.min(s,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}({measurements:e,outerSize:t,scrollOffset:n,lanes:r,flat:1===r&&null!=this._flatMeasurements?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}
1262),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,r;let i,s,a;if(e<0||e>=this.options.count)return;let o=this._flatMeasurements;if(1===this.options.lanes&&null!==o)a=this.options.getItemKey(e),s=o[2*e],i=o[2*e+1];else{let t=this.measurementsCache[e];if(!t)return;a=t.key,s=t.start,i=t.size}let l=t-(this.itemSizeCache.get(a)??i);if(0!==l){let o="end"===this.options.anchorTo&&(null==(n=this.scrollState)?void 0:n.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=o?this.getTotalSize():0,u=(null==(r=this.scrollState)?void 0:r.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:a,start:s,size:i,end:s+i,lane:0},l,this):s<this.getScrollOffset()+this.scrollAdjustments&&(!this.itemSizeCache.has(a)||"backward"!==this.scrollDirection));(null===this.pendingMin||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(a,t),this.itemSizeCacheVersion++,o?this.applyScrollAdjustment(this.getTotalSize()-c):u&&this.applyScrollAdjustment(l),this.notify(!1)}},this.getVirtualItems=a(()=>
1262[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;let n=this._flatMeasurements,r=1===this.options.lanes&&null!=n,i=y(0,t.length-1,r?e=>n[2*e]:e=>o(t[e]).start,e);return o(t[i])},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.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>
1262{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 s="end"===t?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,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,s]=r,a=this.now();this.scrollState={index:e,align:s,behavior:n,startedAt:a,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.scrollToEnd=({behavior:e="auto"}={})=>{if(this.options.count>0)return void this.scrollToIndex(this.options.count-1,{align:"end",behavior:e});this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{var e;let t,n=this.getMeasurements();if(0===n.length)t=this.options.paddingStart;else if(1===this.options.lanes){let r=n.length-1,i=this._flatMeasurements;t=null!=i?i[2*r]+i[2*r+1]:(null==(e=n[r])?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.takeSnapshot=()=>{let e=[];
1262if(0===this.itemSizeCache.size)return e;for(let t of this.getMeasurements())t&&this.itemSizeCache.has(t.key)&&e.push({index:t.index,key:t.key,start:t.start,size:t.size,end:t.end,lane:t.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){0!==e&&(l()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}))}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.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r="smooth"===this.scrollState.behavior&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior="auto"),this._scrollToOffset(t,{adjustments:void 0,behavior:r?"smooth":"auto"})}this.scheduleScrollReconcile()}}let y=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,s=n(i);if(s<r)e=i+1;else{if(!(s>r))return i;t=i-1}}return e>0?e-1:0},E="undefined"!=typeof document?i.useLayoutEffect:i.useEffect;function T(e){return function({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n="transform",...r}){let a=i.useReducer(e=>e+1,0)[1],o=i.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=t,o.current.mode=n;let l=e=>{let t=o.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?"width":"height";t.container.style[r]=`${n}px`}let r=!!e.options.horizontal,i="transform"===t.mode,s=r?"left":"top",a=e.options.scrollMargin;for(let n of e.getVirtualItems()){let o=n.start-a,l=e.elementsCache.get(n.key);l&&t.lastPositions.get(l)!==o&&(t.lastPositions.set(l,o),i?l.style.transform=r?`translate3d(${o}px, 0, 0)`:`translate3d(0, ${o}px, 0)`:l.style[s]=`${o}px`)}},c={...r,onChange:(t,n)=>{var i;let c=o.current,u=!0;if(c.enabled){l(t);let e=t.range,n=c.prevRange;(u=!n||n.isScrolling!==t.isScrolling||n.startIndex!==(null==e?void 0:e.startIndex)||n.endIndex!==(null==e?void 0:e.endIndex))&&(c.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}u&&(e&&n?(0,s.flushSync)(a):a()),null==(i=r.onChange)||i.call(r,t,n)}},[u]=i.useState(()=>{let e=new b(c);return Object.assign(e,{containerRef:t=>{let n=o.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?"width":"height";t.style[i]=`${r}px`}}})});return u.setOptions(c),E(()=>u._didMount(),[]),E(()=>u._willUpdate()),E(()=>{l(u)}),u}({observeElementRect:h,observeElementOffset:m,scrollToFn:v,...e})}},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:()=>o});var r=n(12115),i=n(47650),s=n(32467),a=n(95155),o=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>
1262{let n=(0,s.TL)(`Primitive.${t}`),i=r.forwardRef((e,r)=>{let{asChild:i,...s}=e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,a.jsx)(i?n:t,{...s,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:()=>c});var r=new WeakMap,i=new WeakMap,s={},a=0,o=function(e){return e&&(e.host||o(e.parentNode))},l=function(e,t,n,l){var c=(Array.isArray(e)?e:[e]).map(function(e){if(t.contains(e))return e;var n=o(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});s[n]||(s[n]=new WeakMap);var u=s[n],d=[],h=new Set,p=new Set(c),f=function(e){!e||h.has(e)||(h.add(e),f(e.parentNode))};c.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),s=null!==t&&"false"!==t,a=(r.get(e)||0)+1,o=(u.get(e)||0)+1;r.set(e,a),u.set(e,o),d.push(e),1===a&&s&&i.set(e,!0),1===o&&e.setAttribute(n,"true"),s||e.setAttribute(l,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(t),h.clear(),a++,function(){d.forEach(function(e){var t=r.get(e)-1,s=u.get(e)-1;r.set(e,t),u.set(e,s),t||(i.has(e)||e.removeAttribute(l),i.delete(e)),s||e.removeAttribute(n)}),--a||(r=new WeakMap,r=new WeakMap,i=new WeakMap,s={})}},c=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:()=>s,bz:()=>ex,YO:()=>ew,zM:()=>ek,au:()=>eP,gM:()=>eC,k5:()=>eD,eu:()=>eR,fc:()=>eL,ch:()=>eA,ai:()=>e_,Ik:()=>eI,vk:()=>eM,g1:()=>eO,Yj:()=>eT,KC:()=>eN,L5:()=>eS});var i,s,a=n(44193),o=n(88658);let l=(e,t)=>{let n;switch(e.code){case a.eq.invalid_type:n=e.received===o.Zp.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case a.eq.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,o.ZS.jsonStringifyReplacer)}`;break;case a.eq.unrecognized_keys:n=`Unrecognized key(s) in object: ${o.ZS.joinValues(e.keys,", ")}`;break;case a.eq.invalid_union:n="Invalid input";break;case a.eq.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${o.ZS.joinValues(e.options)}`;break;case a.eq.invalid_enum_value:n=`Invalid enum value. Expected ${o.ZS.joinValues(e.options)}, received '${e.received}'`;break;case a.eq.invalid_arguments:n="Invalid function arguments";break;case a.eq.invalid_return_type:n="Invalid function return type";break;case a.eq.invalid_date:n="Invalid date";break;case a.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}"`:o.ZS.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case a.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 a.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 a.eq.custom:n="Invalid input";break;
vendor: 7,184 bytes, line 1262
1262case a.eq.invalid_intersection_types:n="Intersection results could not be merged";break;case a.eq.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case a.eq.not_finite:n="Number must be finite";break;default:n=t.defaultError,o.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 c=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,s=[...n,...i.path||[]],a={...i,path:s};if(void 0!==i.message)return{...i,path:s,message:i.message};let o="";for(let e of r.filter(e=>!!e).slice().reverse())o=e(a,{data:t,defaultError:o}).message;return{...i,path:s,message:o}};function u(e,t){let n=c({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 a.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:s}=e;return"invalid_enum_value"===t.code?{message:s??i.defaultError}:void 0===i.data?{message:s??r??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:s??n??i.defaultError}},description:i}}class y{get description(){return this._def.description}_getType(e){return(0,o.CR)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,o.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,o.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,o.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,o.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,o.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),s=()=>r.addIssue({code:a.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||(s(),!1)):!!i||(s(),!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:s.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:s.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new em({...b(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:s.ZodDefault})}brand(){return new eb({typeName:s.ZodBranded,type:this,...b(this._def)})}catch(e){return new eg({...b(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:s.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,}
1262$/i,T=/^[0-9a-z]+$/,_=/^[0-9A-HJKMNP-TV-Z]{26}$/i,k=/^[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-_]*$/,S=/^[-+]?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)?)??$/,w=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,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])$/,N=/^(?:(?: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])$/,C=/^(([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])))",M=RegExp(`^${L}$`);function P(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,s;let l;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==o.Zp.string){let t=this._getOrReturnCtx(e);return u(t,{code:a.eq.invalid_type,expected:o.Zp.string,received:t.parsedType}),h}let c=new d;for(let d of this._def.checks)if("min"===d.kind)e.data.length<d.value&&(u(l=this._getOrReturnCtx(e,l),{code:a.eq.too_small,minimum:d.value,type:"string",inclusive:!0,exact:!1,message:d.message}),c.dirty());else if("max"===d.kind)e.data.length>d.value&&(u(l=this._getOrReturnCtx(e,l),{code:a.eq.too_big,maximum:d.value,type:"string",inclusive:!0,exact:!1,message:d.message}),c.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?u(l,{code:a.eq.too_big,maximum:d.value,type:"string",inclusive:!0,exact:!0,message:d.message}):n&&u(l,{code:a.eq.too_small,minimum:d.value,type:"string",inclusive:!0,exact:!0,message:d.message}),c.dirty())}else if("email"===d.kind)w.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{validation:"email",code:a.eq.invalid_string,message:d.message}),c.dirty());else if("emoji"===d.kind)r||(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{validation:"emoji",code:a.eq.invalid_string,message:d.message}),c.dirty());else if("uuid"===d.kind)k.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{validation:"uuid",code:a.eq.invali
vendor: 11,721 bytes, line 1262
1262d_string,message:d.message}),c.dirty());else if("nanoid"===d.kind)A.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{validation:"nanoid",code:a.eq.invalid_string,message:d.message}),c.dirty());else if("cuid"===d.kind)E.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{validation:"cuid",code:a.eq.invalid_string,message:d.message}),c.dirty());else if("cuid2"===d.kind)T.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{validation:"cuid2",code:a.eq.invalid_string,message:d.message}),c.dirty());else if("ulid"===d.kind)_.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{validation:"ulid",code:a.eq.invalid_string,message:d.message}),c.dirty());else if("url"===d.kind)try{new URL(e.data)}catch{u(l=this._getOrReturnCtx(e,l),{validation:"url",code:a.eq.invalid_string,message:d.message}),c.dirty()}else"regex"===d.kind?(d.regex.lastIndex=0,d.regex.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{validation:"regex",code:a.eq.invalid_string,message:d.message}),c.dirty())):"trim"===d.kind?e.data=e.data.trim():"includes"===d.kind?e.data.includes(d.value,d.position)||(u(l=this._getOrReturnCtx(e,l),{code:a.eq.invalid_string,validation:{includes:d.value,position:d.position},message:d.message}),c.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)||(u(l=this._getOrReturnCtx(e,l),{code:a.eq.invalid_string,validation:{startsWith:d.value},message:d.message}),c.dirty()):"endsWith"===d.kind?e.data.endsWith(d.value)||(u(l=this._getOrReturnCtx(e,l),{code:a.eq.invalid_string,validation:{endsWith:d.value},message:d.message}),c.dirty()):"datetime"===d.kind?(function(e){let t=`${L}T${P(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)||(u(l=this._getOrReturnCtx(e,l),{code:a.eq.invalid_string,validation:"datetime",message:d.message}),c.dirty()):"date"===d.kind?M.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{code:a.eq.invalid_string,validation:"date",message:d.message}),c.dirty()):"time"===d.kind?RegExp(`^${P(d)}$`).test(e.data)||(u(l=this._getOrReturnCtx(e,l),{code:a.eq.invalid_string,validation:"time",message:d.message}),c.dirty()):"duration"===d.kind?S.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{validation:"duration",code:a.eq.invalid_string,message:d.message}),c.dirty()):"ip"===d.kind?(t=e.data,!(("v4"===(n=d.version)||!n)&&I.test(t)||("v6"===n||!n)&&C.test(t))&&1&&(u(l=this._getOrReturnCtx(e,l),{validation:"ip",code:a.eq.invalid_string,message:d.message}),c.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)&&(u(l=this._getOrReturnCtx(e,l),{validation:"jwt",code:a.eq.invalid_string,message:d.message}),c.dirty()):"cidr"===d.kind?(i=e.data,!(("v4"===(s=d.version)||!s)&&N.test(i)||("v6"===s||!s)&&O.test(i))&&1&&(u(l=this._getOrReturnCtx(e,l),{validation:"cidr",code:a.eq.invalid_string,message:d.message}),c.dirty())):"base64"===d.kind?R.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{validation:"base64",code:a.eq.invalid_string,message:d.message}),c.dirty()):"base64url"===d.kind?D.test(e.data)||(u(l=this._getOrReturnCtx(e,l),{validation:"base64url",code:a.eq.invalid_string,message:d.message}),c.dirty()):o.ZS.assertNever(d);return{status:c.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:a.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:s.ZodString,coerce:e?.coerce??!1,...b(e)});class j 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)!==o.Zp.number){let t=this._getOrReturnCtx(e);return u(t,{code:a.eq.invalid_type,expected:o.Zp.number,received:t.parsedType}),h}let n=new d;for(let r of this._def.checks)"int"===r.kind?o.ZS.isInteger(e.data)||(u(t=this._getOrReturnCtx(e,t),{code:a.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)&&(u(t=this._getOrReturnCtx(e,t),{code:a.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)&&(u(t=this._getOrReturnCtx(e,t),{code:a.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)&&(u(t=this._getOrReturnCtx(e,t),{code:a.eq.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(u(t=this._getOrReturnCtx(e,t),{code:a.eq.not_finite,message:r.message}),n.dirty()):o.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 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]})}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&&o.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)}}j.create=e=>new j({checks:[],typeName:s.ZodNumber,coerce:e?.coerce||!1,...b(e)});class B 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)!==o.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)&&(u(t=this._getOrReturnCtx(e,t),{code:a.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)&&(u(t=this._getOrReturnCtx(e,t),{code:a.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)&&(u(t=this._getOrReturnCtx(e,t),{code:a.eq.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):o.ZS.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);
1262return u(t,{code:a.eq.invalid_type,expected:o.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 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]})}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}}B.create=e=>new B({checks:[],typeName:s.ZodBigInt,coerce:e?.coerce??!1,...b(e)});class U extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==o.Zp.boolean){let t=this._getOrReturnCtx(e);return u(t,{code:a.eq.invalid_type,expected:o.Zp.boolean,received:t.parsedType}),h}return f(e.data)}}U.create=e=>new U({typeName:s.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)!==o.Zp.date){let t=this._getOrReturnCtx(e);return u(t,{code:a.eq.invalid_type,expected:o.Zp.date,received:t.parsedType}),h}if(Number.isNaN(e.data.getTime()))return u(this._getOrReturnCtx(e),{code:a.eq.invalid_date}),h;let n=new d;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(u(t=this._getOrReturnCtx(e,t),{code:a.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&&(u(t=this._getOrReturnCtx(e,t),{code:a.eq.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):o.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:s.ZodDate,...b(e)});class $ extends y{_parse(e){if(this._getType(e)!==o.Zp.symbol){let t=this._getOrReturnCtx(e);return u(t,{code:a.eq.invalid_type,expected:o.Zp.symbol,received:t.parsedType}),h}return f(e.data)}}$.create=e=>new $({typeName:s.ZodSymbol,...b(e)});class G extends y{_parse(e){if(this._getType(e)!==o.Zp.undefined){let t=this._getOrReturnCtx(e);return u(t,{code:a.eq.invalid_type,expected:o.Zp.undefined,received:t.parsedType}),h}return f(e.data)}}G.create=e=>new G({typeName:s.ZodUndefined,...b(e)});class z extends y{_parse(e){if(this._getType(e)!==o.Zp.null){let t=this._getOrReturnCtx(e);return u(t,{code:a.eq.invalid_type,expected:o.Zp.null,received:t.parsedType}),h}return f(e.data)}}z.create=e=>new z({typeName:s.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:s.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:s.ZodUnknown,...b(e)});class W extends y{_parse(e){let t=this._getOrReturnCtx(e);
1262return u(t,{code:a.eq.invalid_type,expected:o.Zp.never,received:t.parsedType}),h}}W.create=e=>new W({typeName:s.ZodNever,...b(e)});class V extends y{_parse(e){if(this._getType(e)!==o.Zp.undefined){let t=this._getOrReturnCtx(e);return u(t,{code:a.eq.invalid_type,expected:o.Zp.void,received:t.parsedType}),h}return f(e.data)}}V.create=e=>new V({typeName:s.ZodVoid,...b(e)});class K extends y{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==o.Zp.array)return u(t,{code:a.eq.invalid_type,expected:o.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)&&(u(t,{code:e?a.eq.too_big:a.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&&(u(t,{code:a.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&&(u(t,{code:a.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:s.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=o.ZS.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==o.Zp.object){let t=this._getOrReturnCtx(e);return u(t,{code:a.eq.invalid_type,expected:o.Zp.object,received:t.parsedType}),h}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof W&&"strip"===this._def.unknownKeys))for(let e in n.data)i.includes(e)||s.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 W){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of s)l.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)s.length>0&&(u(n,{code:a.eq.unrecognized_keys,keys:s}),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 s){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:s.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 o.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 o.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 o.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 o.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(o.ZS.objectKeys(this.shape))}}Z.create=(e,t)=>
1262new Z({shape:()=>e,unknownKeys:"strip",catchall:W.create(),typeName:s.ZodObject,...b(t)}),Z.strictCreate=(e,t)=>new Z({shape:()=>e,unknownKeys:"strict",catchall:W.create(),typeName:s.ZodObject,...b(t)}),Z.lazycreate=(e,t)=>new Z({shape:e,unknownKeys:"strip",catchall:W.create(),typeName:s.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 a.G(e.ctx.common.issues));return u(t,{code:a.eq.invalid_union,unionErrors:n}),h});{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},s=i._parseSync({data:t.data,path:t.path,parent:n});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,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 a.G(e));return u(t,{code:a.eq.invalid_union,unionErrors:i}),h}}get options(){return this._def.options}}X.create=(e,t)=>new X({options:e,typeName:s.ZodUnion,...b(t)});let Q=e=>{if(e instanceof ea)return Q(e.schema);if(e instanceof eh)return Q(e.innerType());if(e instanceof eo)return[e.value];if(e instanceof ec)return e.options;if(e instanceof eu)return o.ZS.objectValues(e.enum);else if(e instanceof em)return Q(e._def.innerType);else if(e instanceof G)return[void 0];else if(e instanceof z)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!==o.Zp.object)return u(t,{code:a.eq.invalid_type,expected:o.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}):(u(t,{code:a.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:s.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,o.CR)(t),i=(0,o.CR)(n);if(t===n)return{valid:!0,data:t};if(r===o.Zp.object&&i===o.Zp.object){let r=o.ZS.objectKeys(n),i=o.ZS.objectKeys(t).filter(e=>-1!==r.indexOf(e)),s={...t,...n};for(let r of i){let i=e(t[r],n[r]);if(!i.valid)return{valid:!1};s[r]=i.data}return{valid:!0,data:s}}if(r===o.Zp.array&&i===o.Zp.array){if(t.length!==n.length)return{valid:!1};let r=[];for(let i=0;i<t.length;i++){let s=e(t[i],n[i]);if(!s.valid)return{valid:!1};r.push(s.data)}return{valid:!0,data:r}}if(r===o.Zp.date&&i===o.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}):(u(n,{code:a.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}))}}
1262ee.create=(e,t,n)=>new ee({left:e,right:t,typeName:s.ZodIntersection,...b(n)});class et extends y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==o.Zp.array)return u(n,{code:a.eq.invalid_type,expected:o.Zp.array,received:n.parsedType}),h;if(n.data.length<this._def.items.length)return u(n,{code:a.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&&(u(n,{code:a.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:s.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!==o.Zp.object)return u(n,{code:a.eq.invalid_type,expected:o.Zp.object,received:n.parsedType}),h;let r=[],i=this._def.keyType,s=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new g(n,e,n.path,e)),value:s._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:s.ZodRecord,...b(n)}:{keyType:F.create(),valueType:e,typeName:s.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!==o.Zp.map)return u(n,{code:a.eq.invalid_type,expected:o.Zp.map,received:n.parsedType}),h;let r=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([e,t],s)=>({key:r._parse(new g(n,e,n.path,[s,"key"])),value:i._parse(new g(n,t,n.path,[s,"value"]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of s){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 s){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:s.ZodMap,...b(n)});class ei extends y{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==o.Zp.set)return u(n,{code:a.eq.invalid_type,expected:o.Zp.set,received:n.parsedType}),h;let r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(u(n,{code:a.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&&(u(n,{code:a.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 s(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=>s(e)):s(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:s.ZodSet,...b(t)});class es extends y{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);
1262if(t.parsedType!==o.Zp.function)return u(t,{code:a.eq.invalid_type,expected:o.Zp.function,received:t.parsedType}),h;function n(e,n){return c({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l,l].filter(e=>!!e),issueData:{code:a.eq.invalid_arguments,argumentsError:n}})}function r(e,n){return c({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l,l].filter(e=>!!e),issueData:{code:a.eq.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof ed){let e=this;return f(async function(...t){let o=new a.G([]),l=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(s,this,l);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return f(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new a.G([n(t,o.error)]);let l=Reflect.apply(s,this,o.data),c=e._def.returns.safeParse(l,i);if(!c.success)throw new a.G([r(l,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new es({...this._def,args:et.create(e).rest(q.create())})}returns(e){return new es({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new es({args:e||et.create([]).rest(q.create()),returns:t||q.create(),typeName:s.ZodFunction,...b(n)})}}class ea 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})}}ea.create=(e,t)=>new ea({getter:e,typeName:s.ZodLazy,...b(t)});class eo extends y{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return u(t,{received:t.data,code:a.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 ec({values:e,typeName:s.ZodEnum,...b(t)})}eo.create=(e,t)=>new eo({value:e,typeName:s.ZodLiteral,...b(t)});class ec extends y{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),n=this._def.values;return u(t,{expected:o.ZS.joinValues(n),received:t.parsedType,code:a.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 u(t,{received:t.data,code:a.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 ec.create(e,{...this._def,...t})}exclude(e,t=this._def){return ec.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ec.create=el;class eu extends y{_parse(e){let t=o.ZS.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==o.Zp.string&&n.parsedType!==o.Zp.number){let e=o.ZS.objectValues(t);return u(n,{expected:o.ZS.joinValues(e),received:n.parsedType,code:a.eq.invalid_type}),h}if(this._cache||(this._cache=new Set(o.ZS.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=o.ZS.objectValues(t);return u(n,{received:n.data,code:a.eq.invalid_enum_value,options:e}),h}return f(e.data)}get enum(){return this._def.values}}eu.create=(e,t)=>new eu({values:e,typeName:s.ZodNativeEnum,...b(t)});class ed extends y{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==o.Zp.promise&&!1===t.common.async?(u(t,{code:a.eq.invalid_type,expected:o.Zp.promise,received:t.parsedType}),h):f((t.parsedType===o.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:s.ZodPromise,...b(t)});class eh extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===s.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=>{u(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 s=r.transform(e.value,i);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}o.ZS.assertNever(r)}}
1262eh.create=(e,t,n)=>new eh({schema:e,typeName:s.ZodEffects,effect:t,...b(n)}),eh.createWithPreprocess=(e,t,n)=>new eh({schema:t,effect:{type:"preprocess",transform:e},typeName:s.ZodEffects,...b(n)});class ep extends y{_parse(e){return this._getType(e)===o.Zp.undefined?f(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ep.create=(e,t)=>new ep({innerType:e,typeName:s.ZodOptional,...b(t)});class ef extends y{_parse(e){return this._getType(e)===o.Zp.null?f(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ef.create=(e,t)=>new ef({innerType:e,typeName:s.ZodNullable,...b(t)});class em extends y{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===o.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:s.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 a.G(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new a.G(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}eg.create=(e,t)=>new eg({innerType:e,typeName:s.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...b(t)});class ev extends y{_parse(e){if(this._getType(e)!==o.Zp.nan){let t=this._getOrReturnCtx(e);return u(t,{code:a.eq.invalid_type,expected:o.Zp.nan,received:t.parsedType}),h}return{status:"valid",value:e.data}}}ev.create=e=>new ev({typeName:s.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:s.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:s.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"}(s||(s={}));let eT=F.create,e_=j.create;ev.create,B.create;let ek=U.create;H.create,$.create,G.create;let eA=z.create,ex=Y.create,eS=q.create;W.create,V.create;let ew=K.create,eI=Z.create;Z.strictCreate;let eN=X.create,eC=J.create;ee.create,et.create;let eO=en.create;er.create,ei.create,es.create,ea.create;let eR=eo.create,eD=ec.create,eL=eu.create;
1262ed.create,eh.create,ep.create,ef.create;let eM=eh.createWithPreprocess;ey.create;let eP={string:e=>F.create({...e,coerce:!0}),number:e=>j.create({...e,coerce:!0}),boolean:e=>U.create({...e,coerce:!0}),bigint:e=>B.create({...e,coerce:!0}),date:e=>H.create({...e,coerce:!0})}},99455:(e,t,n)=>{n.d(t,{l:()=>s});var r=n(60488),i=n(39097);function s(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.