agenttwin 0.3.9 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +9 -3
  2. package/dist/cli.js +263 -71
  3. package/dist/dashboard/assets/next/static/{xDiek0iCt0gykeKT7O5aO → 8DWbcYS099IMf1RzFG63k}/_buildManifest.js +1 -1
  4. package/dist/dashboard/assets/next/static/chunks/1255-b815b974120825e7.js +1 -0
  5. package/dist/dashboard/assets/next/static/chunks/1848-a6938ad74a8e409f.js +1 -0
  6. package/dist/dashboard/assets/next/static/chunks/3050-a8f395e3fe36d7b9.js +1 -0
  7. package/dist/dashboard/assets/next/static/chunks/4055.1056568a41510e92.js +1 -0
  8. package/dist/dashboard/assets/next/static/chunks/4343.023a18f52318dbad.js +1 -0
  9. package/dist/dashboard/assets/next/static/chunks/4542.0327d0da1c3ea200.js +1 -0
  10. package/dist/dashboard/assets/next/static/chunks/4bd1b696-f785427dddbba9fb.js +1 -0
  11. package/dist/dashboard/assets/next/static/chunks/6751.613adb085c9a5b06.js +1 -0
  12. package/dist/dashboard/assets/next/static/chunks/6787-6a8909259d0ac26c.js +1 -0
  13. package/dist/dashboard/assets/next/static/chunks/{772-85561381eedc95da.js → 7772-425e96278b46f6c9.js} +1 -1
  14. package/dist/dashboard/assets/next/static/chunks/8975.5be81ec8b09e3b45.js +1 -0
  15. package/dist/dashboard/assets/next/static/chunks/9013.0f2be1cc70029afa.js +10 -0
  16. package/dist/dashboard/assets/next/static/chunks/app/_not-found/page-43db8aef3fa81958.js +1 -0
  17. package/dist/dashboard/assets/next/static/chunks/app/account/password/page-c2ce3c796c817ca1.js +1 -0
  18. package/dist/dashboard/assets/next/static/chunks/app/dashboard/layout-28ee3093f86fc075.js +1 -0
  19. package/dist/dashboard/assets/next/static/chunks/app/dashboard/page-91a2efe02bd25700.js +1 -0
  20. package/dist/dashboard/assets/next/static/chunks/app/demo/page-4dc63755e0013e7c.js +1 -0
  21. package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-db473994608d5c77.js +1 -0
  22. package/dist/dashboard/assets/next/static/chunks/app/enterprise/page-9a33a4aec43377e0.js +1 -0
  23. package/dist/dashboard/assets/next/static/chunks/app/layout-dd5d4772c11d4cbb.js +1 -0
  24. package/dist/dashboard/assets/next/static/chunks/app/login/page-d6d4276397724d29.js +1 -0
  25. package/dist/dashboard/assets/next/static/chunks/app/onboarding/page-1b066c493c248f29.js +1 -0
  26. package/dist/dashboard/assets/next/static/chunks/app/page-950c663fd42544c0.js +1 -0
  27. package/dist/dashboard/assets/next/static/chunks/app/pricing/page-757fd3f59cd253fb.js +1 -0
  28. package/dist/dashboard/assets/next/static/chunks/app/signup/page-d6d4276397724d29.js +1 -0
  29. package/dist/dashboard/assets/next/static/chunks/app/sitemap.xml/route-83b9d0f0ad5575d4.js +1 -0
  30. package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/layout-a5cf565e017886d3.js +1 -0
  31. package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/page-eb63255bc8df6433.js +1 -0
  32. package/dist/dashboard/assets/next/static/chunks/app/v2/layout-abbd9f3b8811f559.js +1 -0
  33. package/dist/dashboard/assets/next/static/chunks/app/v2/login/page-4f4a342a4c28f9de.js +1 -0
  34. package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/page-f04c0b236abaead3.js +1 -0
  35. package/dist/dashboard/assets/next/static/chunks/app/v2/page-cf8af0afd0589c71.js +1 -0
  36. package/dist/dashboard/assets/next/static/chunks/app/v2/signup/page-4f4a342a4c28f9de.js +1 -0
  37. package/dist/dashboard/assets/next/static/chunks/framework-e54b663a2888b5de.js +1 -0
  38. package/dist/dashboard/assets/next/static/chunks/main-app-1ec13ceef4a34729.js +1 -0
  39. package/dist/dashboard/assets/next/static/chunks/main-d1fa84e2f669be1c.js +1 -0
  40. package/dist/dashboard/assets/next/static/chunks/pages/{_app-7d307437aca18ad4.js → _app-6c8c2371b16a04b8.js} +1 -1
  41. package/dist/dashboard/assets/next/static/chunks/pages/_error-94812ad32cad7365.js +1 -0
  42. package/dist/dashboard/assets/next/static/chunks/webpack-60f6502c44ed95af.js +1 -0
  43. package/dist/dashboard/assets/next/static/css/448fc71b62e29403.css +1 -0
  44. package/dist/dashboard/index.html +2 -2
  45. package/package.json +1 -1
  46. package/dist/dashboard/assets/next/static/chunks/255-09fb0d129bb12f51.js +0 -1
  47. package/dist/dashboard/assets/next/static/chunks/4bd1b696-c023c6e3521b1417.js +0 -1
  48. package/dist/dashboard/assets/next/static/chunks/787-2d5f834d2374e355.js +0 -1
  49. package/dist/dashboard/assets/next/static/chunks/848-000d4eb3e2f5358f.js +0 -1
  50. package/dist/dashboard/assets/next/static/chunks/app/_not-found/page-95856eb81db7799b.js +0 -1
  51. package/dist/dashboard/assets/next/static/chunks/app/account/password/page-ff06be670b822cfe.js +0 -1
  52. package/dist/dashboard/assets/next/static/chunks/app/dashboard/layout-64afdd8a8798e3b6.js +0 -1
  53. package/dist/dashboard/assets/next/static/chunks/app/dashboard/page-762d3d9f26e6c774.js +0 -1
  54. package/dist/dashboard/assets/next/static/chunks/app/demo/page-8a71f24127eb1e63.js +0 -1
  55. package/dist/dashboard/assets/next/static/chunks/app/docs/[[...slug]]/page-4edbabcdd90d97e8.js +0 -1
  56. package/dist/dashboard/assets/next/static/chunks/app/enterprise/page-018bb6762d3d7df4.js +0 -1
  57. package/dist/dashboard/assets/next/static/chunks/app/layout-9da6df58ef40be60.js +0 -1
  58. package/dist/dashboard/assets/next/static/chunks/app/login/page-caa5c579f14ec911.js +0 -1
  59. package/dist/dashboard/assets/next/static/chunks/app/onboarding/page-39cdf1f2e2ba688f.js +0 -1
  60. package/dist/dashboard/assets/next/static/chunks/app/page-02aaf1666f32d5c1.js +0 -1
  61. package/dist/dashboard/assets/next/static/chunks/app/pricing/page-f6fb7e78443d1220.js +0 -1
  62. package/dist/dashboard/assets/next/static/chunks/app/signup/page-caa5c579f14ec911.js +0 -1
  63. package/dist/dashboard/assets/next/static/chunks/app/sitemap.xml/route-ef5a216a578eb7a8.js +0 -1
  64. package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/layout-2936df21408f38fd.js +0 -1
  65. package/dist/dashboard/assets/next/static/chunks/app/v2/dashboard/page-d23686e9489aa12d.js +0 -1
  66. package/dist/dashboard/assets/next/static/chunks/app/v2/layout-dc60420b4d88dd63.js +0 -1
  67. package/dist/dashboard/assets/next/static/chunks/app/v2/login/page-d3a27a2684498e13.js +0 -1
  68. package/dist/dashboard/assets/next/static/chunks/app/v2/onboarding/page-b48a6cab88bb7f78.js +0 -1
  69. package/dist/dashboard/assets/next/static/chunks/app/v2/page-c8aaddcc7111e5e3.js +0 -1
  70. package/dist/dashboard/assets/next/static/chunks/app/v2/signup/page-d3a27a2684498e13.js +0 -1
  71. package/dist/dashboard/assets/next/static/chunks/framework-292291387d6b2e39.js +0 -1
  72. package/dist/dashboard/assets/next/static/chunks/main-aea6e71289384293.js +0 -1
  73. package/dist/dashboard/assets/next/static/chunks/main-app-def27ec5d496405f.js +0 -1
  74. package/dist/dashboard/assets/next/static/chunks/pages/_error-cb2a52f75f2162e2.js +0 -1
  75. package/dist/dashboard/assets/next/static/chunks/webpack-7acd0493fe574225.js +0 -1
  76. package/dist/dashboard/assets/next/static/css/556c40e9d291ee02.css +0 -1
  77. /package/dist/dashboard/assets/next/static/{xDiek0iCt0gykeKT7O5aO → 8DWbcYS099IMf1RzFG63k}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6787],{709:()=>{},1261:()=>{},6787:(e,t,n)=>{"use strict";n.d(t,{n:()=>u,default:()=>c});var i=n(5155),a=n(2115);function o(e){var t;let{api:n,signup:o,onboarding:s,pending:r,setPending:l,setError:u}=e,[c,d]=(0,a.useState)([]),[p,h]=(0,a.useState)([]),[f,g]=(0,a.useState)("loading"),[m,x]=(0,a.useState)(0),[b,v]=(0,a.useState)(null),[y,w]=(0,a.useState)(null);async function _(e,t){if(!r){if("google"===e&&!c.includes("google")&&y)return void location.assign(y);u(""),l(!0);try{let i=await fetch(n+"/v1/auth/oauth/"+e+"/start",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({signup:o,onboarding:s,..."sso"===e&&t?{realm:t}:{}}),signal:AbortSignal.timeout(2e4)}),a=await i.json();if(!i.ok)throw Error([401,404].includes(i.status)?"This sign-in provider is not available yet. Continue with email.":a.error||"Could not start sign-in. Please try again.");let r=new URL(a.url);if("https:"!==r.protocol&&!("http:"===r.protocol&&["localhost","127.0.0.1"].includes(r.hostname)))throw Error("The sign-in provider returned an invalid address.");location.assign(r.href)}catch(e){u(e instanceof TypeError?"Could not connect to AgentTwin. Please try again.":e instanceof Error?e.message:"Could not start sign-in."),l(!1)}}}(0,a.useEffect)(()=>{let e=new AbortController;g("loading"),w(["localhost","127.0.0.1"].includes(location.hostname)&&/^http:\/\/(localhost|127\.0\.0\.1):[0-9]+$/.test(n)?"https://agenttwin.si/".concat(o?"signup":"login","/").concat(s?"?next=onboarding":""):null),d([]),h([]),v(["localhost","127.0.0.1"].includes(location.hostname)&&"https://api.agenttwin.si"===n?"https://agenttwin.si/".concat(o?"signup":"login","/").concat(s?"?next=onboarding":""):null);let t=!0,i=setTimeout(()=>e.abort(),1e4);return fetch(n+"/v1/auth/providers",{signal:e.signal,cache:"no-store"}).then(async t=>{if(!t.ok)throw Error("provider_status_unavailable");let n=await t.json();if(!Array.isArray(null==n?void 0:n.providers))throw Error("invalid_provider_status");e.signal.aborted||(d(n.providers.filter(e=>!0===e.enabled).map(e=>e.id)),h(Array.isArray(n.ssoRealms)?n.ssoRealms.filter(e=>"string"==typeof(null==e?void 0:e.id)&&e.id&&"string"==typeof(null==e?void 0:e.organization)).map(e=>({id:e.id,organization:e.organization})):[]),g("ready"))}).catch(()=>{t&&g("error")}).finally(()=>clearTimeout(i)),()=>{t=!1,clearTimeout(i),e.abort()}},[n,o,s,m]);let k="loading"===f?"Checking availability…":"error"===f?"Sign-in service could not be reached.":"Not configured. Continue with email.",j=(0,i.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6","aria-hidden":"true",children:[(0,i.jsx)("rect",{x:"5",y:"10",width:"14",height:"11",rx:"2"}),(0,i.jsx)("path",{d:"M8 10V7a4 4 0 0 1 8 0v3M12 14v3"})]});return(0,i.jsxs)("div",{className:"auth-providers","aria-label":"Other sign-in options","aria-busy":r||"loading"===f,children:["loading"===f&&(0,i.jsx)("p",{className:"auth-provider-note",role:"status",children:"Checking sign-in options…"}),"error"===f&&(0,i.jsx)("p",{className:"auth-provider-note",role:"status",children:b?(0,i.jsxs)(i.Fragment,{children:["This local preview cannot connect to production sign-in. ",(0,i.jsx)("a",{href:b,children:"Continue on agenttwin.si ↗"})]}):(0,i.jsxs)(i.Fragment,{children:["Could not load sign-in options. ",(0,i.jsx)("button",{type:"button",className:"auth-text-button",onClick:()=>x(e=>e+1),children:"Try again"})]})}),"ready"===f&&0===c.length&&!y&&(0,i.jsx)("p",{className:"auth-provider-note",children:"Use email to continue. Other sign-in providers are not configured."}),(0,i.jsxs)("button",{type:"button",className:"auth-provider",onClick:()=>_("google"),disabled:r||!c.includes("google")&&!y,title:y&&!c.includes("google")?"Continue on agenttwin.si":c.includes("google")?void 0:k,children:[(0,i.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,i.jsx)("path",{fill:"#4285F4",d:"M21.6 12.23c0-.71-.06-1.39-.18-2.05H12v3.88h5.38a4.6 4.6 0 0 1-2 3.02v2.51h3.24c1.9-1.75 2.98-4.33 2.98-7.36Z"}),(0,i.jsx)("path",{fill:"#34A853",d:"M12 22c2.7 0 4.97-.9 6.63-2.42l-3.24-2.5c-.9.6-2.06.96-3.39.96-2.6 0-4.81-1.76-5.6-4.12H3.05v2.6A10 10 0 0 0 12 22Z"}),(0,i.jsx)("path",{fill:"#FBBC05",d:"M6.4 13.92a6 6 0 0 1 0-3.84v-2.6H3.05a10 10 0 0 0 0 9.04l3.35-2.6Z"}),(0,i.jsx)("path",{fill:"#EA4335",d:"M12 5.96c1.47 0 2.79.5 3.83 1.51l2.87-2.87A9.6 9.6 0 0 0 12 2a10 10 0 0 0-8.95 5.48l3.35 2.6C7.19 7.72 9.4 5.96 12 5.96Z"})]}),"Continue with Google",y&&!c.includes("google")&&(0,i.jsx)("span",{"aria-hidden":"true",children:"↗"})]}),y&&!c.includes("google")&&(0,i.jsx)("p",{className:"auth-provider-note",children:"Google sign-in opens agenttwin.si. Your local workspace stays separate."}),(0,i.jsxs)("button",{type:"button",className:"auth-provider",onClick:()=>_("github"),disabled:r||!c.includes("github"),title:c.includes("github")?void 0:k,children:[(0,i.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M12 .9a11.1 11.1 0 0 0-3.51 21.63c.55.1.76-.24.76-.54v-2.07c-3.09.67-3.74-1.32-3.74-1.32-.5-1.28-1.24-1.62-1.24-1.62-1.02-.7.08-.68.08-.68 1.13.08 1.72 1.16 1.72 1.16 1 1.71 2.6 1.22 3.23.93.1-.73.4-1.22.71-1.5-2.46-.28-5.05-1.23-5.05-5.49 0-1.21.43-2.2 1.14-2.97-.11-.28-.5-1.41.11-2.94 0 0 .93-.3 3.05 1.14a10.6 10.6 0 0 1 5.55 0c2.12-1.44 3.05-1.14 3.05-1.14.61 1.53.22 2.66.11 2.94.71.77 1.14 1.76 1.14 2.97 0 4.27-2.6 5.21-5.08 5.48.4.35.75 1.02.75 2.06v3.05c0 .3.2.64.77.53A11.1 11.1 0 0 0 12 .9Z"})}),"Continue with GitHub"]}),p.length>1?p.map(e=>(0,i.jsxs)("button",{type:"button",className:"auth-provider",onClick:()=>_("sso",e.id),disabled:r||!c.includes("sso"),title:c.includes("sso")?void 0:k,children:[j,"Continue with ",e.organization||e.id," sign-in"]},e.id)):(0,i.jsxs)("button",{type:"button",className:"auth-provider",onClick:()=>{var e;return _("sso",null==(e=p[0])?void 0:e.id)},disabled:r||!c.includes("sso"),title:c.includes("sso")?void 0:k,children:[j,"Continue with ",(null==(t=p[0])?void 0:t.organization)?p[0].organization+" ":"","SSO"]})]})}let s={check:"M5.5 12.5l4 4L18.5 8",alert:"M12 8v4.5M12 16h.01M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"};function r(e){let{length:t=6,separator:n=!1,numeric:o=!0,value:r,defaultValue:u="",onChange:c,onComplete:d,status:p="idle",errorMessage:h="That code didn't work. Try again.",clearOnError:f=!0,successLabel:g="Verified",onResend:m,resendIn:x=30,align:b="start",disabled:v=!1,autoFocus:y=!1,label:w="Verification code",className:_}=e,k=e=>{let n="";for(let i of e){let e=o?/[0-9]/.test(i)?i:"":/[a-z0-9]/i.test(i)?i.toUpperCase():"";e&&n.length<t&&(n+=e)}return n},[j,C]=(0,a.useState)(()=>k(u)),N=k(null!=r?r:j),[S,T]=(0,a.useState)(Math.min(N.length,t-1)),[E,A]=(0,a.useState)(!1),[z,R]=(0,a.useState)(!1),[M,L]=(0,a.useState)(!1),[P,O]=(0,a.useState)(!1),[B,U]=(0,a.useState)(x),[D,F]=(0,a.useState)(""),I=(0,a.useRef)(null),X=(0,a.useRef)(null),V=(0,a.useRef)(null),q=(0,a.useRef)(null),H=(0,a.useRef)(null),W=(0,a.useRef)([]),Y=(0,a.useRef)([]),G=(0,a.useId)(),K=(0,a.useRef)(N),Z=(0,a.useRef)([]),J=(0,a.useRef)([]),$=(0,a.useRef)(0);if(K.current!==N){let e=K.current,t=[...N].map((t,n)=>t!==e[n]),n=t.indexOf(!0),i=t.filter(Boolean).length>1;t.forEach((e,t)=>{e&&(Z.current[t]=++$.current,J.current[t]=i?(t-n)*45:0)}),K.current=N}let Q=Math.min(S,N.length,t-1),ee=!0===n?Math.floor(t/2):"number"==typeof n?n:0,et="verifying"===p||"success"===p,en=et||P||v,ei="error"===p&&z,ea=!et&&!v&&(E||N.length>0&&N.length<t),eo=function(e,n){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];void 0===r&&C(e),e!==N&&(null==c||c(e)),T(Math.max(0,Math.min(n,e.length,t-1))),i&&(z&&e.length&&R(!1),e.length===t&&e!==N&&(null==d||d(e)))},es=()=>{let e=I.current;if(!e||document.activeElement!==e)return;let n=Math.min(S,N.length,t-1);n<N.length?e.setSelectionRange(n,n+1):e.setSelectionRange(n,n)};(0,a.useLayoutEffect)(es),(0,a.useEffect)(()=>{var e;y&&(null==(e=I.current)||e.focus({preventScroll:!0}))},[y]),(0,a.useLayoutEffect)(()=>{let e=V.current,t=W.current[Q];if(e&&t){let n=!e.dataset.ready;n&&(e.style.transition="none"),e.style.width="".concat(t.offsetWidth,"px"),e.style.height="".concat(t.offsetHeight,"px"),e.style.transform="translate(".concat(t.offsetLeft,"px, ").concat(t.offsetTop,"px)"),n&&(e.dataset.ready="1",e.offsetWidth,e.style.transition="")}let n=q.current,i=X.current;n&&i&&H.current&&(n.style.width="".concat("success"===p?H.current.offsetWidth:i.offsetWidth,"px"))}),(0,a.useEffect)(()=>{let e=X.current;if(!e)return;let t=new ResizeObserver(()=>{let t=V.current,n=W.current[Q];t&&n&&(t.style.width="".concat(n.offsetWidth,"px"),t.style.height="".concat(n.offsetHeight,"px"),t.style.transform="translate(".concat(n.offsetLeft,"px, ").concat(n.offsetTop,"px)")),q.current&&"success"!==p&&(q.current.style.width="".concat(e.offsetWidth,"px"))});return t.observe(e),()=>t.disconnect()},[Q,p]);let er=(0,a.useRef)(p);(0,a.useEffect)(()=>{let e=er.current;if(er.current=p,p!==e){if("verifying"===p&&F("Verifying code"),"success"===p&&F(g),"error"!==p)return void R(!1);if(R(!0),F("string"==typeof h?h:"That code didn't work"),!window.matchMedia("(prefers-reduced-motion: reduce)").matches){var t;null==(t=X.current)||t.animate([{transform:"none"},{transform:"translateX(-6px)"},{transform:"translateX(5px)"},{transform:"translateX(-3px)"},{transform:"translateX(2px)"},{transform:"none"}],{duration:420,easing:"ease-out"})}f&&(O(!0),Y.current.push(window.setTimeout(()=>L(!0),700),window.setTimeout(()=>{L(!1),O(!1),eo("",0,!1)},980)))}},[p]),(0,a.useEffect)(()=>()=>Y.current.forEach(clearTimeout),[]),(0,a.useEffect)(()=>{if(B<=0){m&&x>0&&F("You can resend the code now");return}let e=window.setTimeout(()=>U(e=>e-1),1e3);return()=>clearTimeout(e)},[B]);let el=[];for(let e=0;e<t;e++){var eu;ee>0&&ee<t&&e===ee&&el.push((0,i.jsx)("span",{className:"ui-otp__sep"},"sep"));let n=N[e];el.push((0,i.jsx)("span",{ref:t=>{W.current[e]=t},className:"ui-otp__box","data-filled":n?"":void 0,style:{"--i":e},children:n&&(0,i.jsx)("span",{className:"ui-otp__char",style:{animationDelay:"".concat(null!=(eu=J.current[e])?eu:0,"ms")},children:n},Z.current[e])},e))}return(0,i.jsxs)("div",{className:["ui-otp",_].filter(Boolean).join(" "),"data-status":p,"data-error":ei||void 0,"data-align":b,"data-disabled":v||void 0,children:[(0,i.jsx)("style",{href:"ui-otp-input",precedence:"default",children:l}),(0,i.jsx)("div",{className:"ui-otp__field",children:(0,i.jsxs)("div",{ref:X,className:"ui-otp__slots","data-clearing":M||void 0,style:{"--n":t,"--sep-w":ee>0&&ee<t?"calc(var(--ui-otp-gap) + 10px)":"0px"},children:[el,(0,i.jsx)("span",{ref:V,className:"ui-otp__ring","data-show":ea||void 0,"aria-hidden":"true",children:(0,i.jsx)("span",{className:"ui-otp__caret","data-show":E&&!N[Q]&&!en||void 0})}),(0,i.jsx)("span",{ref:q,className:"ui-otp__pill","aria-hidden":"true",children:(0,i.jsxs)("span",{ref:H,className:"ui-otp__pill-inner",children:[(0,i.jsx)("svg",{viewBox:"0 0 24 24",className:"ui-otp__check","aria-hidden":"true",children:(0,i.jsx)("path",{d:s.check,pathLength:1})}),g]})}),(0,i.jsx)("input",{ref:I,className:"ui-otp__input",type:"text",value:N,inputMode:o?"numeric":"text",pattern:o?"[0-9]*":void 0,autoComplete:"one-time-code",autoCapitalize:o?"off":"characters",autoCorrect:"off",spellCheck:!1,enterKeyHint:"done","aria-label":"".concat(w,", ").concat(t," ").concat(o?"digits":"characters"),"aria-invalid":ei||void 0,"aria-describedby":ei?"".concat(G,"-msg"):void 0,disabled:v,readOnly:et||P,onChange:e=>(e=>{var t;if(en)return;let n=e.value,i=null!=(t=e.selectionStart)?t:n.length,a=k(n),o=k(n.slice(0,i)).length;if(a===N){e.value=N,es();return}eo(a,o)})(e.currentTarget),onPaste:e=>{if(e.preventDefault(),en)return;let n=k(e.clipboardData.getData("text"));if(n){if(n.length>=t)return eo(n.slice(0,t),t-1);eo((N.slice(0,Q)+n+N.slice(Q+n.length)).slice(0,t),Q+n.length)}},onKeyDown:e=>{let n=Math.min(N.length,t-1),i={ArrowLeft:Q-1,ArrowRight:Q+1,Home:0,End:n,ArrowUp:0,ArrowDown:n};e.key in i&&!e.shiftKey&&!e.metaKey&&(e.preventDefault(),T(Math.max(0,Math.min(i[e.key],n))))},onFocus:()=>{A(!0),requestAnimationFrame(es)},onBlur:()=>A(!1),onPointerUp:e=>{var n;let i;return n=e.clientX,void((i=W.current.findIndex(e=>e&&n<e.getBoundingClientRect().right+4))<0&&(i=t-1),T(Math.min(i,N.length,t-1)),requestAnimationFrame(es))},onSelect:e=>{let t=e.currentTarget,n=Q<N.length?[Q,Q+1]:[Q,Q];(t.selectionStart!==n[0]||t.selectionEnd!==n[1])&&es()}})]})}),(0,i.jsx)("div",{className:"ui-otp__msg","data-show":ei||void 0,children:(0,i.jsx)("div",{className:"ui-otp__msg-inner",children:(0,i.jsxs)("p",{id:"".concat(G,"-msg"),className:"ui-otp__msg-text",children:[(0,i.jsx)("svg",{viewBox:"0 0 24 24",className:"ui-otp__alert","aria-hidden":"true",children:(0,i.jsx)("path",{d:s.alert})}),(0,i.jsx)("span",{children:h})]})})}),m&&(0,i.jsxs)("div",{className:"ui-otp__resend","data-hidden":"success"===p||void 0,children:[(0,i.jsx)("span",{className:"ui-otp__resend-q",children:"Didn't get a code?"})," ",B>0?(0,i.jsxs)("span",{className:"ui-otp__swap ui-otp__wait",children:["Resend in","\xa0",(0,i.jsx)("span",{className:"ui-otp__time",children:"".concat(Math.floor(B/60),":").concat(String(B%60).padStart(2,"0"))})]},"wait"):(0,i.jsx)("button",{type:"button",className:"ui-otp__swap ui-otp__resend-btn",onClick:()=>{null==m||m(),U(x),F("A new code is on its way")},disabled:v||et,children:"Resend code"},"go")]}),(0,i.jsx)("span",{className:"ui-otp__live","aria-live":"polite",children:D})]})}let l='\n/* Colors, size and motion as variables – override them on .ui-otp */\n.ui-otp {\n --ui-otp-box: 48px;\n --ui-otp-gap: 8px;\n --ui-otp-bg: #fafafa;\n --ui-otp-card: #ffffff;\n --ui-otp-line: #e4e4e7;\n --ui-otp-line-strong: #cfcfd4;\n --ui-otp-ink: #171717;\n --ui-otp-text: #404040;\n --ui-otp-muted: #8f8f8f;\n --ui-otp-faint: #c4c4c8;\n --ui-otp-halo: rgba(23, 23, 23, 0.07);\n --ui-otp-wait: #f2f2f3;\n --ui-otp-shine: rgba(255, 255, 255, 0.95);\n --ui-otp-danger: #e5484d;\n --ui-otp-danger-line: rgba(229, 72, 77, 0.6);\n --ui-otp-danger-halo: rgba(229, 72, 77, 0.12);\n --ui-otp-success: #2f9e5b;\n --ui-otp-accent: #2f6bff;\n --ui-otp-focus: rgba(23, 23, 23, 0.22);\n --ui-otp-ease: cubic-bezier(0.22, 1, 0.36, 1);\n box-sizing: border-box;\n container-type: inline-size;\n display: grid;\n justify-self: stretch; /* it sizes the boxes from its own width, so it must never shrink to fit them */\n width: 100%;\n font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;\n font-size: 13.5px;\n line-height: 1.45;\n color: var(--ui-otp-text);\n -webkit-font-smoothing: antialiased;\n}\n.ui-otp *, .ui-otp *::before, .ui-otp *::after { box-sizing: border-box; }\n.ui-otp[data-align="center"] { justify-items: center; text-align: center; }\n.ui-otp[data-disabled] { opacity: 0.55; }\n\n.ui-otp__field { display: flex; min-width: 0; }\n.ui-otp[data-align="center"] .ui-otp__field { justify-content: center; }\n\n/* The boxes scale down to fit their container (phones at 320px), up to --ui-otp-box */\n.ui-otp__slots {\n --size: min(var(--ui-otp-box), calc((100cqi - (var(--n) - 1) * var(--ui-otp-gap) - var(--sep-w)) / var(--n)));\n position: relative;\n display: flex;\n align-items: center;\n gap: var(--ui-otp-gap);\n}\n.ui-otp__box {\n position: relative;\n display: grid;\n place-items: center;\n flex: none;\n width: var(--size);\n height: calc(var(--size) * 1.18);\n overflow: hidden;\n border-radius: calc(var(--size) * 0.24);\n background: var(--ui-otp-bg);\n box-shadow: inset 0 0 0 1px var(--ui-otp-line);\n font-size: calc(var(--size) * 0.46);\n font-weight: 500;\n font-variant-numeric: tabular-nums;\n color: var(--ui-otp-ink);\n transition: box-shadow 220ms ease, background-color 220ms ease, transform 380ms var(--ui-otp-ease), opacity 260ms ease;\n}\n.ui-otp__box[data-filled] { background: var(--ui-otp-card); box-shadow: inset 0 0 0 1px var(--ui-otp-line-strong); }\n.ui-otp__sep { flex: none; width: 10px; height: 2px; border-radius: 1px; background: var(--ui-otp-faint); transition: opacity 200ms ease; }\n\n/* Digits pop in – a small lift out of a blur, no bounce */\n.ui-otp__char { display: block; animation: ui-otp-pop 280ms var(--ui-otp-ease) both; }\n.ui-otp__slots[data-clearing] .ui-otp__char { animation: ui-otp-out 240ms ease both; animation-delay: calc((var(--n) - var(--i)) * 22ms) !important; }\n\n/* One ring glides from box to box; its caret blinks softly in an empty box */\n.ui-otp__ring {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n display: grid;\n place-items: center;\n border-radius: calc(var(--size) * 0.24);\n box-shadow: inset 0 0 0 1.5px var(--ui-otp-ink), 0 0 0 4px var(--ui-otp-halo);\n opacity: 0;\n pointer-events: none;\n transition: transform 260ms var(--ui-otp-ease), width 260ms var(--ui-otp-ease), opacity 180ms ease, box-shadow 220ms ease;\n}\n.ui-otp__ring[data-show] { opacity: 1; }\n.ui-otp__caret { width: 1.5px; height: 40%; border-radius: 1px; background: var(--ui-otp-ink); opacity: 0; }\n.ui-otp__caret[data-show] { animation: ui-otp-blink 1.1s ease-in-out infinite; }\n\n/* The real input lies over the boxes, invisible – it takes taps, keys, paste and SMS autofill */\n.ui-otp__input {\n position: absolute;\n inset: 0;\n z-index: 2;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n outline: none;\n background: transparent;\n color: transparent;\n -webkit-text-fill-color: transparent;\n caret-color: transparent;\n font-size: 16px; /* iOS doesn\'t zoom into inputs of 16px and up */\n letter-spacing: -1em;\n cursor: text;\n appearance: none;\n}\n.ui-otp__input::selection { background: transparent; }\n.ui-otp__input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px transparent inset; transition: background-color 9999s; }\n.ui-otp__input[readonly], .ui-otp__input:disabled { cursor: default; }\n/* Keyboard focus is shown by the ring – a thin outline joins it for keyboard users */\n.ui-otp__slots:has(.ui-otp__input:focus-visible) .ui-otp__ring { box-shadow: inset 0 0 0 1.5px var(--ui-otp-ink), 0 0 0 4px var(--ui-otp-halo), 0 0 0 6px var(--ui-otp-focus); }\n\n/* Verifying: a soft light passes over the boxes, one after another */\n.ui-otp__box::after {\n content: "";\n position: absolute;\n inset: 0;\n background: linear-gradient(100deg, transparent 20%, var(--ui-otp-shine) 50%, transparent 80%);\n transform: translateX(-120%);\n opacity: 0;\n pointer-events: none;\n}\n.ui-otp[data-status="verifying"] .ui-otp__box::after { opacity: 1; animation: ui-otp-shimmer 1.3s ease-in-out infinite; animation-delay: calc(var(--i) * 70ms); }\n.ui-otp[data-status="verifying"] .ui-otp__box { background: var(--ui-otp-wait); box-shadow: inset 0 0 0 1px var(--ui-otp-line); color: var(--ui-otp-text); }\n\n/* Error: only the borders turn red */\n.ui-otp[data-error] .ui-otp__box { box-shadow: inset 0 0 0 1px var(--ui-otp-danger-line); }\n.ui-otp[data-error] .ui-otp__ring { box-shadow: inset 0 0 0 1.5px var(--ui-otp-danger), 0 0 0 4px var(--ui-otp-danger-halo); }\n.ui-otp[data-error] .ui-otp__caret { background: var(--ui-otp-danger); }\n\n/* Success: the boxes slide together and fade while one frame morphs into the "Verified" pill */\n.ui-otp__pill {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 1;\n display: grid;\n place-items: center;\n height: calc(var(--size) * 1.18);\n overflow: hidden;\n border-radius: calc(var(--size) * 0.24);\n background: var(--ui-otp-card);\n box-shadow: inset 0 0 0 1px var(--ui-otp-line-strong);\n opacity: 0;\n transform: translate(-50%, -50%);\n pointer-events: none;\n transition: width 300ms var(--ui-otp-ease), border-radius 300ms var(--ui-otp-ease), opacity 160ms ease 140ms;\n}\n.ui-otp__pill-inner {\n display: inline-flex;\n align-items: center;\n gap: 7px;\n padding: 0 18px 0 15px;\n font-size: 14px;\n font-weight: 500;\n white-space: nowrap;\n color: var(--ui-otp-ink);\n opacity: 0;\n transition: opacity 160ms ease;\n}\n.ui-otp__check { width: 17px; height: 17px; fill: none; stroke: var(--ui-otp-success); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }\n.ui-otp__check path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 120ms ease; }\n.ui-otp[data-status="success"] .ui-otp__box {\n transform: translateX(calc(((var(--n) - 1) / 2 - var(--i)) * (var(--size) + var(--ui-otp-gap)))) scale(0.7);\n opacity: 0;\n transition: transform 340ms var(--ui-otp-ease), opacity 220ms ease 120ms;\n}\n.ui-otp[data-status="success"] .ui-otp__sep { opacity: 0; }\n.ui-otp[data-status="success"] .ui-otp__pill {\n border-radius: 999px;\n opacity: 1;\n transition: width 460ms var(--ui-otp-ease) 220ms, border-radius 460ms var(--ui-otp-ease) 220ms, opacity 160ms ease 120ms;\n}\n.ui-otp[data-status="success"] .ui-otp__pill-inner { opacity: 1; transition: opacity 240ms ease 460ms; }\n.ui-otp[data-status="success"] .ui-otp__check path { stroke-dashoffset: 0; transition: stroke-dashoffset 380ms var(--ui-otp-ease) 560ms; }\n\n/* The error message grows in below, then folds away */\n.ui-otp__msg { display: grid; grid-template-rows: 0fr; width: 100%; transition: grid-template-rows 300ms var(--ui-otp-ease); }\n.ui-otp__msg[data-show] { grid-template-rows: 1fr; }\n.ui-otp__msg-inner { min-height: 0; overflow: hidden; }\n.ui-otp__msg-text {\n margin: 0;\n padding-top: 10px;\n font-size: 13px;\n text-wrap: balance;\n color: var(--ui-otp-text);\n opacity: 0;\n transform: translateY(-4px);\n transition: opacity 200ms ease, transform 300ms var(--ui-otp-ease);\n}\n.ui-otp__msg[data-show] .ui-otp__msg-text { opacity: 1; transform: none; transition-delay: 60ms; }\n/* The icon sits inline, so a wrapped message stays centered with it */\n.ui-otp__alert { display: inline-block; width: 15px; height: 15px; margin-right: 6px; vertical-align: -3px; fill: none; stroke: var(--ui-otp-danger); stroke-width: 2; stroke-linecap: round; }\n\n/* Resend: a countdown that turns into a button */\n.ui-otp__resend { margin-top: 14px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ui-otp-muted); transition: opacity 220ms ease; }\n.ui-otp__resend[data-hidden] { opacity: 0; visibility: hidden; transition: opacity 220ms ease, visibility 0s 220ms; }\n.ui-otp__swap { display: inline-block; animation: ui-otp-in 260ms var(--ui-otp-ease) both; }\n.ui-otp__wait { color: var(--ui-otp-text); }\n.ui-otp__time { display: inline-block; min-width: 3.4ch; text-align: left; }\n.ui-otp__resend-btn {\n position: relative;\n margin: 0;\n padding: 0;\n border: 0;\n background: none;\n font: inherit;\n font-weight: 500;\n color: var(--ui-otp-accent);\n cursor: pointer;\n}\n.ui-otp__resend-btn::before { content: ""; position: absolute; inset: -6px -8px; border-radius: 8px; }\n.ui-otp__resend-btn:hover { text-decoration: underline; text-underline-offset: 3px; }\n.ui-otp__resend-btn:focus-visible { outline: 2px solid var(--ui-otp-focus); outline-offset: 3px; border-radius: 4px; }\n.ui-otp__resend-btn:disabled { color: var(--ui-otp-muted); cursor: default; text-decoration: none; }\n.ui-otp__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n\n@keyframes ui-otp-pop { from { opacity: 0; transform: translateY(4px) scale(0.7); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }\n@keyframes ui-otp-out { to { opacity: 0; transform: translateY(-4px) scale(0.8); filter: blur(2px); } }\n@keyframes ui-otp-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }\n@keyframes ui-otp-shimmer { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }\n@keyframes ui-otp-in { from { opacity: 0; transform: translateY(3px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }\n\n/* Narrow containers (phones): tighter gaps, the question before "Resend" drops first */\n@container (max-width: 360px) {\n .ui-otp__slots { --ui-otp-gap: 6px; }\n .ui-otp__sep { width: 8px; }\n}\n@container (max-width: 250px) {\n .ui-otp__resend-q { display: none; }\n}\n/* Touch screens: a bigger target for Resend */\n@media (hover: none) and (pointer: coarse) {\n .ui-otp__resend-btn::before { inset: -11px -12px; }\n}\n@media (prefers-reduced-motion: reduce) {\n .ui-otp *, .ui-otp *::before, .ui-otp *::after { animation: none !important; transition: none !important; }\n .ui-otp__caret[data-show] { opacity: 1; }\n}\n\n/* Dark mode: follows a .dark class or data-theme="dark" on any ancestor, e.g. <html> */\n:where(.dark, [data-theme="dark"]) .ui-otp {\n --ui-otp-bg: #1d1d20;\n --ui-otp-card: #19191b;\n --ui-otp-line: #2a2a2e;\n --ui-otp-line-strong: #3a3a40;\n --ui-otp-ink: #ededed;\n --ui-otp-text: #c8c8cc;\n --ui-otp-muted: #8b8b92;\n --ui-otp-faint: #4a4a50;\n --ui-otp-halo: rgba(255, 255, 255, 0.08);\n --ui-otp-wait: #1d1d20;\n --ui-otp-shine: rgba(255, 255, 255, 0.07);\n --ui-otp-danger: #ff6369;\n --ui-otp-danger-line: rgba(255, 99, 105, 0.55);\n --ui-otp-danger-halo: rgba(255, 99, 105, 0.14);\n --ui-otp-success: #4cc38a;\n --ui-otp-accent: #6d8bff;\n --ui-otp-focus: rgba(255, 255, 255, 0.3);\n}\n';n(1261),n(709);let u=n(5704).env.NEXT_PUBLIC_AGENTTWIN_API_URL||"https://api.agenttwin.si";function c(e){let{signup:t=!1}=e,[n,s]=(0,a.useState)(t),[l,c]=(0,a.useState)("email"),[d,p]=(0,a.useState)(""),[h,f]=(0,a.useState)(!1),[g,m]=(0,a.useState)(""),[x,b]=(0,a.useState)(""),[v,y]=(0,a.useState)(!1),[w,_]=(0,a.useState)(""),[k,j]=(0,a.useState)(!1),C=(0,a.useRef)(null);async function N(){let e=await fetch(u+"/v1/auth/email/start",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:g.trim().toLowerCase()}),signal:AbortSignal.timeout(2e4)}),t=await e.json();if(!e.ok)throw Error(404===e.status?"Email verification is being updated. Please use Google sign-in for now.":t.error||"Could not send your code.");m(g.trim().toLowerCase()),p(""),f(!1),c("code")}async function S(e){if(!v&&!h&&8===e.length){y(!0),_("");try{let t=await fetch(u+"/v1/auth/email/verify",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e}),signal:AbortSignal.timeout(2e4)}),n=await t.json();if(!t.ok)throw Error(n.error||"Could not verify your email.");("signup"===n.next||"login"===n.next)&&s("signup"===n.next),f(!0),await new Promise(e=>setTimeout(e,850)),p(""),c("password")}catch(e){_(e instanceof Error?e.message:"Could not verify your email.")}finally{y(!1)}}}async function T(e){if(e.preventDefault(),!v){if("code"===l)return void await S(d);_(""),y(!0);try{if("email"===l)return void await N();let e=await fetch(u+"/v1/auth/"+(n?"signup":"login"),{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:g,password:x}),signal:AbortSignal.timeout(2e4)}),t=await e.json();if(!e.ok)throw Error(t.error||"Unable to sign in. Please try again.");if(!(await fetch(u+"/v1/auth/me",{credentials:"include",signal:AbortSignal.timeout(1e4)})).ok)throw Error("Your browser could not save the session. Allow cookies for AgentTwin and try again.");location.assign(n||k?"/onboarding/":"/dashboard/#home")}catch(e){_(e instanceof TypeError?"Could not connect to AgentTwin. Please try again.":e instanceof Error?e.message:"Unable to connect. Please try again.")}finally{y(!1)}}}(0,a.useEffect)(()=>{let e=new URLSearchParams(location.search);j("onboarding"===e.get("next"));let t=e.get("auth_error");t&&_("existing_account"===t?"An account already uses this email. Sign in with the method you used to create it.":"verified_email"===t?"Your provider must supply a verified email address. Verify your email there or continue with email.":"Provider sign-in was cancelled or could not be completed. Please try again.")},[]),(0,a.useEffect)(()=>{var e;"email"!==l&&(null==(e=C.current)||e.focus())},[l]);let E="code"===l?"Check your email":n?"Create your account":"Log in to AgentTwin",A=(n?"/login/":"/signup/")+(k?"?next=onboarding":"");return(0,i.jsxs)("main",{className:"auth-page auth-entry vercel-auth vercel-entry".concat(n?" vercel-signup":" vercel-login"),children:[(0,i.jsxs)("header",{className:"auth-header",children:[(0,i.jsx)("a",{className:"auth-brand",href:"/","aria-label":"AgentTwin home",children:(0,i.jsx)("img",{src:"assets/logo/mark-twin-rings.svg",width:"26",height:"26",alt:""})}),(0,i.jsx)("a",{className:"auth-header-link",href:A,children:n?"Log in":"Sign up"})]}),(0,i.jsxs)("section",{className:"auth-card auth-entry-card","aria-labelledby":"auth-title",children:[(0,i.jsx)("h1",{id:"auth-title",ref:C,tabIndex:-1,children:E}),"email"!==l&&(0,i.jsxs)("div",{className:"auth-email-summary",children:[(0,i.jsx)("span",{children:g}),(0,i.jsx)("button",{type:"button",className:"auth-text-button",onClick:()=>{_(""),c("email")},disabled:v,children:"Change"})]}),(0,i.jsxs)("form",{onSubmit:T,"aria-busy":v,children:[!n&&"password"===l&&(0,i.jsx)("p",{className:"auth-provider-note",children:"Use your AgentTwin password. If you joined with Google, sign in with Google and create a password in Settings first."}),"email"===l&&(0,i.jsxs)("label",{htmlFor:"auth-email",children:["Email address",(0,i.jsx)("input",{id:"auth-email",name:"email",type:"email",autoComplete:"email",placeholder:"Email Address",value:g,onChange:e=>m(e.target.value),required:!0,maxLength:254})]}),"code"===l&&(0,i.jsxs)("div",{className:"auth-otp dark",children:[(0,i.jsxs)("p",{className:"auth-otp-description",children:["Enter the code sent to your email.",(0,i.jsx)("br",{}),"It expires in 10 minutes."]}),(0,i.jsx)(r,{length:8,separator:!0,value:d,align:"center",autoFocus:!0,status:h?"success":v?"verifying":w?"error":"idle",errorMessage:w,onChange:e=>{p(e),w&&_("")},onComplete:S,resendIn:60,onResend:async()=>{if(!v){y(!0),_("");try{await N()}catch(e){_(e instanceof Error?e.message:"Could not resend your code.")}finally{y(!1)}}}})]}),"password"===l&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("label",{htmlFor:"auth-password",children:[n?"Create a password":"Password",(0,i.jsx)("input",{id:"auth-password",name:"password",type:"password",autoComplete:n?"new-password":"current-password",value:x,onChange:e=>b(e.target.value),minLength:12,maxLength:128,required:!0,"aria-describedby":n?"password-hint":void 0})]}),n&&(0,i.jsx)("small",{id:"password-hint",children:"Use at least 12 characters."})]}),w&&"code"!==l&&(0,i.jsx)("p",{role:"alert",className:"auth-error",children:w}),(0,i.jsx)("button",{className:"auth-primary",type:"submit",disabled:v||"code"===l&&8!==d.length,children:v?"code"===l?"Verifying…":"Connecting…":"email"===l?"Continue with Email":"code"===l?"Verify email":n?"Create account":"Log in"}),"email"!==l&&(0,i.jsx)("button",{className:"auth-text-button auth-step-back",type:"button",onClick:function(){_(""),c("email")},disabled:v,children:"Back"})]}),"email"===l&&(0,i.jsx)(o,{api:u,signup:n,onboarding:k,pending:v,setPending:y,setError:_}),(0,i.jsxs)("p",{className:"auth-switch",children:[n?"Already have an account?":"New to AgentTwin?"," ",(0,i.jsx)("a",{href:A,children:n?"Log in":"Sign up"})]})]}),(0,i.jsxs)("footer",{className:"auth-footer",children:[(0,i.jsx)("a",{href:"/docs/",children:"Documentation"}),(0,i.jsx)("a",{href:"/",children:"Back to AgentTwin"})]})]})}}}]);
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[772],{2931:(e,t,n)=>{function r(e,t){this.v=e,this.k=t}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l(e){var t,n;function i(t,n){try{var o=e[t](n),a=o.value,s=a instanceof r;Promise.resolve(s?a.v:a).then(function(n){if(s){var r="return"===t&&a.k?t:"next";if(!a.k||n.done)return i(r,n);n=e[r](n).value}l(!!o.done,n)},function(e){i("throw",e)})}catch(e){l(2,e)}}function l(e,r){2===e?t.reject(r):t.resolve({value:r,done:e}),(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(e,r){return new Promise(function(l,o){var a={key:e,arg:r,resolve:l,reject:o,next:null};n?n=n.next=a:(t=n=a,i(e,r))})},"function"!=typeof e.return&&(this.return=void 0)}n.d(t,{A:()=>ew}),l.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},l.prototype.next=function(e){return this._invoke("next",e)},l.prototype.throw=function(e){return this._invoke("throw",e)},l.prototype.return=function(e){return this._invoke("return",e)};let o=Object.entries,a=Object.setPrototypeOf,s=Object.isFrozen,c=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,p=Object.freeze,h=Object.seal,f=Object.create,d="undefined"!=typeof Reflect&&Reflect,g=d.apply,m=d.construct;p||(p=function(e){return e}),h||(h=function(e){return e}),g||(g=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)}),m||(m=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});let k=L(Array.prototype.forEach);Array.prototype.indexOf;let b=L(Array.prototype.lastIndexOf),x=L(Array.prototype.pop),y=L(Array.prototype.push);Array.prototype.slice;let w=L(Array.prototype.splice),S=Array.isArray,T=L(String.prototype.toLowerCase),A=L(String.prototype.toString),_=L(String.prototype.match),R=L(String.prototype.replace),E=L(String.prototype.indexOf),v=L(String.prototype.trim),z=L(Number.prototype.toString),$=L(Boolean.prototype.toString),C="undefined"==typeof BigInt?null:L(BigInt.prototype.toString),P="undefined"==typeof Symbol?null:L(Symbol.prototype.toString),I=L(Object.prototype.hasOwnProperty),O=L(Object.prototype.toString),D=L(RegExp.prototype.test),N=(ey=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return m(ey,t)});function L(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return g(e,t,r)}}function M(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;if(a&&a(e,null),!S(t))return e;let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){let e=n(i);e!==i&&(s(t)||(t[r]=e),i=e)}e[i]=!0}return e}function B(e){let t=f(null);for(let r of o(e)){var n=function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,l,o,a=[],s=!0,c=!1;try{l=(n=n.call(e)).next,!1;for(;!(s=(r=l.call(n)).done)&&(a.push(r.value),a.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}(r,2)||function(e,t){if(e){if("string"==typeof e)return i(e,2);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();let l=n[0],o=n[1];I(e,l)&&(S(o)?t[l]=function(e){for(let t=0;t<e.length;t++)I(e,t)||(e[t]=null);return e}(o):o&&"object"==typeof o&&o.constructor===Object?t[l]=B(o):t[l]=o)}return t}function U(e,t){for(;null!==e;){let n=u(e,t);if(n){if(n.get)return L(n.get);if("function"==typeof n.value)return L(n.value)}e=c(e)}return function(){return null}}let F=p(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=p(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),q=p(["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"]),H=p(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Z=p(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),W=p(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),G=p(["#text"]),Y=p(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Q=p(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),X=p(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),K=p(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=h(/{{[\w\W]*|^[\w\W]*}}/g),J=h(/<%[\w\W]*|^[\w\W]*%>/g),ee=h(/\${[\w\W]*/g),et=h(/^data-[\-\w.\u00B7-\uFFFF]+$/),en=h(/^aria-[\-\w]+$/),er=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ei=h(/^(?:\w+script|data):/i),el=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eo=h(/^html$/i),ea=h(/^[a-z][.\w]*(-[.\w]+)+$/i),es=h(/<[/\w!]/g),ec=h(/<[/\w]/g),eu=h(/<\/no(script|embed|frames)/i),ep=h(/\/>/i),eh={element:1,text:3,processingInstruction:7,comment:8,document:9,documentFragment:11},ef=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],ed=p(M({},ef)),eg=function(){let e={};return k(ef,t=>{e[t]=h(RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),p(e)}(),em=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},ek=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},eb=function(e,t,n,r){return I(e,t)&&S(e[t])?M(r.base?B(r.base):{},e[t],r.transform):n},ex=function(e,t,n){let r=I(e,t)?e[t]:void 0;return r&&"object"==typeof r?B(r):n()};var ey,ew=function e(){let t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,i=t=>e(t);if(i.version="3.4.16",i.removed=[],!r||!r.document||r.document.nodeType!==eh.document||!r.Element)return i.isSupported=!1,i;let l=r.document,a=l,s=a.currentScript;r.DocumentFragment;let c=r.HTMLTemplateElement,u=r.Node,d=r.Element,g=r.NodeFilter;void 0===r.NamedNodeMap&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let m=r.DOMParser,L=r.trustedTypes,ef=d.prototype,ey=U(ef,"cloneNode"),ew=U(ef,"remove"),eS=U(ef,"removeAttributeNode"),eT=U(ef,"nextSibling"),eA=U(ef,"childNodes"),e_=U(ef,"parentNode"),eR=U(ef,"shadowRoot"),eE=U(ef,"attributes"),ev=u&&u.prototype?U(u.prototype,"nodeType"):null,ez=u&&u.prototype?U(u.prototype,"nodeName"):null,e$=u&&u.prototype?U(u.prototype,"ownerDocument"):null,eC=function(e){return ev?ev(e):e.nodeType},eP=function(e){return ez?ez(e):e.nodeName};if("function"==typeof c){let e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let eI="",eO=!1,eD=0,eN=function(){if(eD>0)throw N('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},eL=function(e){eN(),eD++;try{return t.createHTML(e)}finally{eD--}},eM=function(e){eN(),eD++;try{return t.createScriptURL(e)}finally{eD--}},eB=l,eU=eB.implementation,eF=eB.createNodeIterator,ej=eB.createDocumentFragment,eq=eB.getElementsByTagName,eH=a.importNode,eZ=ek();i.isSupported="function"==typeof o&&"function"==typeof e_&&eU&&void 0!==eU.createHTMLDocument;let eW=er,eG=null,eY=M({},[...F,...j,...q,...Z,...G]),eQ=null,eX=M({},[...Y,...Q,...X,...K]),eK=Object.seal(f(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),eV=null,eJ=null,e0=Object.seal(f(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),e1=!0,e3=!0,e2=!1,e9=!0,e4=!1,e6=!0,e5=!1,e7=!1,e8=null,te=null,tt=!1,tn=!1,tr=!1,ti=!1,tl=!0,to=!1,ta="user-content-",ts=!0,tc=!1,tu={},tp=null,th=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),tf=null,td=M({},["audio","video","img","source","image","track"]),tg=null,tm=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tk="http://www.w3.org/1998/Math/MathML",tb="http://www.w3.org/2000/svg",tx="http://www.w3.org/1999/xhtml",ty=tx,tw=!1,tS=null,tT=M({},[tk,tb,tx],A),tA=p(["mi","mo","mn","ms","mtext"]),t_=M({},tA),tR=p(["annotation-xml"]),tE=M({},tR),tv=M({},["title","style","font","a","script"]),tz=null,t$=["application/xhtml+xml","text/html"],tC=null,tP=null,tI=l.createElement("form"),tO=function(e){return e instanceof RegExp||e instanceof Function},tD=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(tP&&tP===e)return;e&&"object"==typeof e||(e={}),e=B(e),tC="application/xhtml+xml"===(tz=-1===t$.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?A:T,eG=eb(e,"ALLOWED_TAGS",eY,{transform:tC}),eQ=eb(e,"ALLOWED_ATTR",eX,{transform:tC}),tS=eb(e,"ALLOWED_NAMESPACES",tT,{transform:A}),tg=eb(e,"ADD_URI_SAFE_ATTR",tm,{transform:tC,base:tm}),tf=eb(e,"ADD_DATA_URI_TAGS",td,{transform:tC,base:td}),tp=eb(e,"FORBID_CONTENTS",th,{transform:tC}),eV=eb(e,"FORBID_TAGS",B({}),{transform:tC}),eJ=eb(e,"FORBID_ATTR",B({}),{transform:tC}),tu=!!I(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?B(e.USE_PROFILES):e.USE_PROFILES),e1=!1!==e.ALLOW_ARIA_ATTR,e3=!1!==e.ALLOW_DATA_ATTR,e2=e.ALLOW_UNKNOWN_PROTOCOLS||!1,e9=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,e4=e.SAFE_FOR_TEMPLATES||!1,e6=!1!==e.SAFE_FOR_XML,e5=e.WHOLE_DOCUMENT||!1,tn=e.RETURN_DOM||!1,tr=e.RETURN_DOM_FRAGMENT||!1,ti=e.RETURN_TRUSTED_TYPE||!1,tt=e.FORCE_BODY||!1,tl=!1!==e.SANITIZE_DOM,to=e.SANITIZE_NAMED_PROPS||!1,ts=!1!==e.KEEP_CONTENT,tc=e.IN_PLACE||!1,eW=!function(e){try{return D(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?er:e.ALLOWED_URI_REGEXP,ty="string"==typeof e.NAMESPACE?e.NAMESPACE:tx,t_=ex(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>M({},tA)),tE=ex(e,"HTML_INTEGRATION_POINTS",()=>M({},tR));let r=ex(e,"CUSTOM_ELEMENT_HANDLING",()=>f(null));if(eK=f(null),I(r,"tagNameCheck")&&tO(r.tagNameCheck)&&(eK.tagNameCheck=r.tagNameCheck),I(r,"attributeNameCheck")&&tO(r.attributeNameCheck)&&(eK.attributeNameCheck=r.attributeNameCheck),I(r,"allowCustomizedBuiltInElements")&&"boolean"==typeof r.allowCustomizedBuiltInElements&&(eK.allowCustomizedBuiltInElements=r.allowCustomizedBuiltInElements),h(eK),e4&&(e3=!1),tr&&(tn=!0),tu&&(eG=M({},G),eQ=f(null),!0===tu.html&&(M(eG,F),M(eQ,Y)),!0===tu.svg&&(M(eG,j),M(eQ,Q),M(eQ,K)),!0===tu.svgFilters&&(M(eG,q),M(eQ,Q),M(eQ,K)),!0===tu.mathMl&&(M(eG,Z),M(eQ,X),M(eQ,K))),e0.tagCheck=null,e0.attributeCheck=null,I(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?e0.tagCheck=e.ADD_TAGS:S(e.ADD_TAGS)&&(eG===eY&&(eG=B(eG)),M(eG,e.ADD_TAGS,tC))),I(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?e0.attributeCheck=e.ADD_ATTR:S(e.ADD_ATTR)&&(eQ===eX&&(eQ=B(eQ)),M(eQ,e.ADD_ATTR,tC))),I(e,"ADD_FORBID_CONTENTS")&&S(e.ADD_FORBID_CONTENTS)&&(tp===th&&(tp=B(tp)),M(tp,e.ADD_FORBID_CONTENTS,tC)),ts&&(eG["#text"]=!0),e5&&M(eG,["html","head","body"]),eG.table&&(M(eG,["tbody"]),delete eV.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let n=t;t=e.TRUSTED_TYPES_POLICY;try{eI=eL("")}catch(e){throw t=n,e}}else null===e.TRUSTED_TYPES_POLICY?(t=void 0,eI=""):(void 0===t&&(eO||(n=em(L,s),eO=!0),t=n),t&&"string"==typeof eI&&(eI=eL("")));p&&p(e),tP=e},tN=M({},[...j,...q,...H]),tL=M({},[...Z,...W]),tM=function(e){var t,n,r;let i=e_(e);i&&i.tagName||(i={namespaceURI:ty,tagName:"template"});let l=T(e.tagName),o=T(i.tagName);return!!tS[e.namespaceURI]&&(e.namespaceURI===tb?(t=i).namespaceURI===tx?"svg"===l:t.namespaceURI===tk?"svg"===l&&("annotation-xml"===o||t_[o]):!!tN[l]:e.namespaceURI===tk?(n=i).namespaceURI===tx?"math"===l:n.namespaceURI===tb?"math"===l&&tE[o]:!!tL[l]:e.namespaceURI===tx?((r=i).namespaceURI!==tb||!!tE[o])&&(r.namespaceURI!==tk||!!t_[o])&&!tL[l]&&(tv[l]||!tN[l]):"application/xhtml+xml"===tz&&!!tS[e.namespaceURI])},tB=function(e){y(i.removed,{element:e});try{e_(e).removeChild(e)}catch(t){if(ew(e),!e_(e))throw N("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tU=function(e,t,n){try{eS(e,t)}catch(t){try{e.removeAttribute(n)}catch(e){}}},tF=function(e){tH(e);let t=eA(e);if(t){let e=[];k(t,t=>{y(e,t)}),k(e,e=>{try{ew(e)}catch(e){}})}let n=eE(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;"string"==typeof i&&tU(e,r,i)}},tj=function(e,t,n){if(!n)try{n=t.getAttributeNode(e)}catch(e){n=null}y(i.removed,{attribute:n||null,from:t});try{n?eS(t,n):t.removeAttribute(e)}catch(n){try{t.removeAttribute(e)}catch(e){}}if("is"===e)if(tn||tr)try{tB(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},tq=function(e){let t=eE(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;"string"!=typeof i||eQ[tC(i)]||tU(e,r,i)}},tH=function(e){let t=[e];for(;t.length>0;){let e=t.pop();eC(e)===eh.element&&tq(e);let n=eA(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},tZ=function(e,t){return!!e6&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},tW=function(e){if(!e6)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=eC(e);if(n===eh.processingInstruction||n===eh.comment&&D(ec,e.data)){try{ew(e)}catch(e){}continue}if(n===eh.element){let t=tC(eP(e));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&tZ("for",t)&&e.removeAttribute("for")}catch(e){}}let r=eA(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},tG=function(e){let n=null,r=null;if(tt)e="<remove></remove>"+e;else{let t=_(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===tz&&ty===tx&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let i=t?eL(e):e;if(ty===tx)try{n=new m().parseFromString(i,tz)}catch(e){}if(!n||!n.documentElement){n=eU.createDocument(ty,"template",null);try{n.documentElement.innerHTML=tw?eI:i}catch(e){}}let o=n.body||n.documentElement;return(e&&r&&o.insertBefore(l.createTextNode(r),o.childNodes[0]||null),ty===tx)?eq.call(n,e5?"html":"body")[0]:e5?n.documentElement:o},tY=function(e){let t=e$?e$(e):e.ownerDocument;return eF.call(t||e,e,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},tQ=function(e){return e=R(e,V," "),e=R(e,J," "),e=R(e,ee," ")},tX=function(e){var t;e.normalize();let n=e$?e$(e):e.ownerDocument,r=eF.call(n||e,e,g.SHOW_TEXT|g.SHOW_COMMENT|g.SHOW_CDATA_SECTION|g.SHOW_PROCESSING_INSTRUCTION,null),i=r.nextNode();for(;i;)i.data=tQ(i.data),i=r.nextNode();let l=null==(t=e.querySelectorAll)?void 0:t.call(e,"template");l&&k(l,e=>{tV(e.content)&&tX(e.content)})},tK=function(e){let t=ez?ez(e):null;return"string"==typeof t&&"form"===tC(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==eE(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==ev(e)||e.childNodes!==eA(e))},tV=function(e){if(!ev||"object"!=typeof e||null===e)return!1;try{return ev(e)===eh.documentFragment}catch(e){return!1}},tJ=function(e){if(!ev||"object"!=typeof e||null===e)return!1;try{return"number"==typeof ev(e)}catch(e){return!1}};function t0(e,t,n){0!==e.length&&k(e,e=>{e.call(i,t,n,tP)})}let t1=function(e,t){if(e instanceof RegExp)return D(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},t3=function(e,t,n){if(!eV[t]&&t7(t)&&t1(eK.tagNameCheck,t))return!1;if(ts&&!tp[t]){let t=e_(e),r=eA(e);if(r&&t){let i=r.length;for(let l=i-1;l>=0;--l){let i=e===n?ey(r[l],!0):r[l];t.insertBefore(i,eT(e))}}}return tB(e),!0},t2=function(e,t,n,r){return 0===e.length?t:t===n||t===r?B(t):t},t9=function(e,t){return e!==t&&null===e_(e)&&(tc&&tH(e),!0)},t4=function(e,t){if(t0(eZ.beforeSanitizeElements,e,null),t9(e,t))return!0;if(tK(e))return tB(e),!0;let n=tC(eP(e));if(eG=t2(eZ.uponSanitizeElement,eG,eY,e8),t0(eZ.uponSanitizeElement,e,{tagName:n,allowedTags:eG}),t9(e,t))return!0;if(e6&&e.hasChildNodes()&&!tJ(e.firstElementChild)&&D(es,e.textContent)&&D(es,e.innerHTML)||e6&&e.namespaceURI===tx&&ed[n]&&(tJ(e.firstElementChild)||"string"==typeof e.textContent&&D(eg[n],e.textContent))||e.nodeType===eh.processingInstruction||e6&&e.nodeType===eh.comment&&D(ec,e.data))return tB(e),!0;if(eV[n]||!(e0.tagCheck instanceof Function&&e0.tagCheck(n))&&!eG[n]){let r=t3(e,n,t);return!!(!1===r&&(t0(eZ.afterSanitizeElements,e,null),t9(e,t)))||r}if(eC(e)===eh.element&&!tM(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&D(eu,e.innerHTML))return tB(e),!0;if(e4&&e.nodeType===eh.text){let t=tQ(e.textContent);e.textContent!==t&&(y(i.removed,{element:e.cloneNode()}),e.textContent=t)}return t0(eZ.afterSanitizeElements,e,null),t9(e,t)},t6=function(e,t,n){if(eJ[t]||tZ(t,e)||tl&&("id"===t||"name"===t)&&(n in l||n in tI))return!1;let r=eQ[t]||e0.attributeCheck instanceof Function&&e0.attributeCheck(t,e);return!!(e3&&D(et,t)||e1&&D(en,t))||(r?!(!(tg[t]||D(eW,R(n,el,"")))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!tf[e])&&(!e2||D(ei,R(n,el,""))))||!n:t7(e)&&t1(eK.tagNameCheck,e)&&t1(eK.attributeNameCheck,t,e)||"is"===t&&eK.allowCustomizedBuiltInElements&&t1(eK.tagNameCheck,n))},t5=M({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),t7=function(e){return!t5[T(e)]&&D(ea,e)},t8=function(e,n,r,i){if(t&&"object"==typeof L&&"function"==typeof L.getAttributeType&&!r)switch(L.getAttributeType(e,n)){case"TrustedHTML":return eL(i);case"TrustedScriptURL":return eM(i)}return i},ne=function(e,t,n,r){try{if(n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),tK(e))return tB(e),!1;return!0}catch(n){return tj(t,e),!1}},nt=function(e,t){if(t0(eZ.beforeSanitizeAttributes,e,null),t9(e,t))return;let n=e.attributes;if(!n||tK(e))return;let r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:eQ=t2(eZ.uponSanitizeAttribute,eQ,eX,te),forceKeepAttr:void 0},l=n.length,o=tC(e.nodeName);for(;l--;){let t=n[l],a=t.name,s=t.namespaceURI,c=t.value,u=tC(a),p="value"===a?c:v(c),h=!1;if(r.attrName=u,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,t0(eZ.uponSanitizeAttribute,e,r),p=r.attrValue,to&&("id"===u||"name"===u)&&0!==E(p,ta)&&(tj(a,e,t),p=ta+p,h=!0),e6&&D(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)||"attributename"===u&&_(p,"href")){tj(a,e,t);continue}if(!r.forceKeepAttr){if(!r.keepAttr||!e9&&D(ep,p)||(e4&&(p=tQ(p)),!t6(o,u,p))){tj(a,e,t);continue}(p=t8(o,u,s,p))!==c&&ne(e,a,s,p)&&h&&x(i.removed)}}t0(eZ.afterSanitizeAttributes,e,null),t9(e,t)},nn=function(e){let t=null,n=tY(e);for(t0(eZ.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(t0(eZ.uponSanitizeShadowNode,t,null),t4(t,e),nt(t,e),tV(t.content)&&nn(t.content),eC(t)===eh.element){let e=eR(t);tV(e)&&(nr(e),nn(e))}t0(eZ.afterSanitizeShadowDOM,e,null)},nr=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){nn(e.shadow);continue}let n=e.node,r=eC(n)===eh.element,i=eA(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=ez?ez(n):null;if("string"==typeof e&&"template"===tC(e)){let e=n.content;tV(e)&&t.push({node:e,shadow:null})}}if(r){let e=eR(n);tV(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return i.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,l=null,o=null,s=null;if((tw=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!tJ(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return z(e);case"boolean":return $(e);case"bigint":return C?C(e):"0";case"symbol":return P?P(e):"Symbol()";case"undefined":default:return O(e);case"function":case"object":{if(null===e)return O(e);let t=U(e,"toString");if("function"==typeof t){let n=t(e);return"string"==typeof n?n:O(n)}return O(e)}}}(e)))throw N("dirty is not a string, aborting");if(!i.isSupported)return e;e7?(eG=e8,eQ=te):tD(n),(eZ.uponSanitizeElement.length>0||eZ.uponSanitizeAttribute.length>0)&&(eG=B(eG)),eZ.uponSanitizeAttribute.length>0&&(eQ=B(eQ)),i.removed=[];let c=tc&&"string"!=typeof e&&tJ(e);if(c){tW(e);let t=eP(e);if("string"==typeof t){let n=tC(t);if(!eG[n]||eV[n])throw tF(e),N("root node is forbidden and cannot be sanitized in-place")}if(tK(e))throw tF(e),N("root node is clobbered and cannot be sanitized in-place");try{nr(e)}catch(t){throw tF(e),t}}else if(tJ(e))(l=(r=tG("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType===eh.element&&"BODY"===l.nodeName||"HTML"===l.nodeName?r=l:r.appendChild(l),nr(r);else{if(!tn&&!e4&&!e5&&-1===e.indexOf("<"))return t&&ti?eL(e):e;if(!(r=tG(e)))return tn?null:ti?eI:""}r&&tt&&tB(r.firstChild);let u=c?e:r;try{let e=tY(u);for(;o=e.nextNode();)t4(o,u),nt(o,u),tV(o.content)&&nn(o.content)}catch(t){throw c&&(tF(e),k(i.removed,e=>{e.element&&tH(e.element)})),t}if(c){let t=!1;if(k(i.removed,n=>{n.element&&(n.element===e&&(t=!0),tH(n.element))}),t)throw N("a node selected for removal could not be safely returned; refusing to sanitize in place");return e4&&tX(e),e}if(tn){if(e4&&tX(r),tr)for(s=ej.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(eQ.shadowroot||eQ.shadowrootmode)&&(s=eH.call(a,s,!0)),s}let p=e5?r.outerHTML:r.innerHTML;return e5&&eG["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&D(eo,r.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+p),e4&&(p=tQ(p)),t&&ti?eL(p):p},i.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tD(e),e7=!0,e8=eG,te=eQ},i.clearConfig=function(){tP=null,e7=!1,e8=null,te=null,t=n,eI=""},i.isValidAttribute=function(e,t,n){return tP||tD({}),t6(tC(e),tC(t),n)},i.addHook=function(e,t){"function"==typeof t&&I(eZ,e)&&y(eZ[e],t)},i.removeHook=function(e,t){if(I(eZ,e)){if(void 0!==t){let n=b(eZ[e],t);return -1===n?void 0:w(eZ[e],n,1)[0]}return x(eZ[e])}},i.removeHooks=function(e){I(eZ,e)&&(eZ[e]=[])},i.removeAllHooks=function(){eZ=ek()},i}()},4558:(e,t,n)=>{function r(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}n.d(t,{xI:()=>eI});var i=r(),l={exec:()=>null};function o(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function a(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(c.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var s=((e="")=>{try{return!!RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),c={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ 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,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,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,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:o(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:o(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:o(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:o(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:o(e=>RegExp(`^ {0,${e}}(?:</?(?:${x})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:o(e=>RegExp(`^ {0,${e}}>`))},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,p=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,h=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,f=a(h).replace(/bull/g,p).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}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),d=a(h).replace(/bull/g,p).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}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),g=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,m=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,k=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",m).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),b=a(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,p).getRegex(),x="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",y=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,w=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",y).replace("tag",x).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),S=e=>a(g).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),T=S(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),A=S(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),_={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",A).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:k,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:w,lheading:f,list:b,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:T,table:l,text:/^[^\n]+/},R=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),E={..._,lheading:d,table:R,paragraph:a(g).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",R).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex()},v={..._,html:a(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",y).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:l,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(g).replace("hr",u).replace("heading",` *#{1,6} *[^
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7772],{2931:(e,t,n)=>{function r(e,t){this.v=e,this.k=t}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l(e){var t,n;function i(t,n){try{var o=e[t](n),a=o.value,s=a instanceof r;Promise.resolve(s?a.v:a).then(function(n){if(s){var r="return"===t&&a.k?t:"next";if(!a.k||n.done)return i(r,n);n=e[r](n).value}l(!!o.done,n)},function(e){i("throw",e)})}catch(e){l(2,e)}}function l(e,r){2===e?t.reject(r):t.resolve({value:r,done:e}),(t=t.next)?i(t.key,t.arg):n=null}this._invoke=function(e,r){return new Promise(function(l,o){var a={key:e,arg:r,resolve:l,reject:o,next:null};n?n=n.next=a:(t=n=a,i(e,r))})},"function"!=typeof e.return&&(this.return=void 0)}n.d(t,{A:()=>ew}),l.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},l.prototype.next=function(e){return this._invoke("next",e)},l.prototype.throw=function(e){return this._invoke("throw",e)},l.prototype.return=function(e){return this._invoke("return",e)};let o=Object.entries,a=Object.setPrototypeOf,s=Object.isFrozen,c=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,p=Object.freeze,h=Object.seal,f=Object.create,d="undefined"!=typeof Reflect&&Reflect,g=d.apply,m=d.construct;p||(p=function(e){return e}),h||(h=function(e){return e}),g||(g=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)}),m||(m=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});let k=L(Array.prototype.forEach);Array.prototype.indexOf;let b=L(Array.prototype.lastIndexOf),x=L(Array.prototype.pop),y=L(Array.prototype.push);Array.prototype.slice;let w=L(Array.prototype.splice),S=Array.isArray,T=L(String.prototype.toLowerCase),A=L(String.prototype.toString),_=L(String.prototype.match),R=L(String.prototype.replace),E=L(String.prototype.indexOf),v=L(String.prototype.trim),z=L(Number.prototype.toString),$=L(Boolean.prototype.toString),C="undefined"==typeof BigInt?null:L(BigInt.prototype.toString),P="undefined"==typeof Symbol?null:L(Symbol.prototype.toString),I=L(Object.prototype.hasOwnProperty),O=L(Object.prototype.toString),D=L(RegExp.prototype.test),N=(ey=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return m(ey,t)});function L(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return g(e,t,r)}}function M(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T;if(a&&a(e,null),!S(t))return e;let r=t.length;for(;r--;){let i=t[r];if("string"==typeof i){let e=n(i);e!==i&&(s(t)||(t[r]=e),i=e)}e[i]=!0}return e}function B(e){let t=f(null);for(let r of o(e)){var n=function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,l,o,a=[],s=!0,c=!1;try{l=(n=n.call(e)).next,!1;for(;!(s=(r=l.call(n)).done)&&(a.push(r.value),a.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return a}}(r,2)||function(e,t){if(e){if("string"==typeof e)return i(e,2);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(r,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();let l=n[0],o=n[1];I(e,l)&&(S(o)?t[l]=function(e){for(let t=0;t<e.length;t++)I(e,t)||(e[t]=null);return e}(o):o&&"object"==typeof o&&o.constructor===Object?t[l]=B(o):t[l]=o)}return t}function U(e,t){for(;null!==e;){let n=u(e,t);if(n){if(n.get)return L(n.get);if("function"==typeof n.value)return L(n.value)}e=c(e)}return function(){return null}}let F=p(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=p(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),q=p(["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"]),H=p(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Z=p(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),W=p(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),G=p(["#text"]),Y=p(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Q=p(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),X=p(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),K=p(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),V=h(/{{[\w\W]*|^[\w\W]*}}/g),J=h(/<%[\w\W]*|^[\w\W]*%>/g),ee=h(/\${[\w\W]*/g),et=h(/^data-[\-\w.\u00B7-\uFFFF]+$/),en=h(/^aria-[\-\w]+$/),er=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ei=h(/^(?:\w+script|data):/i),el=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),eo=h(/^html$/i),ea=h(/^[a-z][.\w]*(-[.\w]+)+$/i),es=h(/<[/\w!]/g),ec=h(/<[/\w]/g),eu=h(/<\/no(script|embed|frames)/i),ep=h(/\/>/i),eh={element:1,text:3,processingInstruction:7,comment:8,document:9,documentFragment:11},ef=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],ed=p(M({},ef)),eg=function(){let e={};return k(ef,t=>{e[t]=h(RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),p(e)}(),em=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},ek=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},eb=function(e,t,n,r){return I(e,t)&&S(e[t])?M(r.base?B(r.base):{},e[t],r.transform):n},ex=function(e,t,n){let r=I(e,t)?e[t]:void 0;return r&&"object"==typeof r?B(r):n()};var ey,ew=function e(){let t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,i=t=>e(t);if(i.version="3.4.16",i.removed=[],!r||!r.document||r.document.nodeType!==eh.document||!r.Element)return i.isSupported=!1,i;let l=r.document,a=l,s=a.currentScript;r.DocumentFragment;let c=r.HTMLTemplateElement,u=r.Node,d=r.Element,g=r.NodeFilter;void 0===r.NamedNodeMap&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let m=r.DOMParser,L=r.trustedTypes,ef=d.prototype,ey=U(ef,"cloneNode"),ew=U(ef,"remove"),eS=U(ef,"removeAttributeNode"),eT=U(ef,"nextSibling"),eA=U(ef,"childNodes"),e_=U(ef,"parentNode"),eR=U(ef,"shadowRoot"),eE=U(ef,"attributes"),ev=u&&u.prototype?U(u.prototype,"nodeType"):null,ez=u&&u.prototype?U(u.prototype,"nodeName"):null,e$=u&&u.prototype?U(u.prototype,"ownerDocument"):null,eC=function(e){return ev?ev(e):e.nodeType},eP=function(e){return ez?ez(e):e.nodeName};if("function"==typeof c){let e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let eI="",eO=!1,eD=0,eN=function(){if(eD>0)throw N('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},eL=function(e){eN(),eD++;try{return t.createHTML(e)}finally{eD--}},eM=function(e){eN(),eD++;try{return t.createScriptURL(e)}finally{eD--}},eB=l,eU=eB.implementation,eF=eB.createNodeIterator,ej=eB.createDocumentFragment,eq=eB.getElementsByTagName,eH=a.importNode,eZ=ek();i.isSupported="function"==typeof o&&"function"==typeof e_&&eU&&void 0!==eU.createHTMLDocument;let eW=er,eG=null,eY=M({},[...F,...j,...q,...Z,...G]),eQ=null,eX=M({},[...Y,...Q,...X,...K]),eK=Object.seal(f(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),eV=null,eJ=null,e0=Object.seal(f(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),e1=!0,e3=!0,e2=!1,e9=!0,e4=!1,e6=!0,e5=!1,e7=!1,e8=null,te=null,tt=!1,tn=!1,tr=!1,ti=!1,tl=!0,to=!1,ta="user-content-",ts=!0,tc=!1,tu={},tp=null,th=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),tf=null,td=M({},["audio","video","img","source","image","track"]),tg=null,tm=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tk="http://www.w3.org/1998/Math/MathML",tb="http://www.w3.org/2000/svg",tx="http://www.w3.org/1999/xhtml",ty=tx,tw=!1,tS=null,tT=M({},[tk,tb,tx],A),tA=p(["mi","mo","mn","ms","mtext"]),t_=M({},tA),tR=p(["annotation-xml"]),tE=M({},tR),tv=M({},["title","style","font","a","script"]),tz=null,t$=["application/xhtml+xml","text/html"],tC=null,tP=null,tI=l.createElement("form"),tO=function(e){return e instanceof RegExp||e instanceof Function},tD=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(tP&&tP===e)return;e&&"object"==typeof e||(e={}),e=B(e),tC="application/xhtml+xml"===(tz=-1===t$.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE)?A:T,eG=eb(e,"ALLOWED_TAGS",eY,{transform:tC}),eQ=eb(e,"ALLOWED_ATTR",eX,{transform:tC}),tS=eb(e,"ALLOWED_NAMESPACES",tT,{transform:A}),tg=eb(e,"ADD_URI_SAFE_ATTR",tm,{transform:tC,base:tm}),tf=eb(e,"ADD_DATA_URI_TAGS",td,{transform:tC,base:td}),tp=eb(e,"FORBID_CONTENTS",th,{transform:tC}),eV=eb(e,"FORBID_TAGS",B({}),{transform:tC}),eJ=eb(e,"FORBID_ATTR",B({}),{transform:tC}),tu=!!I(e,"USE_PROFILES")&&(e.USE_PROFILES&&"object"==typeof e.USE_PROFILES?B(e.USE_PROFILES):e.USE_PROFILES),e1=!1!==e.ALLOW_ARIA_ATTR,e3=!1!==e.ALLOW_DATA_ATTR,e2=e.ALLOW_UNKNOWN_PROTOCOLS||!1,e9=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,e4=e.SAFE_FOR_TEMPLATES||!1,e6=!1!==e.SAFE_FOR_XML,e5=e.WHOLE_DOCUMENT||!1,tn=e.RETURN_DOM||!1,tr=e.RETURN_DOM_FRAGMENT||!1,ti=e.RETURN_TRUSTED_TYPE||!1,tt=e.FORCE_BODY||!1,tl=!1!==e.SANITIZE_DOM,to=e.SANITIZE_NAMED_PROPS||!1,ts=!1!==e.KEEP_CONTENT,tc=e.IN_PLACE||!1,eW=!function(e){try{return D(e,""),!0}catch(e){return!1}}(e.ALLOWED_URI_REGEXP)?er:e.ALLOWED_URI_REGEXP,ty="string"==typeof e.NAMESPACE?e.NAMESPACE:tx,t_=ex(e,"MATHML_TEXT_INTEGRATION_POINTS",()=>M({},tA)),tE=ex(e,"HTML_INTEGRATION_POINTS",()=>M({},tR));let r=ex(e,"CUSTOM_ELEMENT_HANDLING",()=>f(null));if(eK=f(null),I(r,"tagNameCheck")&&tO(r.tagNameCheck)&&(eK.tagNameCheck=r.tagNameCheck),I(r,"attributeNameCheck")&&tO(r.attributeNameCheck)&&(eK.attributeNameCheck=r.attributeNameCheck),I(r,"allowCustomizedBuiltInElements")&&"boolean"==typeof r.allowCustomizedBuiltInElements&&(eK.allowCustomizedBuiltInElements=r.allowCustomizedBuiltInElements),h(eK),e4&&(e3=!1),tr&&(tn=!0),tu&&(eG=M({},G),eQ=f(null),!0===tu.html&&(M(eG,F),M(eQ,Y)),!0===tu.svg&&(M(eG,j),M(eQ,Q),M(eQ,K)),!0===tu.svgFilters&&(M(eG,q),M(eQ,Q),M(eQ,K)),!0===tu.mathMl&&(M(eG,Z),M(eQ,X),M(eQ,K))),e0.tagCheck=null,e0.attributeCheck=null,I(e,"ADD_TAGS")&&("function"==typeof e.ADD_TAGS?e0.tagCheck=e.ADD_TAGS:S(e.ADD_TAGS)&&(eG===eY&&(eG=B(eG)),M(eG,e.ADD_TAGS,tC))),I(e,"ADD_ATTR")&&("function"==typeof e.ADD_ATTR?e0.attributeCheck=e.ADD_ATTR:S(e.ADD_ATTR)&&(eQ===eX&&(eQ=B(eQ)),M(eQ,e.ADD_ATTR,tC))),I(e,"ADD_FORBID_CONTENTS")&&S(e.ADD_FORBID_CONTENTS)&&(tp===th&&(tp=B(tp)),M(tp,e.ADD_FORBID_CONTENTS,tC)),ts&&(eG["#text"]=!0),e5&&M(eG,["html","head","body"]),eG.table&&(M(eG,["tbody"]),delete eV.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let n=t;t=e.TRUSTED_TYPES_POLICY;try{eI=eL("")}catch(e){throw t=n,e}}else null===e.TRUSTED_TYPES_POLICY?(t=void 0,eI=""):(void 0===t&&(eO||(n=em(L,s),eO=!0),t=n),t&&"string"==typeof eI&&(eI=eL("")));p&&p(e),tP=e},tN=M({},[...j,...q,...H]),tL=M({},[...Z,...W]),tM=function(e){var t,n,r;let i=e_(e);i&&i.tagName||(i={namespaceURI:ty,tagName:"template"});let l=T(e.tagName),o=T(i.tagName);return!!tS[e.namespaceURI]&&(e.namespaceURI===tb?(t=i).namespaceURI===tx?"svg"===l:t.namespaceURI===tk?"svg"===l&&("annotation-xml"===o||t_[o]):!!tN[l]:e.namespaceURI===tk?(n=i).namespaceURI===tx?"math"===l:n.namespaceURI===tb?"math"===l&&tE[o]:!!tL[l]:e.namespaceURI===tx?((r=i).namespaceURI!==tb||!!tE[o])&&(r.namespaceURI!==tk||!!t_[o])&&!tL[l]&&(tv[l]||!tN[l]):"application/xhtml+xml"===tz&&!!tS[e.namespaceURI])},tB=function(e){y(i.removed,{element:e});try{e_(e).removeChild(e)}catch(t){if(ew(e),!e_(e))throw N("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tU=function(e,t,n){try{eS(e,t)}catch(t){try{e.removeAttribute(n)}catch(e){}}},tF=function(e){tH(e);let t=eA(e);if(t){let e=[];k(t,t=>{y(e,t)}),k(e,e=>{try{ew(e)}catch(e){}})}let n=eE(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;"string"==typeof i&&tU(e,r,i)}},tj=function(e,t,n){if(!n)try{n=t.getAttributeNode(e)}catch(e){n=null}y(i.removed,{attribute:n||null,from:t});try{n?eS(t,n):t.removeAttribute(e)}catch(n){try{t.removeAttribute(e)}catch(e){}}if("is"===e)if(tn||tr)try{tB(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},tq=function(e){let t=eE(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;"string"!=typeof i||eQ[tC(i)]||tU(e,r,i)}},tH=function(e){let t=[e];for(;t.length>0;){let e=t.pop();eC(e)===eh.element&&tq(e);let n=eA(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},tZ=function(e,t){return!!e6&&("patchsrc"===e||"for"===e&&"label"!==t&&"output"!==t)},tW=function(e){if(!e6)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=eC(e);if(n===eh.processingInstruction||n===eh.comment&&D(ec,e.data)){try{ew(e)}catch(e){}continue}if(n===eh.element){let t=tC(eP(e));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&tZ("for",t)&&e.removeAttribute("for")}catch(e){}}let r=eA(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},tG=function(e){let n=null,r=null;if(tt)e="<remove></remove>"+e;else{let t=_(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===tz&&ty===tx&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let i=t?eL(e):e;if(ty===tx)try{n=new m().parseFromString(i,tz)}catch(e){}if(!n||!n.documentElement){n=eU.createDocument(ty,"template",null);try{n.documentElement.innerHTML=tw?eI:i}catch(e){}}let o=n.body||n.documentElement;return(e&&r&&o.insertBefore(l.createTextNode(r),o.childNodes[0]||null),ty===tx)?eq.call(n,e5?"html":"body")[0]:e5?n.documentElement:o},tY=function(e){let t=e$?e$(e):e.ownerDocument;return eF.call(t||e,e,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},tQ=function(e){return e=R(e,V," "),e=R(e,J," "),e=R(e,ee," ")},tX=function(e){var t;e.normalize();let n=e$?e$(e):e.ownerDocument,r=eF.call(n||e,e,g.SHOW_TEXT|g.SHOW_COMMENT|g.SHOW_CDATA_SECTION|g.SHOW_PROCESSING_INSTRUCTION,null),i=r.nextNode();for(;i;)i.data=tQ(i.data),i=r.nextNode();let l=null==(t=e.querySelectorAll)?void 0:t.call(e,"template");l&&k(l,e=>{tV(e.content)&&tX(e.content)})},tK=function(e){let t=ez?ez(e):null;return"string"==typeof t&&"form"===tC(t)&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||e.attributes!==eE(e)||"function"!=typeof e.removeAttribute||"function"!=typeof e.removeAttributeNode||"function"!=typeof e.getAttributeNode||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes||e.nodeType!==ev(e)||e.childNodes!==eA(e))},tV=function(e){if(!ev||"object"!=typeof e||null===e)return!1;try{return ev(e)===eh.documentFragment}catch(e){return!1}},tJ=function(e){if(!ev||"object"!=typeof e||null===e)return!1;try{return"number"==typeof ev(e)}catch(e){return!1}};function t0(e,t,n){0!==e.length&&k(e,e=>{e.call(i,t,n,tP)})}let t1=function(e,t){if(e instanceof RegExp)return D(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},t3=function(e,t,n){if(!eV[t]&&t7(t)&&t1(eK.tagNameCheck,t))return!1;if(ts&&!tp[t]){let t=e_(e),r=eA(e);if(r&&t){let i=r.length;for(let l=i-1;l>=0;--l){let i=e===n?ey(r[l],!0):r[l];t.insertBefore(i,eT(e))}}}return tB(e),!0},t2=function(e,t,n,r){return 0===e.length?t:t===n||t===r?B(t):t},t9=function(e,t){return e!==t&&null===e_(e)&&(tc&&tH(e),!0)},t4=function(e,t){if(t0(eZ.beforeSanitizeElements,e,null),t9(e,t))return!0;if(tK(e))return tB(e),!0;let n=tC(eP(e));if(eG=t2(eZ.uponSanitizeElement,eG,eY,e8),t0(eZ.uponSanitizeElement,e,{tagName:n,allowedTags:eG}),t9(e,t))return!0;if(e6&&e.hasChildNodes()&&!tJ(e.firstElementChild)&&D(es,e.textContent)&&D(es,e.innerHTML)||e6&&e.namespaceURI===tx&&ed[n]&&(tJ(e.firstElementChild)||"string"==typeof e.textContent&&D(eg[n],e.textContent))||e.nodeType===eh.processingInstruction||e6&&e.nodeType===eh.comment&&D(ec,e.data))return tB(e),!0;if(eV[n]||!(e0.tagCheck instanceof Function&&e0.tagCheck(n))&&!eG[n]){let r=t3(e,n,t);return!!(!1===r&&(t0(eZ.afterSanitizeElements,e,null),t9(e,t)))||r}if(eC(e)===eh.element&&!tM(e)||("noscript"===n||"noembed"===n||"noframes"===n)&&D(eu,e.innerHTML))return tB(e),!0;if(e4&&e.nodeType===eh.text){let t=tQ(e.textContent);e.textContent!==t&&(y(i.removed,{element:e.cloneNode()}),e.textContent=t)}return t0(eZ.afterSanitizeElements,e,null),t9(e,t)},t6=function(e,t,n){if(eJ[t]||tZ(t,e)||tl&&("id"===t||"name"===t)&&(n in l||n in tI))return!1;let r=eQ[t]||e0.attributeCheck instanceof Function&&e0.attributeCheck(t,e);return!!(e3&&D(et,t)||e1&&D(en,t))||(r?!(!(tg[t]||D(eW,R(n,el,"")))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!tf[e])&&(!e2||D(ei,R(n,el,""))))||!n:t7(e)&&t1(eK.tagNameCheck,e)&&t1(eK.attributeNameCheck,t,e)||"is"===t&&eK.allowCustomizedBuiltInElements&&t1(eK.tagNameCheck,n))},t5=M({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),t7=function(e){return!t5[T(e)]&&D(ea,e)},t8=function(e,n,r,i){if(t&&"object"==typeof L&&"function"==typeof L.getAttributeType&&!r)switch(L.getAttributeType(e,n)){case"TrustedHTML":return eL(i);case"TrustedScriptURL":return eM(i)}return i},ne=function(e,t,n,r){try{if(n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),tK(e))return tB(e),!1;return!0}catch(n){return tj(t,e),!1}},nt=function(e,t){if(t0(eZ.beforeSanitizeAttributes,e,null),t9(e,t))return;let n=e.attributes;if(!n||tK(e))return;let r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:eQ=t2(eZ.uponSanitizeAttribute,eQ,eX,te),forceKeepAttr:void 0},l=n.length,o=tC(e.nodeName);for(;l--;){let t=n[l],a=t.name,s=t.namespaceURI,c=t.value,u=tC(a),p="value"===a?c:v(c),h=!1;if(r.attrName=u,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,t0(eZ.uponSanitizeAttribute,e,r),p=r.attrValue,to&&("id"===u||"name"===u)&&0!==E(p,ta)&&(tj(a,e,t),p=ta+p,h=!0),e6&&D(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,p)||"attributename"===u&&_(p,"href")){tj(a,e,t);continue}if(!r.forceKeepAttr){if(!r.keepAttr||!e9&&D(ep,p)||(e4&&(p=tQ(p)),!t6(o,u,p))){tj(a,e,t);continue}(p=t8(o,u,s,p))!==c&&ne(e,a,s,p)&&h&&x(i.removed)}}t0(eZ.afterSanitizeAttributes,e,null),t9(e,t)},nn=function(e){let t=null,n=tY(e);for(t0(eZ.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(t0(eZ.uponSanitizeShadowNode,t,null),t4(t,e),nt(t,e),tV(t.content)&&nn(t.content),eC(t)===eh.element){let e=eR(t);tV(e)&&(nr(e),nn(e))}t0(eZ.afterSanitizeShadowDOM,e,null)},nr=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){nn(e.shadow);continue}let n=e.node,r=eC(n)===eh.element,i=eA(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=ez?ez(n):null;if("string"==typeof e&&"template"===tC(e)){let e=n.content;tV(e)&&t.push({node:e,shadow:null})}}if(r){let e=eR(n);tV(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return i.sanitize=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,l=null,o=null,s=null;if((tw=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!tJ(e)&&"string"!=typeof(e=function(e){switch(typeof e){case"string":return e;case"number":return z(e);case"boolean":return $(e);case"bigint":return C?C(e):"0";case"symbol":return P?P(e):"Symbol()";case"undefined":default:return O(e);case"function":case"object":{if(null===e)return O(e);let t=U(e,"toString");if("function"==typeof t){let n=t(e);return"string"==typeof n?n:O(n)}return O(e)}}}(e)))throw N("dirty is not a string, aborting");if(!i.isSupported)return e;e7?(eG=e8,eQ=te):tD(n),(eZ.uponSanitizeElement.length>0||eZ.uponSanitizeAttribute.length>0)&&(eG=B(eG)),eZ.uponSanitizeAttribute.length>0&&(eQ=B(eQ)),i.removed=[];let c=tc&&"string"!=typeof e&&tJ(e);if(c){tW(e);let t=eP(e);if("string"==typeof t){let n=tC(t);if(!eG[n]||eV[n])throw tF(e),N("root node is forbidden and cannot be sanitized in-place")}if(tK(e))throw tF(e),N("root node is clobbered and cannot be sanitized in-place");try{nr(e)}catch(t){throw tF(e),t}}else if(tJ(e))(l=(r=tG("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType===eh.element&&"BODY"===l.nodeName||"HTML"===l.nodeName?r=l:r.appendChild(l),nr(r);else{if(!tn&&!e4&&!e5&&-1===e.indexOf("<"))return t&&ti?eL(e):e;if(!(r=tG(e)))return tn?null:ti?eI:""}r&&tt&&tB(r.firstChild);let u=c?e:r;try{let e=tY(u);for(;o=e.nextNode();)t4(o,u),nt(o,u),tV(o.content)&&nn(o.content)}catch(t){throw c&&(tF(e),k(i.removed,e=>{e.element&&tH(e.element)})),t}if(c){let t=!1;if(k(i.removed,n=>{n.element&&(n.element===e&&(t=!0),tH(n.element))}),t)throw N("a node selected for removal could not be safely returned; refusing to sanitize in place");return e4&&tX(e),e}if(tn){if(e4&&tX(r),tr)for(s=ej.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(eQ.shadowroot||eQ.shadowrootmode)&&(s=eH.call(a,s,!0)),s}let p=e5?r.outerHTML:r.innerHTML;return e5&&eG["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&D(eo,r.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+p),e4&&(p=tQ(p)),t&&ti?eL(p):p},i.setConfig=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tD(e),e7=!0,e8=eG,te=eQ},i.clearConfig=function(){tP=null,e7=!1,e8=null,te=null,t=n,eI=""},i.isValidAttribute=function(e,t,n){return tP||tD({}),t6(tC(e),tC(t),n)},i.addHook=function(e,t){"function"==typeof t&&I(eZ,e)&&y(eZ[e],t)},i.removeHook=function(e,t){if(I(eZ,e)){if(void 0!==t){let n=b(eZ[e],t);return -1===n?void 0:w(eZ[e],n,1)[0]}return x(eZ[e])}},i.removeHooks=function(e){I(eZ,e)&&(eZ[e]=[])},i.removeAllHooks=function(){eZ=ek()},i}()},4558:(e,t,n)=>{function r(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}n.d(t,{xI:()=>eI});var i=r(),l={exec:()=>null};function o(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function a(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(c.caret,"$1"),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var s=((e="")=>{try{return!!RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),c={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ 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,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,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,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:o(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:o(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:o(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:o(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:o(e=>RegExp(`^ {0,${e}}(?:</?(?:${x})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:o(e=>RegExp(`^ {0,${e}}>`))},u=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,p=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,h=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,f=a(h).replace(/bull/g,p).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}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),d=a(h).replace(/bull/g,p).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}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),g=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,m=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,k=a(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",m).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),b=a(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,p).getRegex(),x="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",y=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,w=a("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",y).replace("tag",x).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),S=e=>a(g).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),T=S(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),A=S(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),_={blockquote:a(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",A).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:k,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:u,html:w,lheading:f,list:b,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:T,table:l,text:/^[^\n]+/},R=a("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex(),E={..._,lheading:d,table:R,paragraph:a(g).replace("hr",u).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",R).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",x).getRegex()},v={..._,html:a(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",y).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:l,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:a(g).replace("hr",u).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",f).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},z=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,$=/[\p{P}\p{S}]/u,C=/[\s\p{P}\p{S}]/u,P=/[^\s\p{P}\p{S}]/u,I=a(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,C).getRegex(),O=/(?!~)[\p{P}\p{S}]/u,D=a(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",s?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),N=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,L=a(N,"u").replace(/punct/g,$).getRegex(),M=a(N,"u").replace(/punct/g,O).getRegex(),B=a(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,"u").replace(/openQuote/g,/[\p{Pi}\p{Ps}"']/u).replace(/punct/g,$).getRegex(),U="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",F=a(U,"gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,C).replace(/punct/g,$).getRegex(),j=a(U,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,O).getRegex(),q=a("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,C).replace(/punct/g,$).getRegex(),H=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,C).replace(/punct/g,$).getRegex(),Z=a("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,C).replace(/punct/g,$).getRegex(),W=a(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,$).getRegex(),G=a("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,P).replace(/punctSpace/g,C).replace(/punct/g,$).getRegex(),Y=a(/\\(punct)/,"gu").replace(/punct/g,$).getRegex(),Q=a(/^<(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(),X=a(y).replace("(?:--\x3e|$)","--\x3e").getRegex(),K=a("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",X).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),V=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,J=a(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",V).getRegex(),ee=a(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",J).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),et=a(/^!?\[(label)\]\[(ref)\]/).replace("label",J).replace("ref",m).getRegex(),en=a(/^!?\[(ref)\](?:\[\])?/).replace("ref",m).getRegex(),er=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,ei=a(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",V).getRegex(),el=a("reflink|nolink(?!\\()","g").replace("reflink",a(/^!?\[(label)\]\[(ref)\]/).replace("label",ei).replace("ref",er).getRegex()).replace("nolink",a(/^!?\[(ref)\](?:\[\])?/).replace("ref",er).getRegex()).getRegex(),eo=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ea=a(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),es={_backpedal:l,anyPunctuation:Y,autolink:Q,blockSkip:D,br:z,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:l,delLDelim:l,delRDelim:l,emStrongLDelim:L,emStrongRDelimAst:F,emStrongRDelimUnd:H,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:ee,nolink:en,punctuation:I,reflink:et,reflinkSearch:el,tag:K,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:l},ec={...es,emStrongLDelim:B,emStrongRDelimAst:q,emStrongRDelimUnd:Z,link:a(/^!?\[(label)\]\((.*?)\)/).replace("label",J).getRegex(),reflink:a(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",J).getRegex()},eu={...es,emStrongRDelimAst:j,emStrongLDelim:M,delLDelim:W,delRDelim:G,url:a(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",ea).replace("protocol",eo).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:a(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",eo).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},ep={...eu,br:a(z).replace("{2,}","*").getRegex(),text:a(eu.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},eh={normal:_,gfm:E,pedantic:v},ef={normal:es,gfm:eu,breaks:ep,pedantic:ec},ed={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},eg=e=>ed[e];function em(e,t){if(t){if(c.escapeTest.test(e))return e.replace(c.escapeReplace,eg)}else if(c.escapeTestNoEncode.test(e))return e.replace(c.escapeReplaceNoEncode,eg);return e}function ek(e){try{e=encodeURI(e).replace(c.percentDecode,"%")}catch{return null}return e}function eb(e,t){let n=e.replace(c.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(c.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(c.slashPipe,"|");return n}function ex(e,t,n){let r=e.length;if(0===r)return"";let i=0;for(;i<r;){let l=e.charAt(r-i-1);if(l!==t||n)if(l!==t&&n)i++;else break;else i++}return e.slice(0,r-i)}function ey(e){let t=e.split(`
3
3
  `),n=t.length-1;for(;n>=0&&c.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
4
4
  `)}function ew(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function eS(e,t){if(-1===e.indexOf(t[0])&&-1===e.indexOf(t[1]))return -1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&--n<0)return r;return n>0?-2:-1}function eT(e,t=0){let n=t,r="";for(let t of e)if(" "===t){let e=4-n%4;r+=" ".repeat(e),n+=e}else r+=t,n++;return r}function eA(e,t,n,r,i){let l=t.href,o=t.title||null,a=e[1].replace(i.other.outputLinkReplace,"$1"),s="!"===e[0].charAt(0);r.state.inLink=!0;let c=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let p=r.inlineTokens(a),h=r.state.linkEmitted;if(r.state.linkEmitted=c,r.state.inLink=!1,!s){if(h){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:s?"image":"link",raw:n,href:l,title:o,text:a,tokens:p}}function e_(e,t,n,r){if(!t.includes("<"))return!1;for(let i=0;i<t.length;i++){if("\\"===t[i]){i++;continue}if("`"===t[i]){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if("<"!==t[i])continue;let l=e.slice(n+i),o=r.inline.tag.exec(l)||r.inline.autolink.exec(l);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var eR=class{options;rules;lexer;constructor(e){this.options=e||i}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=this.options.pedantic?t[0]:ey(t[0]),n=e.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e,codeBlockStyle:"indented",text:n}}}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(`
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8975],{8975:(u,D,F)=>{F.d(D,{search:()=>s});var C=F(4394);let E=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,A=Object.hasOwnProperty;class B{constructor(){this.occurrences,this.reset()}slug(u,D){var F,C;let B=(F=u,C=!0===D,"string"!=typeof F?"":(C||(F=F.toLowerCase()),F.replace(E,"").replace(/ /g,"-"))),e=B;for(;A.call(this.occurrences,B);)this.occurrences[e]++,B=e+"-"+this.occurrences[e];return this.occurrences[B]=0,B}reset(){this.occurrences=Object.create(null)}}var e=(0,C.P$)({"../../node_modules/.pnpm/remove-markdown@0.6.2/node_modules/remove-markdown/index.js"(u,D){D.exports=function(u,D){(D=D||{}).listUnicodeChar=!!D.hasOwnProperty("listUnicodeChar")&&D.listUnicodeChar,D.stripListLeaders=!D.hasOwnProperty("stripListLeaders")||D.stripListLeaders,D.gfm=!D.hasOwnProperty("gfm")||D.gfm,D.useImgAltText=!D.hasOwnProperty("useImgAltText")||D.useImgAltText,D.abbr=!!D.hasOwnProperty("abbr")&&D.abbr,D.replaceLinksWithURL=!!D.hasOwnProperty("replaceLinksWithURL")&&D.replaceLinksWithURL,D.htmlTagsToSkip=D.hasOwnProperty("htmlTagsToSkip")?D.htmlTagsToSkip:[],D.throwError=!!D.hasOwnProperty("throwError")&&D.throwError;var F=u||"";F=F.replace(/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/gm,"");try{D.stripListLeaders&&(F=D.listUnicodeChar?F.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,D.listUnicodeChar+" $1"):F.replace(/^([\s\t]*)([\*\-\+]|\d+\.)\s+/gm,"$1")),D.gfm&&(F=F.replace(/\n={2,}/g,"\n").replace(/~{3}.*\n/g,"").replace(/~~/g,"").replace(/```(?:.*)\n([\s\S]*?)```/g,(u,D)=>D.trim())),D.abbr&&(F=F.replace(/\*\[.*\]:.*\n/,""));let u=/<[^>]*>/g;if(D.htmlTagsToSkip&&D.htmlTagsToSkip.length>0){let F=D.htmlTagsToSkip.join("|");u=RegExp(`<(?!/?(${F})(?=>|s[^>]*>))[^>]*>`,"g")}F=F.replace(u,"").replace(/^[=\-]{2,}\s*$/g,"").replace(/\[\^.+?\](\: .*?$)?/g,"").replace(/\s{0,2}\[.*?\]: .*?$/g,"").replace(/\!\[(.*?)\][\[\(].*?[\]\)]/g,D.useImgAltText?"$1":"").replace(/\[([\s\S]*?)\]\s*[\(\[].*?[\)\]]/g,D.replaceLinksWithURL?"$2":"$1").replace(/^(\n)?\s{0,3}>\s?/gm,"$1").replace(/^\s{1,2}\[(.*?)\]: (\S+)( ".*?")?\s*$/g,"").replace(/^(\n)?\s{0,}#{1,6}\s*( (.+))? +#+$|^(\n)?\s{0,}#{1,6}\s*( (.+))?$/gm,"$1$3$4$6").replace(/([\*]+)(\S)(.*?\S)??\1/g,"$2$3").replace(/(^|\W)([_]+)(\S)(.*?\S)??\2($|\W)/g,"$1$3$4$5").replace(/(`{3,})(.*?)\1/gm,"$2").replace(/`(.+?)`/g,"$1").replace(/~(.*?)~/g,"$1")}catch(F){if(D.throwError)throw F;return console.error("remove-markdown encountered error: %s",F),u}return F}}}),r=(0,C.f1)(e(),1),t=new B;async function s(u,D){let{client:F,vectorStoreId:C,tag:E}=D;return u.trim()?(await F.vectorStores.search({query:u,vector_store_identifiers:[C],top_k:10,filters:{key:"generated_metadata.tag",operator:"eq",value:E},search_options:{return_metadata:!0}})).data.flatMap(u=>{let D=u.generated_metadata,F=D.url||"#",C=D.title||"Untitled",E=[{id:`${u.file_id}-${u.chunk_index}-page`,type:"page",content:C,url:F}],A="text"===u.type?function(u){let D=u.trim();if(!D.startsWith("#"))return"";let F=D.split("\n"),C=F[0]?.trim();return C?(0,r.default)(C,{useImgAltText:!1}):""}(u.text):"";return A&&(t.reset(),E.push({id:`${u.file_id}-${u.chunk_index}-heading`,type:"heading",content:A,url:`${F}#${t.slug(A)}`})),E}):[]}}}]);
@@ -0,0 +1,10 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9013],{1102:(e,t,r)=>{r.d(t,{B:()=>function e(t,r=!1){for(let n in t){if(void 0===t[n]&&delete t[n],!r)continue;let o=t[n];if("object"==typeof o&&null!==o){e(o,r);continue}if(Array.isArray(o))for(let t of o)e(t,r)}return t}})},1223:(e,t,r)=>{function n(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function o(e){let t="string"==typeof e?function(e){let t=e.trim();if(0===t.length)return null;let r=Array.from(new Set(t.split(/\s+/).map(e=>e.trim()).filter(Boolean)));if(0===r.length)return null;let o=r.map(n).join("|");return RegExp(`(${o})`,"gi")}(e):e;return{highlight(e){if(!t)return[{type:"text",content:e}];let r=[],n=0;for(let o of e.matchAll(t))n<o.index&&r.push({type:"text",content:e.substring(n,o.index)}),r.push({type:"text",content:o[0],styles:{highlight:!0}}),n=o.index+o[0].length;return n<e.length&&r.push({type:"text",content:e.substring(n)}),r}}}r.d(t,{r:()=>o})},9013:(e,t,r)=>{r.d(t,{search:()=>tT});var n=r(1102),o=r(1223);let i={arabic:"ar",armenian:"am",bulgarian:"bg",czech:"cz",danish:"dk",dutch:"nl",english:"en",finnish:"fi",french:"fr",german:"de",greek:"gr",hungarian:"hu",indian:"in",indonesian:"id",irish:"ie",italian:"it",lithuanian:"lt",nepali:"np",norwegian:"no",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"rs",slovenian:"ru",spanish:"es",swedish:"se",tamil:"ta",turkish:"tr",ukrainian:"uk",sanskrit:"sk"},s={dutch:/[^A-Za-zàèéìòóù0-9_'-]+/gim,english:/[^A-Za-zàèéìòóù0-9_'-]+/gim,french:/[^a-z0-9äâàéèëêïîöôùüûœç-]+/gim,italian:/[^A-Za-zàèéìòóù0-9_'-]+/gim,norwegian:/[^a-z0-9_æøåÆØÅäÄöÖüÜ]+/gim,portuguese:/[^a-z0-9à-úÀ-Ú]/gim,russian:/[^a-z0-9а-яА-ЯёЁ]+/gim,spanish:/[^a-z0-9A-Zá-úÁ-ÚñÑüÜ]+/gim,swedish:/[^a-z0-9_åÅäÄöÖüÜ-]+/gim,german:/[^a-z0-9A-ZäöüÄÖÜß]+/gim,finnish:/[^a-z0-9äöÄÖ]+/gim,danish:/[^a-z0-9æøåÆØÅ]+/gim,hungarian:/[^a-z0-9áéíóöőúüűÁÉÍÓÖŐÚÜŰ]+/gim,romanian:/[^a-z0-9ăâîșțĂÂÎȘȚ]+/gim,serbian:/[^a-z0-9čćžšđČĆŽŠĐ]+/gim,turkish:/[^a-z0-9çÇğĞıİöÖşŞüÜ]+/gim,lithuanian:/[^a-z0-9ąčęėįšųūžĄČĘĖĮŠŲŪŽ]+/gim,arabic:/[^a-z0-9أ-ي]+/gim,nepali:/[^a-z0-9अ-ह]+/gim,irish:/[^a-z0-9áéíóúÁÉÍÓÚ]+/gim,indian:/[^a-z0-9अ-ह]+/gim,armenian:/[^a-z0-9ա-ֆ]+/gim,greek:/[^a-z0-9α-ωά-ώ]+/gim,indonesian:/[^a-z0-9]+/gim,ukrainian:/[^a-z0-9а-яА-ЯіїєІЇЄ]+/gim,slovenian:/[^a-z0-9螚ȎŠ]+/gim,bulgarian:/[^a-z0-9а-яА-Я]+/gim,tamil:/[^a-z0-9அ-ஹ]+/gim,sanskrit:/[^a-z0-9A-Zāīūṛḷṃṁḥśṣṭḍṇṅñḻḹṝ]+/gim,czech:/[^A-Z0-9a-zěščřžýáíéúůóťďĚŠČŘŽÝÁÍÉÓÚŮŤĎ-]+/gim},l=Object.keys(i);var a=r(5704);let u=Date.now().toString().slice(5),c=0,f=BigInt(1e3),d=BigInt(1e6),h=BigInt(1e9);function p(e,t){if(t.length<65535)Array.prototype.push.apply(e,t);else{let r=t.length;for(let n=0;n<r;n+=65535)Array.prototype.push.apply(e,t.slice(n,n+65535))}}function g(){return BigInt(Math.floor(1e6*performance.now()))}function m(e){return("number"==typeof e&&(e=BigInt(e)),e<f)?`${e}ns`:e<d?`${e/f}μs`:e<h?`${e/d}ms`:`${e/h}s`}function y(){return"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?g():void 0!==a&&a.release&&"node"===a.release.name||void 0!==a&&"function"==typeof a?.hrtime?.bigint?a.hrtime.bigint():"undefined"!=typeof performance?g():BigInt(0)}function b(){return`${u}-${c++}`}function S(e,t){return void 0===Object.hasOwn?Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0:Object.hasOwn(e,t)?e[t]:void 0}function I(e,t){return t[1]===e[1]?e[0]-t[0]:t[1]-e[1]}function w(e,t){let r={},n=t.length;for(let o=0;o<n;o++){let n=t[o],i=n.split("."),s=e,l=i.length;for(let e=0;e<l;e++)if("object"==typeof(s=s[i[e]])){if(null!==s&&"lat"in s&&"lon"in s&&"number"==typeof s.lat&&"number"==typeof s.lon){s=r[n]=s;break}else if(!Array.isArray(s)&&null!==s&&e===l-1){s=void 0;break}}else if((null===s||"object"!=typeof s)&&e<l-1){s=void 0;break}void 0!==s&&(r[n]=s)}return r}function O(e,t){return w(e,[t])[t]}let N={cm:.01,m:1,km:1e3,ft:.3048,yd:.9144,mi:1609.344};function T(e,t){let r=N[t];if(void 0===r)throw Error(M("INVALID_DISTANCE_SUFFIX",e).message);return e*r}function v(e,t){e.hits=e.hits.map(e=>({...e,document:{...e.document,...t.reduce((e,t)=>{let r=t.split("."),n=r.pop(),o=e;for(let e of r)o[e]=o[e]??{},o=o[e];return o[n]=null,e},e.document)}}))}function _(e){return Array.isArray(e)?e.some(e=>_(e)):e?.constructor?.name==="AsyncFunction"}let D="intersection"in new Set;function A(...e){if(0===e.length)return new Set;if(1===e.length)return e[0];if(2===e.length){let t=e[0],r=e[1];if(D)return t.intersection(r);let n=new Set,o=t.size<r.size?t:r,i=o===t?r:t;for(let e of o)i.has(e)&&n.add(e);return n}let t={index:0,size:e[0].size};for(let r=1;r<e.length;r++)e[r].size<t.size&&(t.index=r,t.size=e[r].size);if(D){let r=e[t.index];for(let n=0;n<e.length;n++)n!==t.index&&(r=r.intersection(e[n]));return r}let r=e[t.index];for(let n=0;n<e.length;n++){if(n===t.index)continue;let o=e[n];for(let e of r)o.has(e)||r.delete(e)}return r}let E="union"in new Set;function k(e,t){return E?e?e.union(t):t:new Set(e?[...e,...t]:t)}let P=l.join("\n - "),R={NO_LANGUAGE_WITH_CUSTOM_TOKENIZER:"Do not pass the language option to create when using a custom tokenizer.",LANGUAGE_NOT_SUPPORTED:`Language "%s" is not supported.
2
+ Supported languages are:
3
+ - ${P}`,INVALID_STEMMER_FUNCTION_TYPE:"config.stemmer property must be a function.",MISSING_STEMMER:'As of version 1.0.0 @orama/orama does not ship non English stemmers by default. To solve this, please explicitly import and specify the "%s" stemmer from the package @orama/stemmers. See https://docs.orama.com/docs/orama-js/text-analysis/stemming for more information.',CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY:"Custom stop words array must only contain strings.",UNSUPPORTED_COMPONENT:'Unsupported component "%s".',COMPONENT_MUST_BE_FUNCTION:'The component "%s" must be a function.',COMPONENT_MUST_BE_FUNCTION_OR_ARRAY_FUNCTIONS:'The component "%s" must be a function or an array of functions.',INVALID_SCHEMA_TYPE:'Unsupported schema type "%s" at "%s". Expected "string", "boolean" or "number" or array of them.',DOCUMENT_ID_MUST_BE_STRING:'Document id must be of type "string". Got "%s" instead.',DOCUMENT_ALREADY_EXISTS:'A document with id "%s" already exists.',DOCUMENT_DOES_NOT_EXIST:'A document with id "%s" does not exists.',MISSING_DOCUMENT_PROPERTY:'Missing searchable property "%s".',INVALID_DOCUMENT_PROPERTY:'Invalid document property "%s": expected "%s", got "%s"',UNKNOWN_INDEX:'Invalid property name "%s". Expected a wildcard string ("*") or array containing one of the following properties: %s',INVALID_BOOST_VALUE:"Boost value must be a number greater than, or less than 0.",INVALID_FILTER_OPERATION:"You can only use one operation per filter, you requested %d.",SCHEMA_VALIDATION_FAILURE:'Cannot insert document due schema validation failure on "%s" property.',INVALID_SORT_SCHEMA_TYPE:'Unsupported sort schema type "%s" at "%s". Expected "string" or "number".',CANNOT_SORT_BY_ARRAY:'Cannot configure sort for "%s" because it is an array (%s).',UNABLE_TO_SORT_ON_UNKNOWN_FIELD:'Unable to sort on unknown field "%s". Allowed fields: %s',SORT_DISABLED:"Sort is disabled. Please read the documentation at https://docs.orama.com/docs/orama-js for more information.",UNKNOWN_GROUP_BY_PROPERTY:'Unknown groupBy property "%s".',INVALID_GROUP_BY_PROPERTY:'Invalid groupBy property "%s". Allowed types: "%s", but given "%s".',UNKNOWN_FILTER_PROPERTY:'Unknown filter property "%s".',UNKNOWN_VECTOR_PROPERTY:'Unknown vector property "%s". Make sure the property exists in the schema and is configured as a vector.',INVALID_VECTOR_SIZE:'Vector size must be a number greater than 0. Got "%s" instead.',INVALID_VECTOR_VALUE:'Vector value must be a number greater than 0. Got "%s" instead.',INVALID_INPUT_VECTOR:`Property "%s" was declared as a %s-dimensional vector, but got a %s-dimensional vector instead.
4
+ Input vectors must be of the size declared in the schema, as calculating similarity between vectors of different sizes can lead to unexpected results.`,WRONG_SEARCH_PROPERTY_TYPE:'Property "%s" is not searchable. Only "string" properties are searchable.',FACET_NOT_SUPPORTED:'Facet doens\'t support the type "%s".',INVALID_DISTANCE_SUFFIX:'Invalid distance suffix "%s". Valid suffixes are: cm, m, km, mi, yd, ft.',INVALID_SEARCH_MODE:'Invalid search mode "%s". Valid modes are: "fulltext", "vector", "hybrid".',MISSING_VECTOR_AND_SECURE_PROXY:"No vector was provided and no secure proxy was configured. Please provide a vector or configure an Orama Secure Proxy to perform hybrid search.",MISSING_TERM:'"term" is a required parameter when performing hybrid search. Please provide a search term.',INVALID_VECTOR_INPUT:'Invalid "vector" property. Expected an object with "value" and "property" properties, but got "%s" instead.',PLUGIN_CRASHED:"A plugin crashed during initialization. Please check the error message for more information:",PLUGIN_SECURE_PROXY_NOT_FOUND:`Could not find '@orama/secure-proxy-plugin' installed in your Orama instance.
5
+ Please install it before proceeding with creating an answer session.
6
+ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy
7
+ `,PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL:`Could not find a chat model defined in the secure proxy plugin configuration.
8
+ Please provide a chat model before proceeding with creating an answer session.
9
+ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy
10
+ `,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:"The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.",PLUGIN_COMPONENT_CONFLICT:'The component "%s" is already defined. The plugin "%s" is trying to redefine it.'};function M(e,...t){let r=Error(function(e,...t){return e.replace(/%(?:(?<position>\d+)\$)?(?<width>-?\d*\.?\d*)(?<type>[dfs])/g,function(...e){let{width:r,type:n,position:o}=e[e.length-1],i=o?t[Number.parseInt(o)-1]:t.shift(),s=""===r?0:Number.parseInt(r);switch(n){case"d":return i.toString().padStart(s,"0");case"f":{let e=i,[t,n]=r.split(".").map(e=>Number.parseFloat(e));return"number"==typeof n&&n>=0&&(e=e.toFixed(n)),"number"==typeof t&&t>=0?e.toString().padStart(s,"0"):e.toString()}case"s":return s<0?i.toString().padEnd(-s," "):i.toString().padStart(s," ");default:return i}})}(R[e]??`Unsupported Orama Error code: ${e}`,...t));return r.code=e,"captureStackTrace"in Error.prototype&&Error.captureStackTrace(r),r}function x(e){return{raw:Number(e),formatted:m(e)}}function C(e){if(e.id){if("string"!=typeof e.id)throw M("DOCUMENT_ID_MUST_BE_STRING",typeof e.id);return e.id}return b()}let U={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},z={"string[]":"string","number[]":"number","boolean[]":"boolean","enum[]":"enum"};function L(e){return"string"==typeof e&&/^vector\[\d+\]$/.test(e)}function B(e){return"string"==typeof e&&U[e]}function V(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw M("INVALID_VECTOR_VALUE",e);case t<=0:throw M("INVALID_VECTOR_SIZE",e);default:return t}}function W(e){return{internalIdToId:e.internalIdToId}}function j(e,t){let{internalIdToId:r}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let n=r.length;for(let t=0;t<n;t++){let n=r[t];e.internalDocumentIDStore.idToInternalId.set(n,t+1),e.internalDocumentIDStore.internalIdToId.push(n)}}function F(e,t){if("string"==typeof t){let r=e.idToInternalId.get(t);if(r)return r;let n=e.idToInternalId.size+1;return e.idToInternalId.set(t,n),e.internalIdToId.push(t),n}return t>e.internalIdToId.length?F(e,t.toString()):t}function $(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function G(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function J(e,t){let r=F(e.sharedInternalDocumentStore,t);return e.docs[r]}function Y(e,t){let r=t.length,n=Array.from({length:r});for(let o=0;o<r;o++){let r=F(e.sharedInternalDocumentStore,t[o]);n[o]=e.docs[r]}return n}function H(e){return e.docs}function K(e,t,r,n){return void 0===e.docs[r]&&(e.docs[r]=n,e.count++,!0)}function q(e,t){let r=F(e.sharedInternalDocumentStore,t);return void 0!==e.docs[r]&&(delete e.docs[r],e.count--,!0)}function X(e){return e.count}function Z(e,t){return{docs:t.docs,count:t.count,sharedInternalDocumentStore:e}}function Q(e){return{docs:e.docs,count:e.count}}let ee=["beforeInsert","afterInsert","beforeRemove","afterRemove","beforeUpdate","afterUpdate","beforeUpsert","afterUpsert","beforeSearch","afterSearch","beforeInsertMultiple","afterInsertMultiple","beforeRemoveMultiple","afterRemoveMultiple","beforeUpdateMultiple","afterUpdateMultiple","beforeUpsertMultiple","afterUpsertMultiple","beforeLoad","afterLoad","afterCreate"],et=["tokenizer","index","documentsStore","sorter","pinning"],er=["validateSchema","getDocumentIndexId","getDocumentProperties","formatElapsedTime"];function en(e,t,r,n,o){if(e.some(_))return(async()=>{for(let i of e)await i(t,r,n,o)})();for(let i of e)i(t,r,n,o)}function eo(e,t,r,n){if(e.some(_))return(async()=>{for(let o of e)await o(t,r,n)})();for(let o of e)o(t,r,n)}class ei{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(ei.getHeight(this.l),ei.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return ei.getHeight(this.l)-ei.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(e){let t=new ei(e.k,e.v);return t.l=e.l?ei.fromJSON(e.l):null,t.r=e.r?ei.fromJSON(e.r):null,t.h=e.h,t}}class es{root=null;insertCount=0;constructor(e,t){void 0!==e&&void 0!==t&&(this.root=new ei(e,t))}insert(e,t,r=1e3){this.root=this.insertNode(this.root,e,t,r)}insertMultiple(e,t,r=1e3){for(let n of t)this.insert(e,n,r)}rebalance(){this.root&&(this.root=this.rebalanceNode(this.root))}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(e){let t=new es;return t.root=e.root?ei.fromJSON(e.root):null,t.insertCount=e.insertCount||0,t}insertNode(e,t,r,n){if(null===e)return new ei(t,[r]);let o=[],i=e,s=null;for(;null!==i;)if(o.push({parent:s,node:i}),t<i.k)if(null===i.l){i.l=new ei(t,[r]),o.push({parent:i,node:i.l});break}else s=i,i=i.l;else if(!(t>i.k))return i.v.add(r),e;else if(null===i.r){i.r=new ei(t,[r]),o.push({parent:i,node:i.r});break}else s=i,i=i.r;let l=!1;this.insertCount++%n==0&&(l=!0);for(let t=o.length-1;t>=0;t--){let{parent:r,node:n}=o[t];if(n.updateHeight(),l){let t=this.rebalanceNode(n);r?r.l===n?r.l=t:r.r===n&&(r.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();else if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&0>=e.r.getBalanceFactor())return e.rotateLeft();else if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return null!==this.find(e)}getSize(){let e=0,t=[],r=this.root;for(;r||t.length>0;){for(;r;)t.push(r),r=r.l;r=t.pop(),e++,r=r.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop();if(Math.abs(t.getBalanceFactor())>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let r=this.findNodeByKey(e);r&&(1===r.v.size?this.root=this.removeNode(this.root,e):r.v=new Set([...r.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else{if(!(e>t.k))return t;t=t.r}return null}removeNode(e,t){if(null===e)return null;let r=[],n=e;for(;null!==n&&n.k!==t;)r.push(n),n=t<n.k?n.l:n.r;if(null===n)return e;if(null===n.l||null===n.r){let t=n.l?n.l:n.r;if(0===r.length)e=t;else{let e=r[r.length-1];e.l===n?e.l=t:e.r=t}}else{let e=n,t=n.r;for(;null!==t.l;)e=t,t=t.l;n.k=t.k,n.v=t.v,e.l===t?e.l=t.r:e.r=t.r,n=e}r.push(n);for(let t=r.length-1;t>=0;t--){let n=r[t];n.updateHeight();let o=this.rebalanceNode(n);if(t>0){let e=r[t-1];e.l===n?e.l=o:e.r===n&&(e.r=o)}else e=o}return e}rangeSearch(e,t){let r=new Set,n=[],o=this.root;for(;o||n.length>0;){for(;o;)n.push(o),o=o.l;if((o=n.pop()).k>=e&&o.k<=t)for(let e of o.v)r.add(e);if(o.k>t)break;o=o.r}return r}greaterThan(e,t=!1){let r=new Set,n=[],o=this.root;for(;o||n.length>0;){for(;o;)n.push(o),o=o.r;if(o=n.pop(),t&&o.k>=e||!t&&o.k>e)for(let e of o.v)r.add(e);else if(o.k<=e)break;o=o.l}return r}lessThan(e,t=!1){let r=new Set,n=[],o=this.root;for(;o||n.length>0;){for(;o;)n.push(o),o=o.l;if(o=n.pop(),t&&o.k<=e||!t&&o.k<e)for(let e of o.v)r.add(e);else if(o.k>e)break;o=o.r}return r}}class el{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let r=this.numberToDocumentId.get(t);r&&(r.delete(e),0===r.size&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(1!==t.length)throw Error("Invalid operation");let r=t[0];switch(r){case"eq":{let t=e[r],n=this.numberToDocumentId.get(t);return n?Array.from(n):[]}case"in":{let t=e[r],n=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)n.add(e)}return Array.from(n)}case"nin":{let t=new Set(e[r]),n=new Set;for(let[e,r]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of r)n.add(e);return Array.from(n)}default:throw Error("Invalid operation")}}filterArr(e){let t=Object.keys(e);if(1!==t.length)throw Error("Invalid operation");let r=t[0];switch(r){case"containsAll":{let t=e[r].map(e=>this.numberToDocumentId.get(e)??new Set);if(0===t.length)return[];return Array.from(t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e)))))}case"containsAny":{let t=e[r].map(e=>this.numberToDocumentId.get(e)??new Set);if(0===t.length)return[];return Array.from(t.reduce((e,t)=>new Set([...e,...t])))}default:throw Error("Invalid operation")}}static fromJSON(e){if(!e.numberToDocumentId)throw Error("Invalid Flat Tree JSON");let t=new el;for(let[r,n]of e.numberToDocumentId)t.numberToDocumentId.set(r,new Set(n));return t}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}}function ea(e,t,r){let n=function(e,t,r){if(r<0)return -1;if(e===t)return 0;let n=e.length,o=t.length;if(0===n)return o<=r?o:-1;if(0===o)return n<=r?n:-1;let i=Math.abs(n-o);if(e.startsWith(t))return i<=r?i:-1;if(t.startsWith(e))return 0;if(i>r)return -1;let s=[];for(let e=0;e<=n;e++){s[e]=[e];for(let t=1;t<=o;t++)s[e][t]=0===e?t:0}for(let i=1;i<=n;i++){let n=1/0;for(let r=1;r<=o;r++)e[i-1]===t[r-1]?s[i][r]=s[i-1][r-1]:s[i][r]=Math.min(s[i-1][r]+1,s[i][r-1]+1,s[i-1][r-1]+1),n=Math.min(n,s[i][r]);if(n>r)return -1}return s[n][o]<=r?s[n][o]:-1}(e,t,r);return{distance:n,isBounded:n>=0}}class eu{k;s;c=new Map;d=new Set;e;w="";constructor(e,t,r){this.k=e,this.s=t,this.e=r}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,r,n){let o=[this];for(;o.length>0;){let i=o.pop();if(i.e){let{w:o,d:s}=i;if(r&&o!==t)continue;if(null!==S(e,o))if(n){if(!(Math.abs(t.length-o.length)<=n)||!ea(t,o,n).isBounded)continue;e[o]=[]}else e[o]=[];if(null!=S(e,o)&&s.size>0){let t=e[o];for(let e of s)t.includes(e)||t.push(e)}}i.c.size>0&&o.push(...i.c.values())}return e}insert(e,t){let r=this,n=0,o=e.length;for(;n<o;){let i=e[n],s=r.c.get(i);if(s){let i=s.s,l=i.length,a=0;for(;a<l&&n+a<o&&i[a]===e[n+a];)a++;if(a===l){if(r=s,(n+=a)===o){s.e||(s.e=!0),s.addDocument(t);return}continue}let u=i.slice(0,a),c=i.slice(a),f=e.slice(n+a),d=new eu(u[0],u,!1);if(r.c.set(u[0],d),d.updateParent(r),s.s=c,s.k=c[0],d.c.set(c[0],s),s.updateParent(d),f){let e=new eu(f[0],f,!0);e.addDocument(t),d.c.set(f[0],e),e.updateParent(d)}else d.e=!0,d.addDocument(t);return}{let o=new eu(i,e.slice(n),!0);o.addDocument(t),r.c.set(i,o),o.updateParent(r);return}}r.e||(r.e=!0),r.addDocument(t)}_findLevenshtein(e,t,r,n,o){let i=[{node:this,index:t,tolerance:r}];for(;i.length>0;){let{node:t,index:r,tolerance:s}=i.pop();if(t.w.startsWith(e)){t.findAllWords(o,e,!1,0);continue}if(s<0)continue;if(t.e){let{w:r,d:i}=t;if(r&&(ea(e,r,n).isBounded&&(o[r]=[]),void 0!==S(o,r)&&i.size>0)){let e=new Set(o[r]);for(let t of i)e.add(t);o[r]=Array.from(e)}}if(r>=e.length)continue;let l=e[r];if(t.c.has(l)){let e=t.c.get(l);i.push({node:e,index:r+1,tolerance:s})}for(let[e,n]of(i.push({node:t,index:r+1,tolerance:s-1}),t.c))i.push({node:n,index:r,tolerance:s-1}),e!==l&&i.push({node:n,index:r+1,tolerance:s-1})}}find(e){let{term:t,exact:r,tolerance:n}=e;if(n&&!r){let e={};return this._findLevenshtein(t,0,n,n,e),e}{let e=this,o=0,i=t.length;for(;o<i;){let s=t[o],l=e.c.get(s);if(!l)return{};{let s=l.s,a=s.length,u=0;for(;u<a&&o+u<i&&s[u]===t[o+u];)u++;if(u===a)e=l,o+=u;else{if(o+u!==i||u!==i-o||r)return{};let e={};return l.findAllWords(e,t,r,n),e}}}let s={};return e.findAllWords(s,t,r,n),s}}contains(e){let t=this,r=0,n=e.length;for(;r<n;){let o=e[r],i=t.c.get(o);if(!i)return!1;{let o=i.s,s=o.length,l=0;for(;l<s&&r+l<n&&o[l]===e[r+l];)l++;if(l<s)return!1;r+=s,t=i}}return!0}removeWord(e){if(!e)return!1;let t=this,r=e.length,n=[];for(let o=0;o<r;o++){let r=e[o];if(!t.c.has(r))return!1;{let e=t.c.get(r);n.push({parent:t,character:r}),o+=e.s.length-1,t=e}}for(t.d.clear(),t.e=!1;n.length>0&&0===t.c.size&&!t.e&&0===t.d.size;){let{parent:e,character:r}=n.pop();e.c.delete(r),t=e}return!0}removeDocumentByWord(e,t,r=!0){if(!e)return!0;let n=this,o=e.length;for(let i=0;i<o;i++){let o=e[i];if(!n.c.has(o))return!1;{let s=n.c.get(o);i+=s.s.length-1,n=s,r&&n.w!==e||n.removeDocument(t)}}return!0}static getCommonPrefix(e,t){let r=Math.min(e.length,t.length),n=0;for(;n<r&&e.charCodeAt(n)===t.charCodeAt(n);)n++;return e.slice(0,n)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(e){let t=new eu(e.k,e.s,e.e);return t.w=e.w,t.d=new Set(e.d),t.c=new Map(e?.c?.map(([e,t])=>[e,eu.fromJSON(t)])||[]),t}}class ec extends eu{constructor(){super("","",!1)}static fromJSON(e){let t=new ec;return t.w=e.w,t.s=e.s,t.e=e.e,t.k=e.k,t.d=new Set(e.d),t.c=new Map(e?.c?.map(([e,t])=>[e,eu.fromJSON(t)])||[]),t}toJSON(){return super.toJSON()}}class ef{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(e,t=null){let r=new ef(e.point,e.docIDs);return r.parent=t,e.left&&(r.left=ef.fromJSON(e.left,r)),e.right&&(r.right=ef.fromJSON(e.right,r)),r}}class ed{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let r=this.getPointKey(e),n=this.nodeMap.get(r);if(n)return void t.forEach(e=>n.docIDs.add(e));let o=new ef(e,t);if(this.nodeMap.set(r,o),null==this.root){this.root=o;return}let i=this.root,s=0;for(;;){if(0==s%2)if(e.lon<i.point.lon){if(null==i.left){i.left=o,o.parent=i;return}i=i.left}else{if(null==i.right){i.right=o,o.parent=i;return}i=i.right}else if(e.lat<i.point.lat){if(null==i.left){i.left=o,o.parent=i;return}i=i.left}else{if(null==i.right){i.right=o,o.parent=i;return}i=i.right}s++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),r=this.nodeMap.get(t);return r?Array.from(r.docIDs):null}removeDocByID(e,t){let r=this.getPointKey(e),n=this.nodeMap.get(r);n&&(n.docIDs.delete(t),0===n.docIDs.size&&(this.nodeMap.delete(r),this.deleteNode(n)))}deleteNode(e){let t=e.parent,r=e.left?e.left:e.right;r&&(r.parent=t),t?t.left===e?t.left=r:t.right===e&&(t.right=r):(this.root=r,this.root&&(this.root.parent=null))}searchByRadius(e,t,r=!0,n="asc",o=!1){let i=o?ed.vincentyDistance:ed.haversineDistance,s=[{node:this.root,depth:0}],l=[];for(;s.length>0;){let{node:n,depth:o}=s.pop();if(null==n)continue;let a=i(e,n.point);(r?a<=t:a>t)&&l.push({point:n.point,docIDs:Array.from(n.docIDs)}),null!=n.left&&s.push({node:n.left,depth:o+1}),null!=n.right&&s.push({node:n.right,depth:o+1})}return n&&l.sort((t,r)=>{let o=i(e,t.point),s=i(e,r.point);return"asc"===n.toLowerCase()?o-s:s-o}),l}searchByPolygon(e,t=!0,r=null,n=!1){let o=[{node:this.root,depth:0}],i=[];for(;o.length>0;){let{node:r,depth:n}=o.pop();if(null==r)continue;null!=r.left&&o.push({node:r.left,depth:n+1}),null!=r.right&&o.push({node:r.right,depth:n+1});let s=ed.isPointInPolygon(e,r.point);(s&&t||!s&&!t)&&i.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=ed.calculatePolygonCentroid(e);if(r){let e=n?ed.vincentyDistance:ed.haversineDistance;i.sort((t,n)=>{let o=e(s,t.point),i=e(s,n.point);return"asc"===r.toLowerCase()?o-i:i-o})}return i}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(e){let t=new ed;return e.root&&(t.root=ef.fromJSON(e.root),t.buildNodeMap(t.root)),t}buildNodeMap(e){if(null==e)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,r=0,n=0,o=e.length;for(let i=0,s=o-1;i<o;s=i++){let o=e[i].lon,l=e[i].lat,a=e[s].lon,u=e[s].lat,c=o*u-a*l;t+=c,r+=(o+a)*c,n+=(l+u)*c}let i=6*(t/=2);return{lon:r/=i,lat:n/=i}}static isPointInPolygon(e,t){let r=!1,n=t.lon,o=t.lat,i=e.length;for(let t=0,s=i-1;t<i;s=t++){let i=e[t].lon,l=e[t].lat,a=e[s].lon,u=e[s].lat;l>o!=u>o&&n<(a-i)*(o-l)/(u-l)+i&&(r=!r)}return r}static haversineDistance(e,t){let r=Math.PI/180,n=e.lat*r,o=t.lat*r,i=(t.lat-e.lat)*r,s=(t.lon-e.lon)*r,l=Math.sin(i/2)*Math.sin(i/2)+Math.cos(n)*Math.cos(o)*Math.sin(s/2)*Math.sin(s/2);return 2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))*6371e3}static vincentyDistance(e,t){let r,n,o,i,s,l,a,u=1/298.257223563,c=(1-1/298.257223563)*6378137,f=Math.PI/180,d=e.lat*f,h=t.lat*f,p=(t.lon-e.lon)*f,g=Math.atan((1-u)*Math.tan(d)),m=Math.atan((1-u)*Math.tan(h)),y=Math.sin(g),b=Math.cos(g),S=Math.sin(m),I=Math.cos(m),w=p,O=1e3;do{let e=Math.sin(w),t=Math.cos(w);if(0===(n=Math.sqrt(I*e*(I*e)+(b*S-y*I*t)*(b*S-y*I*t))))return 0;i=Math.atan2(n,o=y*S+b*I*t),isNaN(a=o-2*y*S/(l=1-(s=b*I*e/n)*s))&&(a=0);let c=u/16*l*(4+u*(4-3*l));r=w,w=p+(1-c)*u*s*(i+c*n*(a+c*o*(-1+2*a*a)))}while(Math.abs(w-r)>1e-12&&--O>0);if(0===O)return NaN;let N=l*(0x24ffb2985f71-c*c)/(c*c),T=1+N/16384*(4096+N*(-768+N*(320-175*N))),v=N/1024*(256+N*(-128+N*(74-47*N)));return c*T*(i-v*n*(a+v/4*(o*(-1+2*a*a)-v/6*a*(-3+4*n*n)*(-3+4*a*a))))}}class eh{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(e){let t=new eh;return t.true=new Set(e.true),t.false=new Set(e.false),t}}class ep{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let r=eg(t,this.size);this.vectors.set(e,[r,t])}remove(e){this.vectors.delete(e)}find(e,t,r){return e instanceof Float32Array||(e=new Float32Array(e)),function(e,t,r,n,o){let i=eg(e,n),s=[];for(let l of t||r.keys()){let t=r.get(l);if(!t)continue;let a=t[0],u=t[1],c=0;for(let t=0;t<n;t++)c+=e[t]*u[t];let f=c/(i*a);f>=o&&s.push([l,f])}return s}(e,r,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[r,n]]of this.vectors)e.push([t,[r,Array.from(n)]]);return{size:this.size,vectors:e}}static fromJSON(e){let t=new ep(e.size);for(let[r,[n,o]]of e.vectors)t.vectors.set(r,[n,new Float32Array(o)]);return t}}function eg(e,t){let r=0;for(let n=0;n<t;n++)r+=e[n]*e[n];return Math.sqrt(r)}function em(e,t,r,n,o){let i=F(e.sharedInternalDocumentStore,r);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(o-1)+n.length)/o,e.fieldLengths[t][i]=n.length,e.frequencies[t][i]={}}function ey(e,t,r,n,o){let i=0;for(let e of n)e===o&&i++;let s=F(e.sharedInternalDocumentStore,r),l=i/n.length;e.frequencies[t][s][o]=l,o in e.tokenOccurrences[t]||(e.tokenOccurrences[t][o]=0),e.tokenOccurrences[t][o]=(e.tokenOccurrences[t][o]??0)+1}function eb(e,t,r,n){let o=F(e.sharedInternalDocumentStore,r);n>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*n-e.fieldLengths[t][o])/(n-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][o]=void 0,e.frequencies[t][o]=void 0}function eS(e,t,r){e.tokenOccurrences[t][r]--}function eI(e,t,r,n,o,i,s,l,a,u,c){if(L(s)){var f,d,h,p;return f=t,d=r,h=i,p=o,void f.vectorIndexes[d].node.add(p,h)}let g=n=>{let{type:i,node:s}=t.indexes[r];switch(i){case"Bool":s[n?"true":"false"].add(o);break;case"AVL":{let e=c?.avlRebalanceThreshold??1;s.insert(n,o,e);break}case"Radix":{let i=a.tokenize(n,l,r,!1);for(let n of(e.insertDocumentScoreParameters(t,r,o,i,u),i))e.insertTokenScoreParameters(t,r,o,i,n),s.insert(n,o);break}case"Flat":s.insert(n,o);break;case"BKD":s.insert(n,[o])}};if(!B(s))return g(i);let m=i.length;for(let e=0;e<m;e++)g(i[e])}function ew(e,t,r,n,o,i,s,l,a,u){if(L(s))return t.vectorIndexes[r].node.remove(o),!0;let{type:c,node:f}=t.indexes[r];switch(c){case"AVL":return f.removeDocument(i,o),!0;case"Bool":return f[i?"true":"false"].delete(o),!0;case"Radix":{let s=a.tokenize(i,l,r);for(let i of(e.removeDocumentScoreParameters(t,r,n,u),s))e.removeTokenScoreParameters(t,r,i),f.removeDocumentByWord(i,o);return!0}case"Flat":return f.removeDocument(o,i),!0;case"BKD":return f.removeDocByID(i,o),!1}}function eO(e,t,r,n,o,i,s,l,a,u){if(!B(s))return ew(e,t,r,n,o,i,s,l,a,u);let c=z[s],f=i.length;for(let s=0;s<f;s++)ew(e,t,r,n,o,i[s],c,l,a,u);return!0}function eN(e,t,r,n,o,i,s,l,a,u){let c=Array.from(n),f=e.avgFieldLength[t],d=e.fieldLengths[t],h=e.tokenOccurrences[t],p=e.frequencies[t],g="number"==typeof h[r]?h[r]??0:0,m=c.length;for(let e=0;e<m;e++){let n=c[e];if(a&&!a.has(n))continue;u.has(n)||u.set(n,new Map);let h=u.get(n);h.set(t,(h.get(t)||0)+1);let m=function(e,t,r,n,o,{k:i,b:s,d:l}){return Math.log(1+(r-t+.5)/(t+.5))*(l+e*(i+1))/(e+i*(1-s+s*n/o))}(p?.[n]?.[r]??0,g,o,d[n],f,i);s.has(n)?s.set(n,s.get(n)+m*l):s.set(n,m*l)}}function eT(e,t,r,n,o,i,s,l,a,u,c,f=0){let d=r.tokenize(t,n),h=d.length||1,p=new Map,g=new Map,m=new Map;for(let r of o){if(!(r in e.indexes))continue;let n=e.indexes[r],{type:o}=n;if("Radix"!==o)throw M("WRONG_SEARCH_PROPERTY_TYPE",r);let f=l[r]??1;if(f<=0)throw M("INVALID_BOOST_VALUE",f);0!==d.length||t||d.push("");let h=d.length;for(let t=0;t<h;t++){let o=d[t],l=n.node.find({term:o,exact:i,tolerance:s}),h=Object.keys(l);h.length>0&&g.set(o,!0);let y=h.length;for(let t=0;t<y;t++){let n=h[t],o=l[n];eN(e,r,n,o,u,a,m,f,c,p)}}}let y=Array.from(m.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(0===y.length)return[];if(1===f)return y;if(0===f){if(1===h)return y;for(let e of d)if(!g.get(e))return[];return y.filter(([e])=>{let t=p.get(e);return!!t&&Array.from(t.values()).some(e=>e===h)})}let b=y.filter(([e])=>{let t=p.get(e);return!!t&&Array.from(t.values()).some(e=>e===h)});if(b.length>0){let e=y.filter(([e])=>!b.some(([t])=>t===e)),t=Math.ceil(e.length*f);return[...b,...e.slice(0,t)]}return y}function ev(e){return e.searchableProperties}function e_(e){return e.searchablePropertiesWithTypes}function eD(e,t){let{indexes:r,vectorIndexes:n,searchableProperties:o,searchablePropertiesWithTypes:i,frequencies:s,tokenOccurrences:l,avgFieldLength:a,fieldLengths:u}=t,c={},f={};for(let e of Object.keys(r)){let{node:t,type:n,isArray:o}=r[e];switch(n){case"Radix":c[e]={type:"Radix",node:ec.fromJSON(t),isArray:o};break;case"Flat":c[e]={type:"Flat",node:el.fromJSON(t),isArray:o};break;case"AVL":c[e]={type:"AVL",node:es.fromJSON(t),isArray:o};break;case"BKD":c[e]={type:"BKD",node:ed.fromJSON(t),isArray:o};break;case"Bool":c[e]={type:"Bool",node:eh.fromJSON(t),isArray:o};break;default:c[e]=r[e]}}for(let e of Object.keys(n))f[e]={type:"Vector",isArray:!1,node:ep.fromJSON(n[e])};return{sharedInternalDocumentStore:e,indexes:c,vectorIndexes:f,searchableProperties:o,searchablePropertiesWithTypes:i,frequencies:s,tokenOccurrences:l,avgFieldLength:a,fieldLengths:u}}function eA(e){let{indexes:t,vectorIndexes:r,searchableProperties:n,searchablePropertiesWithTypes:o,frequencies:i,tokenOccurrences:s,avgFieldLength:l,fieldLengths:a}=e,u={};for(let e of Object.keys(r))u[e]=r[e].node.toJSON();let c={};for(let e of Object.keys(t)){let{type:r,node:n,isArray:o}=t[e];"Flat"===r||"Radix"===r||"AVL"===r||"BKD"===r||"Bool"===r?c[e]={type:r,node:n.toJSON(),isArray:o}:(c[e]=t[e],c[e].node=c[e].node.toJSON())}return{indexes:c,vectorIndexes:u,searchableProperties:n,searchablePropertiesWithTypes:o,frequencies:i,tokenOccurrences:s,avgFieldLength:l,fieldLengths:a}}function eE(e,t){e||(e=new Set);let r=t.length;for(let n=0;n<r;n++){let r=t[n].docIDs,o=r.length;for(let t=0;t<o;t++)e.add(r[t])}return e}function ek(e,t,r=!1){let n=r?ed.vincentyDistance:ed.haversineDistance,o=[],i=[];for(let{point:r}of e)i.push(n(t,r));let s=Math.max(...i),l=0;for(let{docIDs:t}of e){let e=s-i[l]+1;for(let r of t)o.push([r,e]);l++}return o.sort((e,t)=>t[1]-e[1]),o}function eP(e,t,r,n){return n?.enabled===!1?{disabled:!0}:function e(t,r,n,o,i){let s={language:t.tokenizer.language,sharedInternalDocumentStore:r,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[l,a]of Object.entries(n)){let n=`${i}${i?".":""}${l}`;if(!o.includes(n)){if("object"==typeof a&&!Array.isArray(a)){let i=e(t,r,a,o,n);p(s.sortableProperties,i.sortableProperties),s.sorts={...s.sorts,...i.sorts},s.sortablePropertiesWithTypes={...s.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!L(a))switch(a){case"boolean":case"number":case"string":s.sortableProperties.push(n),s.sortablePropertiesWithTypes[n]=a,s.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:a};break;case"geopoint":case"enum":case"enum[]":case"boolean[]":case"number[]":case"string[]":continue;default:throw M("INVALID_SORT_SCHEMA_TYPE",Array.isArray(a)?"array":a,n)}}}return s}(e,t,r,(n||{}).unsortableProperties||[],"")}function eR(e,t,r,n){if(!e.enabled)return;e.isSorted=!1;let o=F(e.sharedInternalDocumentStore,r),i=e.sorts[t];i.orderedDocsToRemove.has(o)&&ez(e,t),i.docs.set(o,i.orderedDocs.length),i.orderedDocs.push([o,n])}function eM(e){if(!e.isSorted&&e.enabled){for(let t of Object.keys(e.sorts))!function(e,t){let r,n=e.sorts[t];switch(n.type){case"string":r=ex.bind(null,e.language);break;case"number":r=eC.bind(null);break;case"boolean":r=eU.bind(null)}n.orderedDocs.sort(r);let o=n.orderedDocs.length;for(let e=0;e<o;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}(e,t);e.isSorted=!0}}function ex(e,t,r){return t[1].localeCompare(r[1],void 0!==e&&l.includes(e)?i[e]:void 0)}function eC(e,t){return e[1]-t[1]}function eU(e,t){return t[1]?-1:1}function ez(e,t){let r=e.sorts[t];r.orderedDocsToRemove.size&&(r.orderedDocs=r.orderedDocs.filter(e=>!r.orderedDocsToRemove.has(e[0])),r.orderedDocsToRemove.clear())}function eL(e,t,r){if(!e.enabled)return;let n=e.sorts[t],o=F(e.sharedInternalDocumentStore,r);n.docs.get(o)&&(n.docs.delete(o),n.orderedDocsToRemove.set(o,!0))}function eB(e,t,r){if(!e.enabled)throw M("SORT_DISABLED");let n=r.property,o="DESC"===r.order,i=e.sorts[n];if(!i)throw M("UNABLE_TO_SORT_ON_UNKNOWN_FIELD",n,e.sortableProperties.join(", "));return ez(e,n),eM(e),t.sort((t,r)=>{let n=i.docs.get(F(e.sharedInternalDocumentStore,t[0])),s=i.docs.get(F(e.sharedInternalDocumentStore,r[0])),l=void 0!==n,a=void 0!==s;return l||a?l?a?o?s-n:n-s:-1:1:0}),t}function eV(e){return e.enabled?e.sortableProperties:[]}function eW(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function ej(e,t){if(!t.enabled)return{enabled:!1};let r=Object.keys(t.sorts).reduce((e,r)=>{let{docs:n,orderedDocs:o,type:i}=t.sorts[r];return e[r]={docs:new Map(Object.entries(n).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:o,type:i},e},{});return{sharedInternalDocumentStore:e,language:t.language,sortableProperties:t.sortableProperties,sortablePropertiesWithTypes:t.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:t.isSorted}}function eF(e){if(!e.enabled)return{enabled:!1};for(let t of Object.keys(e.sorts))ez(e,t);eM(e);let t=Object.keys(e.sorts).reduce((t,r)=>{let{docs:n,orderedDocs:o,type:i}=e.sorts[r];return t[r]={docs:Object.fromEntries(n.entries()),orderedDocs:o,type:i},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}let e$=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115],eG={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},eJ={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},eY="[aeiouy]",eH="[^aeiou][^aeiouy]*",eK=eY+"[aeiou]*",eq="^("+eH+")?"+eK+eH,eX="^("+eH+")?"+eK+eH+"("+eK+")?$",eZ="^("+eH+")?"+eK+eH+eK+eH,eQ="^("+eH+")?"+eY;function e0(e){let t,r,n,o,i,s;if(e.length<3)return e;let l=e.substring(0,1);if("y"==l&&(e=l.toUpperCase()+e.substring(1)),o=/^(.+?)([^s])s$/,(n=/^(.+?)(ss|i)es$/).test(e)?e=e.replace(n,"$1$2"):o.test(e)&&(e=e.replace(o,"$1$2")),o=/^(.+?)(ed|ing)$/,(n=/^(.+?)eed$/).test(e)){let t=n.exec(e);(n=new RegExp(eq)).test(t[1])&&(n=/.$/,e=e.replace(n,""))}else o.test(e)&&(t=o.exec(e)[1],(o=new RegExp(eQ)).test(t)&&(e=t,o=/(at|bl|iz)$/,i=RegExp("([^aeiouylsz])\\1$"),s=RegExp("^"+eH+eY+"[^aeiouwxy]$"),o.test(e)?e+="e":i.test(e)?(n=/.$/,e=e.replace(n,"")):s.test(e)&&(e+="e")));if((n=/^(.+?)y$/).test(e)){let r=n.exec(e);t=r?.[1],n=new RegExp(eQ),t&&n.test(t)&&(e=t+"i")}if((n=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/).test(e)){let o=n.exec(e);t=o?.[1],r=o?.[2],n=new RegExp(eq),t&&n.test(t)&&(e=t+eG[r])}if((n=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/).test(e)){let o=n.exec(e);t=o?.[1],r=o?.[2],n=new RegExp(eq),t&&n.test(t)&&(e=t+eJ[r])}if(o=/^(.+?)(s|t)(ion)$/,(n=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/).test(e)){let r=n.exec(e);t=r?.[1],n=new RegExp(eZ),t&&n.test(t)&&(e=t)}else if(o.test(e)){let r=o.exec(e);t=r?.[1]??""+r?.[2]??"",(o=new RegExp(eZ)).test(t)&&(e=t)}if((n=/^(.+?)e$/).test(e)){let r=n.exec(e);t=r?.[1],n=new RegExp(eZ),o=new RegExp(eX),i=RegExp("^"+eH+eY+"[^aeiouwxy]$"),t&&(n.test(t)||o.test(t)&&!i.test(t))&&(e=t)}return n=/ll$/,o=new RegExp(eZ),n.test(e)&&o.test(e)&&(n=/.$/,e=e.replace(n,"")),"y"==l&&(e=l.toLowerCase()+e.substring(1)),e}function e1(e,t,r=!0){let n=`${this.language}:${e}:${t}`;return r&&this.normalizationCache.has(n)?this.normalizationCache.get(n):this.stopWords?.includes(t)?(r&&this.normalizationCache.set(n,""),""):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=function(e){let t=[];for(let n=0;n<e.length;n++){var r;t[n]=(r=e.charCodeAt(n))<192||r>383?r:e$[r-192]||r}return String.fromCharCode(...t)}(t),r&&this.normalizationCache.set(n,t),t)}function e9(e,t,r,n=!0){let o;if(t&&t!==this.language)throw M("LANGUAGE_NOT_SUPPORTED",t);if("string"!=typeof e)return[e];let i=this.normalizeToken.bind(this,r??"");if(r&&this.tokenizeSkipProperties.has(r))o=[i(e,n)];else{let t=s[this.language];o=e.toLowerCase().split(t).map(e=>i(e,n)).filter(Boolean)}let l=function(e){for(;""===e[e.length-1];)e.pop();for(;""===e[0];)e.shift();return e}(o);return this.allowDuplicates?l:Array.from(new Set(l))}function e7(e={}){let t,r;if(e.language){if(!l.includes(e.language))throw M("LANGUAGE_NOT_SUPPORTED",e.language)}else e.language="english";if(e.stemming||e.stemmer&&!("stemming"in e))if(e.stemmer){if("function"!=typeof e.stemmer)throw M("INVALID_STEMMER_FUNCTION_TYPE");t=e.stemmer}else if("english"===e.language)t=e0;else throw M("MISSING_STEMMER",e.language);if(!1!==e.stopWords){if(r=[],Array.isArray(e.stopWords))r=e.stopWords;else if("function"==typeof e.stopWords)r=e.stopWords(r);else if(e.stopWords)throw M("CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY");if(!Array.isArray(r))throw M("CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY");for(let e of r)if("string"!=typeof e)throw M("CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY")}let n={tokenize:e9,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:r,allowDuplicates:!!e.allowDuplicates,normalizeToken:e1,normalizationCache:new Map};return n.tokenize=e9.bind(n),n.normalizeToken=e1,n}function e2(e){return{sharedInternalDocumentStore:e,rules:new Map}}function e5(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function e3(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function e6(e,t){return e.rules.delete(t)}function e8(e,t){return e.rules.get(t)}function e4(e){return Array.from(e.rules.values())}function te(e,t){if(!t)return[];let r=[];for(let n of e.rules.values())(function(e,t){return!!e&&t.conditions.every(t=>(function(e,t){let r=e.toLowerCase().trim(),n=t.pattern.toLowerCase().trim();switch(t.anchoring){case"is":return r===n;case"starts_with":return r.startsWith(n);case"contains":return r.includes(n);default:return!1}})(e,t))})(t,n)&&r.push(n);return r}function tt(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function tr(e){return{rules:Array.from(e.rules.entries())}}let tn="fulltext";function to(e,t){return e[1]-t[1]}function ti(e,t){return t[1]-e[1]}function ts(e,t,r){let n={},o=t.map(([e])=>e),i=e.documentsStore.getMultiple(e.data.docs,o),s=Object.keys(r),l=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of s){let t;if("number"===l[e]){let{ranges:n}=r[e],o=n.length,i=Array.from({length:o});for(let e=0;e<o;e++){let t=n[e];i[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(i)}n[e]={count:0,values:t??{}}}let a=i.length;for(let e=0;e<a;e++){let t=i[e];for(let e of s){let o=e.includes(".")?O(t,e):t[e],i=l[e],s=n[e].values;switch(i){case"number":tl(r[e].ranges,s)(o);break;case"number[]":{let t=new Set,n=tl(r[e].ranges,s,t);for(let e of o)n(e);break}case"boolean":case"enum":case"string":ta(s,i)(o);break;case"boolean[]":case"enum[]":case"string[]":{let e=ta(s,"boolean[]"===i?"boolean":"string",new Set);for(let t of o)e(t);break}default:throw M("FACET_NOT_SUPPORTED",i)}}}for(let e of s){let t=n[e];if(t.count=Object.keys(t.values).length,"string"===l[e]){let n=r[e],o=function(e="desc"){return"asc"===e.toLowerCase()?to:ti}(n.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(o).slice(n.offset??0,n.limit??10))}}return n}function tl(e,t,r){return n=>{for(let o of e){let e=`${o.from}-${o.to}`;!r?.has(e)&&n>=o.from&&n<=o.to&&(void 0===t[e]?t[e]=1:(t[e]++,r?.add(e)))}}}function ta(e,t,r){let n="boolean"===t?"false":"";return t=>{let o=t?.toString()??n;r?.has(o)||(e[o]=(e[o]??0)+1,r?.add(o))}}let tu={reducer:(e,t,r,n)=>(t[n]=r,t),getInitialValue:e=>Array.from({length:e})},tc=["string","number","boolean"];function tf(e,t,r){let n=r.properties,o=n.length,i=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<o;e++){let t=n[e];if(void 0===i[t])throw M("UNKNOWN_GROUP_BY_PROPERTY",t);if(!tc.includes(i[t]))throw M("INVALID_GROUP_BY_PROPERTY",t,tc.join(", "),i[t])}let s=t.map(([t])=>$(e.internalDocumentIDStore,t)),l=e.documentsStore.getMultiple(e.data.docs,s),a=l.length,u=r.maxResult||Number.MAX_SAFE_INTEGER,c=[],f={};for(let e=0;e<o;e++){let t=n[e],r={property:t,perValue:{}},o=new Set;for(let e=0;e<a;e++){let n=O(l[e],t);if(void 0===n)continue;let i="boolean"!=typeof n?n:""+n,s=r.perValue[i]??{indexes:[],count:0};s.count>=u||(s.indexes.push(e),s.count++,r.perValue[i]=s,o.add(n))}c.push(Array.from(o)),f[t]=r}let d=function e(t,r=0){if(r+1===t.length)return t[r].map(e=>[e]);let n=t[r],o=e(t,r+1),i=[];for(let e of n)for(let t of o){let r=[e];p(r,t),i.push(r)}return i}(c),h=d.length,g=[];for(let e=0;e<h;e++){let t=d[e],r=t.length,o={values:[],indexes:[]},i=[];for(let e=0;e<r;e++){let r=t[e],s=n[e];i.push(f[s].perValue["boolean"!=typeof r?r:""+r].indexes),o.values.push(r)}o.indexes=(function(e){if(0===e.length)return[];if(1===e.length)return e[0];for(let t=1;t<e.length;t++)if(e[t].length<e[0].length){let r=e[0];e[0]=e[t],e[t]=r}let t=new Map;for(let r of e[0])t.set(r,1);for(let r=1;r<e.length;r++){let n=0;for(let o of e[r]){let e=t.get(o);e===r&&(t.set(o,e+1),n++)}if(0===n)return[]}return e[0].filter(r=>{let n=t.get(r);return void 0!==n&&t.set(r,0),n===e.length})})(i).sort((e,t)=>e-t),0!==o.indexes.length&&g.push(o)}let m=g.length,y=Array.from({length:m});for(let e=0;e<m;e++){let n=g[e],o=r.reduce||tu,i=n.indexes.map(e=>({id:s[e],score:t[e][1],document:l[e]})),a=o.reducer.bind(null,n.values),u=o.getInitialValue(n.indexes.length),c=i.reduce(a,u);y[e]={values:n.values,result:c}}return y}function td(e,t,r,n){let o=te(t,n);if(0===o.length)return r;let i=o.flatMap(e=>e.consequence.promote);i.sort((e,t)=>e.position-t.position);let s=new Set,l=new Map,a=new Set;for(let t of i){let r=F(e.internalDocumentIDStore,t.doc_id);if(void 0!==r){if(l.has(r)){let e=l.get(r);t.position<e&&l.set(r,t.position);continue}a.has(t.position)||(s.add(r),l.set(r,t.position),a.add(t.position))}}if(0===l.size)return r;let u=r.filter(([e])=>!s.has(e)),c=[];for(let[t,n]of l.entries())r.find(([e])=>e===t)?c.push([t,1e6-n]):e.documentsStore.get(e.data.docs,t)&&c.push([t,0]);c.sort((e,t)=>(l.get(e[0])??1/0)-(l.get(t[0])??1/0));let f=[],d=new Map;for(let e of c){let t=l.get(e[0]);d.set(t,e)}let h=0,p=0;for(;p<u.length+c.length;)if(d.has(p))f.push(d.get(p)),p++;else if(h<u.length)f.push(u[h]),h++,p++;else break;for(let[e,t]of d.entries())e>=f.length&&f.push(t);return f}function th(e,t,r){let n,o,{term:i,properties:s}=t,l=e.data.index,a=e.caches.propertiesToSearch;if(!a){let t=e.index.getSearchablePropertiesWithTypes(l);a=(a=e.index.getSearchableProperties(l)).filter(e=>t[e].startsWith("string")),e.caches.propertiesToSearch=a}if(s&&"*"!==s){for(let e of s)if(!a.includes(e))throw M("UNKNOWN_INDEX",e,a.join(", "));a=a.filter(e=>s.includes(e))}let u=Object.keys(t.where??{}).length>0;u&&(n=e.index.searchByWhereClause(l,e.tokenizer,t.where,r));let c=void 0!==t.threshold&&null!==t.threshold?t.threshold:1;if(i||s){let s=e.documentsStore.count(e.data.docs);if(o=e.index.search(l,i||"",e.tokenizer,r,a,t.exact||!1,t.tolerance||0,t.boost||{},function(e){let t=e??{};return t.k=t.k??tp.k,t.b=t.b??tp.b,t.d=t.d??tp.d,t}(t.relevance),s,n,c),t.exact&&i){let t=i.trim().split(/\s+/);o=o.filter(([r])=>{let n=e.documentsStore.get(e.data.docs,r);if(!n)return!1;for(let e of a){let r=function(e,t){let r=t.split("."),n=e;for(let e of r)if(!n||"object"!=typeof n||!(e in n))return;else n=n[e];return n}(n,e);if("string"==typeof r&&t.every(e=>RegExp(`\\b${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(r)))return!0}return!1})}}else if(u){let e=function(e,t){let r,n=function(e,t){let r=Object.keys(e);if(1!==r.length)return{isGeoOnly:!1};let n=r[0],o=e[n];if(void 0===t.indexes[n])return{isGeoOnly:!1};let{type:i}=t.indexes[n];return"BKD"===i&&o&&("radius"in o||"polygon"in o)?{isGeoOnly:!0,geoProperty:n,geoOperation:o}:{isGeoOnly:!1}}(t,e);if(!n.isGeoOnly||!n.geoProperty||!n.geoOperation)return null;let{node:o}=e.indexes[n.geoProperty],i=n.geoOperation;if("radius"in i){let{value:e,coordinates:t,unit:n="m",inside:s=!0,highPrecision:l=!1}=i.radius,a=T(e,n);return ek(r=o.searchByRadius(t,a,s,"asc",l),t,l)}if("polygon"in i){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=i.polygon;return ek(r=o.searchByPolygon(e,t,"asc",n),ed.calculatePolygonCentroid(e),n)}return null}(l,t.where);o=e||(n?Array.from(n):[]).map(e=>[+e,0])}else o=Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return o}let tp={k:1.2,b:.75,d:.5};function tg(e,t,r){let n,o=t.vector;if(o&&(!("value"in o)||!("property"in o)))throw M("INVALID_VECTOR_INPUT",Object.keys(o).join(", "));let i=e.data.index.vectorIndexes[o.property];if(!i)throw M("UNKNOWN_VECTOR_PROPERTY",o.property);let s=i.node.size;if(o?.value.length!==s){if(o?.property===void 0||o?.value.length===void 0)throw M("INVALID_INPUT_VECTOR","undefined",s,"undefined");throw M("INVALID_INPUT_VECTOR",o.property,s,o.value.length)}let l=e.data.index;return Object.keys(t.where??{}).length>0&&(n=e.index.searchByWhereClause(l,e.tokenizer,t.where,r)),i.node.find(o.value,t.similarity??.8,n)}function tm(e){return e[1]}function ty(e,t,r){let n=t.mode??tn;if(n===tn){let n=y();function o(){let o,i=Object.keys(e.data.index.vectorIndexes),s=t.facets&&Object.keys(t.facets).length>0,{limit:l=10,offset:a=0,distinctOn:u,includeVectors:c=!1}=t,f=!0===t.preflight,d=th(e,t,r);if(t.sortBy)if("function"==typeof t.sortBy){let r=d.map(([e])=>e),n=e.documentsStore.getMultiple(e.data.docs,r).map((e,t)=>[d[t][0],d[t][1],e]);n.sort(t.sortBy),d=n.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,r])=>[F(e.internalDocumentIDStore,t),r]);else d=d.sort(I);d=td(e,e.data.pinning,d,t.term),f||(o=u?function(e,t,r,n,o){let i=e.data.docs,s=new Map,l=[],a=new Set,u=t.length,c=0;for(let f=0;f<u;f++){let u=t[f];if(void 0===u)continue;let[d,h]=u;if(a.has(d))continue;let p=e.documentsStore.get(i,d),g=O(p,o);if(!(void 0===g||s.has(g))&&(s.set(g,!0),!(++c<=r)&&(l.push({id:$(e.internalDocumentIDStore,d),score:h,document:p}),a.add(d),c>=r+n)))break}return l}(e,d,a,l,u):tb(e,d,a,l));let h={elapsed:{formatted:"",raw:0},hits:[],count:d.length};return void 0!==o&&(h.hits=o.filter(Boolean),c||v(h,i)),s&&(h.facets=ts(e,d,t.facets)),t.groupBy&&(h.groups=tf(e,d,t.groupBy)),h.elapsed=e.formatElapsedTime(y()-n),h}async function i(){e.beforeSearch&&await eo(e.beforeSearch,e,t,r);let n=o();return e.afterSearch&&await en(e.afterSearch,e,t,r,n),n}return e.beforeSearch?.length||e.afterSearch?.length?i():o()}if("vector"===n)return function(e,t,r="english"){let n=y();function o(){let o=tg(e,t,r).sort(I);o=td(e,e.data.pinning,o,void 0);let i=[];t.facets&&Object.keys(t.facets).length>0&&(i=ts(e,o,t.facets));let s=t.vector.property,l=t.includeVectors??!1,a=t.limit??10,u=t.offset??0,c=Array.from({length:a});for(let t=0;t<a;t++){let r=o[t+u];if(!r)break;let n=e.data.docs.docs[r[0]];if(n){l||(n[s]=null);let o={id:$(e.internalDocumentIDStore,r[0]),score:r[1],document:n};c[t]=o}}let f=[];t.groupBy&&(f=tf(e,o,t.groupBy));let d=y()-n;return{count:o.length,hits:c.filter(Boolean),elapsed:{raw:Number(d),formatted:m(d)},...i?{facets:i}:{},...f?{groups:f}:{}}}async function i(){e.beforeSearch&&await eo(e.beforeSearch,e,t,r);let n=o();return e.afterSearch&&await en(e.afterSearch,e,t,r,n),n}return e.beforeSearch?.length||e.afterSearch?.length?i():o()}(e,t);if("hybrid"===n)return function(e,t,r){let n=y();function o(){let r,o,i=function(e,t,r){let n=function(e){let t=Math.max.apply(Math,e.map(tm));return e.map(([e,r])=>[e,r/t])}(th(e,t,r)),o=tg(e,t,r),i=t.hybridWeights;return function(e,t,r,n){let o=Math.max.apply(Math,e.map(tm)),i=Math.max.apply(Math,t.map(tm)),{text:s,vector:l}=n&&n.text&&n.vector?n:{text:.5,vector:.5},a=new Map,u=e.length,c=(e,t)=>e*s+t*l;for(let t=0;t<u;t++){let[r,n]=e[t],i=c(n/o,0);a.set(r,i)}let f=t.length;for(let e=0;e<f;e++){let[r,n]=t[e],o=n/i,s=a.get(r)??0;a.set(r,s+c(0,o))}return[...a].sort((e,t)=>t[1]-e[1])}(n,o,t.term??"",i)}(e,t,void 0);i=td(e,e.data.pinning,i,t.term),t.facets&&Object.keys(t.facets).length>0&&(r=ts(e,i,t.facets)),t.groupBy&&(o=tf(e,i,t.groupBy));let s=tb(e,i,t.offset??0,t.limit??10).filter(Boolean),l=y(),a={count:i.length,elapsed:{raw:Number(l-n),formatted:m(l-n)},hits:s,...r?{facets:r}:{},...o?{groups:o}:{}};return t.includeVectors||v(a,Object.keys(e.data.index.vectorIndexes)),a}async function i(){e.beforeSearch&&await eo(e.beforeSearch,e,t,void 0);let n=o();return e.afterSearch&&await en(e.afterSearch,e,t,r,n),n}return e.beforeSearch?.length||e.afterSearch?.length?i():o()}(e,t);throw M("INVALID_SEARCH_MODE",n)}function tb(e,t,r,n){let o=e.data.docs,i=Array.from({length:n}),s=new Set;for(let l=r;l<n+r;l++){let r=t[l];if(void 0===r)break;let[n,a]=r;if(!s.has(n)){let t=e.documentsStore.get(o,n);i[l]={id:$(e.internalDocumentIDStore,n),score:a,document:t},s.add(n)}}return i}function tS(e,t){e.internalDocumentIDStore.load(e,t.internalDocumentIDStore),e.data.index=e.index.load(e.internalDocumentIDStore,t.index),e.data.docs=e.documentsStore.load(e.internalDocumentIDStore,t.docs),e.data.sorting=e.sorter.load(e.internalDocumentIDStore,t.sorting),e.data.pinning=e.pinning.load(e.internalDocumentIDStore,t.pinning),e.tokenizer.language=t.language}async function tI(e,t,r={}){let n=(0,o.r)(t);return(await ty(e,{term:t,tolerance:1,...r,boost:{title:2,..."boost"in r?r.boost:void 0}})).hits.map(e=>({type:"page",content:e.document.title,breadcrumbs:e.document.breadcrumbs,contentWithHighlights:n.highlight(e.document.title),id:e.document.url,url:e.document.url}))}async function tw(e,t,r=[],{mode:i="fulltext",...s}={}){"string"==typeof r&&(r=[r]);let l={...s,mode:i,where:(0,n.B)({tags:r.length>0?{containsAll:r}:void 0,...s.where}),groupBy:{properties:["page_id"],maxResult:8,...s.groupBy}};t.length>0&&(l={...l,term:t,properties:"fulltext"===i?["content"]:["content","embeddings"]});let a=(0,o.r)(t),u=await ty(e,l),c=[];for(let t of u.groups??[]){let r=t.values[0],n=e.documentsStore.get(e.data.docs,r);if(n)for(let e of(c.push({id:r,type:"page",content:n.content,breadcrumbs:n.breadcrumbs,contentWithHighlights:a.highlight(n.content),url:n.url}),t.result))"page"!==e.document.type&&c.push({id:e.document.id.toString(),content:e.document.content,breadcrumbs:e.document.breadcrumbs,contentWithHighlights:a.highlight(e.document.content),type:e.document.type,url:e.document.url})}return c}Symbol("orama.insertions"),Symbol("orama.removals"),r(4394);var tO=new Map;async function tN({from:e="/api/search",initOrama:t=e=>(function({schema:e,sort:t,language:r,components:n,id:o,plugins:i}){for(let t of(n||(n={}),i??[])){if(!("getComponents"in t)||"function"!=typeof t.getComponents)continue;let r=t.getComponents(e);for(let e of Object.keys(r))if(n[e])throw M("PLUGIN_COMPONENT_CONFLICT",e,t.name);n={...n,...r}}o||(o=b());let s=n.tokenizer,l=n.index,a=n.documentsStore,u=n.sorter,c=n.pinning;if(s=s?s.tokenize?s:e7(s):e7({language:r??"english"}),n.tokenizer&&r)throw M("NO_LANGUAGE_WITH_CUSTOM_TOKENIZER");let f={idToInternalId:new Map,internalIdToId:[],save:W,load:j};l||={create:function e(t,r,n,o,i=""){for(let[s,l]of(o||(o={sharedInternalDocumentStore:r,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}}),Object.entries(n))){let n=`${i}${i?".":""}${s}`;if("object"==typeof l&&!Array.isArray(l)){e(t,r,l,o,n);continue}if(L(l))o.searchableProperties.push(n),o.searchablePropertiesWithTypes[n]=l,o.vectorIndexes[n]={type:"Vector",node:new ep(V(l)),isArray:!1};else{let e=/\[/.test(l);switch(l){case"boolean":case"boolean[]":o.indexes[n]={type:"Bool",node:new eh,isArray:e};break;case"number":case"number[]":o.indexes[n]={type:"AVL",node:new es(0,[]),isArray:e};break;case"string":case"string[]":o.indexes[n]={type:"Radix",node:new ec,isArray:e},o.avgFieldLength[n]=0,o.frequencies[n]={},o.tokenOccurrences[n]={},o.fieldLengths[n]={};break;case"enum":case"enum[]":o.indexes[n]={type:"Flat",node:new el,isArray:e};break;case"geopoint":o.indexes[n]={type:"BKD",node:new ed,isArray:e};break;default:throw M("INVALID_SCHEMA_TYPE",Array.isArray(l)?"array":l,n)}o.searchableProperties.push(n),o.searchablePropertiesWithTypes[n]=l}}return o},insert:eI,remove:eO,insertDocumentScoreParameters:em,insertTokenScoreParameters:ey,removeDocumentScoreParameters:eb,removeTokenScoreParameters:eS,calculateResultScores:eN,search:eT,searchByWhereClause:function e(t,r,n,o){if("and"in n&&n.and&&Array.isArray(n.and)){let i=n.and;return 0===i.length?new Set:A(...i.map(n=>e(t,r,n,o)))}if("or"in n&&n.or&&Array.isArray(n.or)){let i=n.or;return 0===i.length?new Set:i.map(n=>e(t,r,n,o)).reduce((e,t)=>k(e,t),new Set)}if("not"in n&&n.not){let i=n.not,s=new Set,l=t.sharedInternalDocumentStore;for(let e=1;e<=l.internalIdToId.length;e++)s.add(e);let a=e(t,r,i,o),u=new Set;for(let e of s)a.has(e)||u.add(e);return u}let i=Object.keys(n),s=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let e of i){let i=n[e];if(void 0===t.indexes[e])throw M("UNKNOWN_FILTER_PROPERTY",e);let{node:l,type:a,isArray:u}=t.indexes[e];if("Bool"===a){let t=i?l.true:l.false;s[e]=k(s[e],t);continue}if("BKD"===a){let t;if("radius"in i)t="radius";else if("polygon"in i)t="polygon";else throw Error(`Invalid operation ${i}`);if("radius"===t){let{value:r,coordinates:n,unit:o="m",inside:a=!0,highPrecision:u=!1}=i[t],c=T(r,o),f=l.searchByRadius(n,c,a,void 0,u);s[e]=eE(s[e],f)}else{let{coordinates:r,inside:n=!0,highPrecision:o=!1}=i[t],a=l.searchByPolygon(r,n,void 0,o);s[e]=eE(s[e],a)}continue}if("Radix"===a&&("string"==typeof i||Array.isArray(i))){for(let t of[i].flat())for(let n of r.tokenize(t,o,e)){let t=l.find({term:n,exact:!0});s[e]=function(e,t){e||(e=new Set);let r=Object.keys(t),n=r.length;for(let o=0;o<n;o++){let n=t[r[o]],i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}(s[e],t)}continue}let c=Object.keys(i);if(c.length>1)throw M("INVALID_FILTER_OPERATION",c.length);if("Flat"===a){let t=new Set(u?l.filterArr(i):l.filter(i));s[e]=k(s[e],t);continue}if("AVL"===a){let t,r=c[0],n=i[r];switch(r){case"gt":t=l.greaterThan(n,!1);break;case"gte":t=l.greaterThan(n,!0);break;case"lt":t=l.lessThan(n,!1);break;case"lte":t=l.lessThan(n,!0);break;case"eq":t=l.find(n)??new Set;break;case"between":{let[e,r]=n;t=l.rangeSearch(e,r);break}default:throw M("INVALID_FILTER_OPERATION",r)}s[e]=k(s[e],t)}}return A(...Object.values(s))},getSearchableProperties:ev,getSearchablePropertiesWithTypes:e_,load:eD,save:eA},u||={create:eP,insert:eR,remove:eL,save:eF,load:ej,sortBy:eB,getSortableProperties:eV,getSortablePropertiesWithTypes:eW},a||={create:G,get:J,getMultiple:Y,getAll:H,store:K,remove:q,count:X,load:Z,save:Q},c||={create:e2,addRule:e5,updateRule:e3,removeRule:e6,getRule:e8,getAllRules:e4,getMatchingRules:te,load:tt,save:tr};var d=n;let h={formatElapsedTime:x,getDocumentIndexId:C,getDocumentProperties:w,validateSchema:function e(t,r){for(let[n,o]of Object.entries(r)){let r=t[n];if(void 0!==r&&("geopoint"!==o||"object"!=typeof r||"number"!=typeof r.lon||"number"!=typeof r.lat)&&("enum"!==o||"string"!=typeof r&&"number"!=typeof r)){if("enum[]"===o&&Array.isArray(r)){let e=r.length;for(let t=0;t<e;t++)if("string"!=typeof r[t]&&"number"!=typeof r[t])return n+"."+t;continue}if(L(o)){let e=V(o);if(!Array.isArray(r)||r.length!==e)throw M("INVALID_INPUT_VECTOR",n,e,r.length);continue}if(B(o)){if(!Array.isArray(r))return n;let e=z[o],t=r.length;for(let o=0;o<t;o++)if(typeof r[o]!==e)return n+"."+o;continue}if("object"==typeof o){if(!r||"object"!=typeof r)return n;let t=e(r,o);if(t)return n+"."+t;continue}if(typeof r!==o)return n}}}};for(let e of er)if(d[e]){if("function"!=typeof d[e])throw M("COMPONENT_MUST_BE_FUNCTION",e)}else d[e]=h[e];for(let e of Object.keys(d))if(!et.includes(e)&&!er.includes(e))throw M("UNSUPPORTED_COMPONENT",e);let{getDocumentProperties:p,getDocumentIndexId:g,validateSchema:m,formatElapsedTime:y}=n,S={data:{},caches:{},schema:e,tokenizer:s,index:l,sorter:u,documentsStore:a,pinning:c,internalDocumentIDStore:f,getDocumentProperties:p,getDocumentIndexId:g,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:y,id:o,plugins:i,version:"{{VERSION}}"};for(let r of(S.data={index:S.index.create(S,f,e),docs:S.documentsStore.create(S,f),sorting:S.sorter.create(S,f,e,t),pinning:S.pinning.create(f)},ee))S[r]=(S[r]??[]).concat(function(e,t){let r=[],n=e.plugins?.length;if(!n)return r;for(let o=0;o<n;o++)try{let n=e.plugins[o];"function"==typeof n[t]&&r.push(n[t])}catch(e){throw console.error("Caught error in getAllPluginsByHook:",e),M("PLUGIN_CRASHED")}return r}(S,r));let I=S.afterCreate;return I&&function(e,t){if(e.some(_))return(async()=>{for(let r of e)await r(t)})();for(let r of e)r(t)}(I,S),S})({schema:{_:"string"},language:e})}){let r=tO.get(e);if(r)return r;let n=async function(){let r=await fetch(e);if(!r.ok)throw Error(`failed to fetch exported search indexes from ${e}, make sure the search database is exported and available for client.`);let n=await r.json(),o=new Map;if("i18n"===n.type)return await Promise.all(Object.entries(n.data).map(async([e,r])=>{let n=await t(e);tS(n,r),o.set(e,{type:r.type,db:n})})),o;let i=await t();return tS(i,n),o.set("",{type:n.type,db:i}),o}();return tO.set(e,n),n}async function tT(e,t){let{tag:r,locale:n}=t,o=(await tN(t)).get(n??"");return o?"simple"===o.type?tI(o,e):tw(o.db,e,r):[]}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9492],{4585:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"styles",{enumerable:!0,get:function(){return l}});let l={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6136:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return l(9520)}])},8886:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}});let r=l(5155),n=l(4585);function o(e){let{status:t,message:l}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("title",{children:t+": "+l}),(0,r.jsx)("div",{style:n.styles.error,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,r.jsx)("h1",{className:"next-error-h1",style:n.styles.h1,children:t}),(0,r.jsx)("div",{style:n.styles.desc,children:(0,r.jsx)("h2",{style:n.styles.h2,children:l})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9520:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=l(5155),n=l(8886),o=function(){return(0,r.jsx)("html",{children:(0,r.jsx)("body",{children:(0,r.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})})})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[8441,1255,7358],()=>e(e.s=6136)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9842],{3529:(e,a,s)=>{"use strict";s.d(a,{default:()=>o});var n=s(5155),t=s(2115),r=s(6787);function o(){let[e,a]=(0,t.useState)(null),[s,o]=(0,t.useState)(!0),[i,l]=(0,t.useState)(""),[d,c]=(0,t.useState)(""),[h,u]=(0,t.useState)(!1),[p,w]=(0,t.useState)(""),[g,m]=(0,t.useState)(!1),[f,y]=(0,t.useState)("/login/");async function j(e){if(e.preventDefault(),!h){if(w(""),i!==d)return void w("The passwords do not match.");u(!0);try{let e=await fetch(r.n+"/v1/auth/password",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:i}),signal:AbortSignal.timeout(2e4)}),s=await e.json();if(!e.ok)throw Error(s.error||"Could not create your password.");a(s.user),l(""),c(""),m(!0)}catch(e){w(e instanceof TypeError?"Could not connect to AgentTwin. Please try again.":e instanceof Error?e.message:"Could not create your password.")}finally{u(!1)}}}return(0,t.useEffect)(()=>{let e=new AbortController,s=["localhost","127.0.0.1"].includes(location.hostname)&&"https://api.agenttwin.si"===r.n;return s&&y("https://agenttwin.si/login/"),fetch(r.n+"/v1/auth/me",{credentials:"include",signal:e.signal,cache:"no-store"}).then(async e=>{var s;if(!e.ok)throw Error("Sign in with Google, then open Settings → Email and password.");let n=await e.json();if(!(null==(s=n.user)?void 0:s.email))throw Error("Could not load your account. Please sign in again.");a(n.user)}).catch(a=>{e.signal.aborted||w(a instanceof TypeError?s?"This local preview cannot connect to production sign-in. Open agenttwin.si to manage your password.":"Could not connect to AgentTwin. Please try again.":a instanceof Error?a.message:"Could not load your account.")}).finally(()=>{e.signal.aborted||o(!1)}),()=>e.abort()},[]),(0,n.jsxs)("main",{className:"auth-page auth-entry vercel-auth vercel-entry",children:[(0,n.jsxs)("header",{className:"auth-header",children:[(0,n.jsx)("a",{className:"auth-brand",href:"/","aria-label":"AgentTwin home",children:(0,n.jsx)("img",{src:"assets/logo/mark-twin-rings.svg",width:"26",height:"26",alt:""})}),(0,n.jsx)("a",{className:"auth-header-link",href:"/dashboard/#settings",children:"Back to settings"})]}),(0,n.jsxs)("section",{className:"auth-card auth-entry-card","aria-labelledby":"password-title",children:[(0,n.jsx)("h1",{id:"password-title",children:"Email and password"}),s&&(0,n.jsx)("p",{role:"status",children:"Loading your sign-in methods…"}),p&&(0,n.jsx)("p",{role:"alert",children:p}),g?(0,n.jsxs)("p",{role:"status",children:["Password created. You can now sign in with ",null==e?void 0:e.email," and your password, or continue with Google. Your workspace is the same."]}):(null==e?void 0:e.passwordEnabled)?(0,n.jsxs)("p",{children:["Email and password sign-in is already enabled for ",e.email,"."]}):(null==e?void 0:e.passwordSetupAllowed)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{children:["Create an AgentTwin password for ",e.email,". Google sign-in will keep working."]}),(0,n.jsx)("p",{children:"For security, sign in with Google within the last 10 minutes before saving."}),(0,n.jsxs)("form",{onSubmit:j,"aria-busy":h,children:[(0,n.jsx)("input",{type:"text",name:"username",autoComplete:"username",value:e.email,readOnly:!0,hidden:!0}),(0,n.jsxs)("label",{htmlFor:"new-password",children:["New password",(0,n.jsx)("input",{id:"new-password",type:"password",autoComplete:"new-password",minLength:12,maxLength:128,required:!0,value:i,onChange:e=>l(e.target.value),"aria-describedby":"password-guidance"})]}),(0,n.jsx)("small",{id:"password-guidance",children:"Use 12–128 characters. This is a new AgentTwin password, separate from your Google password."}),(0,n.jsxs)("label",{htmlFor:"confirm-password",children:["Confirm password",(0,n.jsx)("input",{id:"confirm-password",type:"password",autoComplete:"new-password",minLength:12,maxLength:128,required:!0,value:d,onChange:e=>c(e.target.value)})]}),(0,n.jsx)("button",{className:"auth-primary",type:"submit",disabled:h,children:h?"Saving…":"Create password"})]})]}):e&&(0,n.jsx)("p",{children:"Password setup is available for accounts created with Google."}),!s&&!g&&!(null==e?void 0:e.passwordEnabled)&&(0,n.jsx)("p",{children:(0,n.jsx)("a",{href:f,children:"Sign in with Google again →"})})]}),(0,n.jsx)("footer",{className:"auth-footer",children:(0,n.jsx)("a",{href:"/dashboard/#settings",children:"Back to settings"})})]})}},4079:(e,a,s)=>{Promise.resolve().then(s.bind(s,3529))}},e=>{e.O(0,[3935,6787,8441,1255,7358],()=>e(e.s=4079)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1954],{657:()=>{},975:()=>{},1446:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,4619,23)),Promise.resolve().then(n.t.bind(n,657,23)),Promise.resolve().then(n.t.bind(n,5798,23)),Promise.resolve().then(n.t.bind(n,4938,23)),Promise.resolve().then(n.t.bind(n,3677,23)),Promise.resolve().then(n.t.bind(n,975,23)),Promise.resolve().then(n.t.bind(n,2724,23)),Promise.resolve().then(n.t.bind(n,7645,23))},2724:()=>{},3677:()=>{},4619:()=>{},4938:()=>{},5798:()=>{},7645:()=>{}},e=>{e.O(0,[1133,9477,3660,8441,1255,7358],()=>e(e.s=1446)),_N_E=e.O()}]);