keating 4.0.2 → 4.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/keating.js +1 -1
- package/dist/src/core/version.js +1 -1
- package/package.json +1 -1
- package/web/.output/nitro.json +1 -1
- package/web/.output/public/assets/{AnimationPlayer-Bj9E6XAF.js → AnimationPlayer-CYbhLL_R.js} +1 -1
- package/web/.output/public/assets/{AssistantChatPanel-CPiSdBQo.js → AssistantChatPanel-DQSKpGWP.js} +122 -122
- package/web/.output/public/assets/{CategoricalChart-ZCOId7ho.js → CategoricalChart-BVb9-7_N.js} +1 -1
- package/web/.output/public/assets/{Chat-BPuDBuv7.js → Chat-C6p8yxAr.js} +2 -2
- package/web/.output/public/assets/{CodeHighlighter-CUd-nVJG.js → CodeHighlighter-DhI0IV5H.js} +1 -1
- package/web/.output/public/assets/{ComingUp-BM3f_QSf.js → ComingUp-DFaRgEbt.js} +1 -1
- package/web/.output/public/assets/{CourseJoin--37EPPeg.js → CourseJoin-DMZ6foZO.js} +1 -1
- package/web/.output/public/assets/CourseWorkspace-l_bPGNhE.js +25 -0
- package/web/.output/public/assets/{Courses-DgryGTWV.js → Courses-DIqulPB-.js} +1 -1
- package/web/.output/public/assets/{EvolutionDetail-BHwyObAD.js → EvolutionDetail-C-NYL1qL.js} +1 -1
- package/web/.output/public/assets/{FlashcardRenderer-hzqoLbnQ.js → FlashcardRenderer-iDgfcwk4.js} +1 -1
- package/web/.output/public/assets/{FlashcardShaderField-pDI9y_r4.js → FlashcardShaderField-JGgL2kgp.js} +1 -1
- package/web/.output/public/assets/{FlashcardTimer-BANuXJze.js → FlashcardTimer-vPNL9_0N.js} +1 -1
- package/web/.output/public/assets/{HyperframesPlayer-BQFYx43N.js → HyperframesPlayer-DEtdwGBR.js} +1 -1
- package/web/.output/public/assets/KeatingBench-XnWxgfUC.js +2 -0
- package/web/.output/public/assets/{LearningInsightsHeader-Do3bROTu.js → LearningInsightsHeader-DWj2-1xb.js} +1 -1
- package/web/.output/public/assets/{Live-HZjRDq-V.js → Live-BasKZMuE.js} +1 -1
- package/web/.output/public/assets/{MarkdownBlock-KUcDESQo.js → MarkdownBlock-C89ecD-M.js} +3 -3
- package/web/.output/public/assets/ModelSelector-B_EaHvVz.js +1 -0
- package/web/.output/public/assets/{Nav-GcfPhZc3.js → Nav-DQ-5KEsA.js} +1 -1
- package/web/.output/public/assets/{NotOrganicAccessPromptDialog-CKb6iTFn.js → NotOrganicAccessPromptDialog-DS7PLMx4.js} +1 -1
- package/web/.output/public/assets/{NotOrganicCallback-DWbhlP2j.js → NotOrganicCallback-BxKOsisT.js} +1 -1
- package/web/.output/public/assets/{OAuthCallback-D15ohKxE.js → OAuthCallback-dk2EQnAU.js} +1 -1
- package/web/.output/public/assets/OpenUIPreview-BrBXAEt4.js +1 -0
- package/web/.output/public/assets/PatternDigestPanel-jmxcLCUX.js +1 -0
- package/web/.output/public/assets/Plus-RIb_ldNd.js +1 -0
- package/web/.output/public/assets/{QuizRenderer-CLQqGwub.js → QuizRenderer-DaPQ7ySS.js} +1 -1
- package/web/.output/public/assets/{RenderingSmoke-DRHji-yz.js → RenderingSmoke-D3aD8prv.js} +1 -1
- package/web/.output/public/assets/{Select-BE2GfDud.js → Select-BYfJxqbI.js} +1 -1
- package/web/.output/public/assets/{SharedSession-DAM8ydVu.js → SharedSession-CEsTcr4j.js} +3 -3
- package/web/.output/public/assets/{ThemeToggle-BdGijxoN.js → ThemeToggle-BZH64Rpu.js} +1 -1
- package/web/.output/public/assets/{TrainingData-7EbVIzmQ.js → TrainingData-DujNU5sy.js} +3 -3
- package/web/.output/public/assets/TrajectoryReview-OjkaW6a6.js +35 -0
- package/web/.output/public/assets/TrajectoryReviewIndex-C5QAijKT.js +1 -0
- package/web/.output/public/assets/TrajectoryReviewWorkspace-DSn96Dxb.js +1 -0
- package/web/.output/public/assets/{Usage-BU1OfvzO.js → Usage-C5HU0Yc5.js} +1 -1
- package/web/.output/public/assets/activity-DdJDHeam.js +1 -0
- package/web/.output/public/assets/{anthropic-messages-rElikI6M.js → anthropic-messages-ZiHu59Q7.js} +1 -1
- package/web/.output/public/assets/{azure-openai-responses-yppPdVFy.js → azure-openai-responses-BHgsWKby.js} +1 -1
- package/web/.output/public/assets/calibration-7gf-WNR5.js +1 -0
- package/web/.output/public/assets/circle-question-mark-CK-DUGIA.js +1 -0
- package/web/.output/public/assets/clipboard-list-CRJvmiKL.js +1 -0
- package/web/.output/public/assets/{course-assembly-BIf5lrcx.js → course-assembly-CQE_9Vh4.js} +3 -3
- package/web/.output/public/assets/{course-submission-judgement-m2Gj1AKW.js → course-submission-judgement-Dmmw__tF.js} +1 -1
- package/web/.output/public/assets/{custom-tts-DapOpVQe.js → custom-tts-DqDZf3aF.js} +1 -1
- package/web/.output/public/assets/desktop-offline-IzFtwAhh.js +3 -0
- package/web/.output/public/assets/{dist-BudWH94z.js → dist-Dq5mGdi-.js} +1 -1
- package/web/.output/public/assets/file-text-CANyHShy.js +1 -0
- package/web/.output/public/assets/{from-study-plan-XEoNCZH-.js → from-study-plan-D14XtwuX.js} +2 -2
- package/web/.output/public/assets/{gemini-live-C2U-Xfzz.js → gemini-live-CGEtXm6j.js} +1 -1
- package/web/.output/public/assets/{google-generative-ai-8HY6m7rq.js → google-generative-ai-DcqlQJ6d.js} +1 -1
- package/web/.output/public/assets/{google-vertex-DnCA4qzU.js → google-vertex-C5RXjS_e.js} +1 -1
- package/web/.output/public/assets/{gpt-live-CEMTjMri.js → gpt-live-C4ltEjG_.js} +1 -1
- package/web/.output/public/assets/{index-C8C76R86.js → index-DCgpDQKf.js} +30 -30
- package/web/.output/public/assets/info-CGMF4Cdc.js +1 -0
- package/web/.output/public/assets/keating-stream-g73cFcJe.js +11 -0
- package/web/.output/public/assets/{learner-context-D0BfhTjc.js → learner-context-CpkZOwpe.js} +1 -1
- package/web/.output/public/assets/{library-pPmUSBEY.js → library-Dt_HrttW.js} +5 -5
- package/web/.output/public/assets/{live-context-CYuoXPUI.js → live-context-D5leiub7.js} +1 -1
- package/web/.output/public/assets/{mistral-conversations-BehK5A17.js → mistral-conversations-BSUNv6T_.js} +1 -1
- package/web/.output/public/assets/{openai-codex-responses-vVGnXFbc.js → openai-codex-responses-BEjWFOsh.js} +1 -1
- package/web/.output/public/assets/{openai-completions-SUIeYkEW.js → openai-completions-XWr91hin.js} +1 -1
- package/web/.output/public/assets/{openai-realtime-BSeGY5DQ.js → openai-realtime-BERRi9aO.js} +1 -1
- package/web/.output/public/assets/{openai-responses-DzgNIiYy.js → openai-responses-DeNWT5uB.js} +1 -1
- package/web/.output/public/assets/{openai-responses-shared-CHf6ek3_.js → openai-responses-shared-BdPh5feu.js} +1 -1
- package/web/.output/public/assets/{openai-tts-DRXdgxDT.js → openai-tts-ChGSz4r8.js} +1 -1
- package/web/.output/public/assets/{operation-BMdkNnIS.js → operation-kDIu8RLw.js} +2 -2
- package/web/.output/public/assets/{pi-messages-CpI94BCF.js → pi-messages-pzwJsgas.js} +1 -1
- package/web/.output/public/assets/{public-client-KRBnkgBr.js → public-client-CqivHtfG.js} +1 -1
- package/web/.output/public/assets/{recipes-BcSW8MlI.js → recipes-lg2hVa6Q.js} +1 -1
- package/web/.output/public/assets/{renderer-CKD_Hn-d.js → renderer-Cx1jCM2v.js} +1 -1
- package/web/.output/public/assets/{segments-nMdXcVhb.js → segments-BuQ4O8Bd.js} +1 -1
- package/web/.output/public/assets/{shared-actions-Bj56xHM3.js → shared-actions-B9eYiZAR.js} +1 -1
- package/web/.output/public/assets/{shared-renderer-C-yYfXvq.js → shared-renderer-hMxAoPZb.js} +7 -7
- package/web/.output/public/assets/shared-sessions-CwS3OLWR.js +5 -0
- package/web/.output/public/assets/{srs-WAeRnL8v.js → srs-BBTX4fCR.js} +1 -1
- package/web/.output/public/assets/{tavus-live-CVb9mE_J.js → tavus-live-HpBIH49i.js} +1 -1
- package/web/.output/public/assets/{topic-categorization-DHcL_IrS.js → topic-categorization-DfJaArmq.js} +1 -1
- package/web/.output/public/assets/trajectory-artifacts-EvNqJEHH.js +3 -0
- package/web/.output/public/assets/trajectory-store-C3qzwrr6.js +2 -0
- package/web/.output/public/assets/{transformers.web-CUMRYLoV.js → transformers.web-CrNvRfsr.js} +1 -1
- package/web/.output/public/assets/use-review-passes-DmWsvYdF.js +8 -0
- package/web/.output/public/assets/{use-sessions-C33USzrV.js → use-sessions-3UElISPk.js} +1 -1
- package/web/.output/public/assets/{useCoursesAccess-Zfb1Jqw-.js → useCoursesAccess-BgOspZex.js} +1 -1
- package/web/.output/public/assets/user-DEmM1U0O.js +1 -0
- package/web/.output/public/index.html +7 -7
- package/web/.output/public/sw.js +1 -1
- package/web/.output/server/_chunks/renderer-template.mjs +1 -1
- package/web/.output/server/_libs/h3+rou3+srvx.mjs +1 -1
- package/web/.output/server/index.mjs +1191 -1112
- package/web/.output/public/assets/CourseWorkspace-McgEEARK.js +0 -25
- package/web/.output/public/assets/ModelSelector-CiiiT7sM.js +0 -1
- package/web/.output/public/assets/OpenUIPreview-C8sgkYAj.js +0 -1
- package/web/.output/public/assets/PatternDigestPanel-Ctm7smvT.js +0 -1
- package/web/.output/public/assets/TrajectoryReview-DkC_NtyR.js +0 -35
- package/web/.output/public/assets/TrajectoryReviewIndex-C7pg9K9U.js +0 -1
- package/web/.output/public/assets/TrajectoryReviewWorkspace-D80QHrDn.js +0 -1
- package/web/.output/public/assets/calibration-B8NNSy6-.js +0 -1
- package/web/.output/public/assets/desktop-offline-BOKnmvYX.js +0 -2
- package/web/.output/public/assets/keating-stream-DeWgIdIv.js +0 -11
- package/web/.output/public/assets/shared-sessions-B2FsK7oM.js +0 -5
- package/web/.output/public/assets/trajectory-artifacts-B47xntcj.js +0 -3
- package/web/.output/public/assets/trajectory-store-CFat_se9.js +0 -2
- package/web/.output/public/assets/use-review-passes-BTc5nGD9.js +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-DhwEJgBQ.js","assets/nodepod-wasm-BWaXBLCc.js","assets/rolldown-runtime-BG2f4sTM.js","assets/src-Coh-MdCI.js","assets/step-BMMfLPEQ.js","assets/chunk-CSCIHK7Q-Bfm4uWe_.js","assets/chunk-5ZQYHXKU-BrKmJEe6.js","assets/math-Bi_r_ZWc.js","assets/dist-Dn1yD5k-.js","assets/chunk-WU5MYG2G-mdN9oGKc.js","assets/chunk-O5CBEL6O-TjaGWejH.js","assets/chunk-BSJP7CBP-4fgVkfpe.js","assets/chunk-L5ZTLDWV-D7gtJqlC.js","assets/chunk-NZK2D7GU-C08XdwKT.js","assets/chunk-3OPIFGDE-DTo5R0OT.js","assets/rough.esm-CSKSodPl.js","assets/chunk-KSCS5N6A-DXGmmiPL.js","assets/chunk-LZXEDZCA-Sv1_q409.js","assets/chunk-XPW4576I-C4krIsPP.js","assets/CodeHighlighter-
|
|
2
|
-
import{r as e,s as t,t as n}from"./rolldown-runtime-BG2f4sTM.js";import{S as r,T as i,_ as a,b as o,g as s,h as c,m as l,v as u,x as d,y as f}from"./syntax-highlighter-Buac5fmw.js";import{F as p}from"./operation-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-DhwEJgBQ.js","assets/nodepod-wasm-BWaXBLCc.js","assets/rolldown-runtime-BG2f4sTM.js","assets/src-Coh-MdCI.js","assets/step-BMMfLPEQ.js","assets/chunk-CSCIHK7Q-Bfm4uWe_.js","assets/chunk-5ZQYHXKU-BrKmJEe6.js","assets/math-Bi_r_ZWc.js","assets/dist-Dn1yD5k-.js","assets/chunk-WU5MYG2G-mdN9oGKc.js","assets/chunk-O5CBEL6O-TjaGWejH.js","assets/chunk-BSJP7CBP-4fgVkfpe.js","assets/chunk-L5ZTLDWV-D7gtJqlC.js","assets/chunk-NZK2D7GU-C08XdwKT.js","assets/chunk-3OPIFGDE-DTo5R0OT.js","assets/rough.esm-CSKSodPl.js","assets/chunk-KSCS5N6A-DXGmmiPL.js","assets/chunk-LZXEDZCA-Sv1_q409.js","assets/chunk-XPW4576I-C4krIsPP.js","assets/CodeHighlighter-DhI0IV5H.js","assets/syntax-highlighter-Buac5fmw.js","assets/index-DCgpDQKf.js","assets/operation-kDIu8RLw.js","assets/calibration-7gf-WNR5.js","assets/local-setting-MxAmyvqH.js","assets/desktop-offline-IzFtwAhh.js","assets/public-client-CqivHtfG.js","assets/notorganic-desktop-Dx4qYMPd.js","assets/srs-BBTX4fCR.js","assets/event-stream-qbAZIAKV.js","assets/__vite-browser-external-BiaOLN6f.js","assets/utils-DKF99Hx-.js","assets/with-selector-Csw1EGl2.js","assets/index-CqQiLJzM.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e,s as t,t as n}from"./rolldown-runtime-BG2f4sTM.js";import{S as r,T as i,_ as a,b as o,g as s,h as c,m as l,v as u,x as d,y as f}from"./syntax-highlighter-Buac5fmw.js";import{F as p}from"./operation-kDIu8RLw.js";import{n as m}from"./nodepod-wasm-BWaXBLCc.js";import{M as h,N as g,Yn as _,ri as v,wt as y}from"./index-DCgpDQKf.js";import{D as b,S as x,i as S,n as C}from"./nodepod-runtime-DjuxBODo.js";import{t as w}from"./createLucideIcon-C_7xXnHN.js";import{t as ee}from"./circle-alert-D3ZnhkzN.js";import{t as T}from"./loader-circle-NSGC9iIj.js";import{t as te}from"./check-BQLdkQGc.js";import{c as E}from"./Select-BYfJxqbI.js";import{t as ne}from"./x-dksMGet2.js";var re=w(`audio-lines`,[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]),ie=w(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),ae=w(`flag`,[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]),oe=w(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),se=w(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),ce=w(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),le=w(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),ue=w(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),de=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pe={};function me(e,t){return((t||pe).jsx?fe:de).test(e)}var he=/[ \t\n\f\r]/g;function ge(e){return typeof e==`object`?e.type===`text`?_e(e.value):!1:_e(e)}function _e(e){return e.replace(he,``)===``}var ve=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`/`,d=`*`,f=``;function p(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,p=1;function h(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
3
3
|
`);p=~n?e.length-n:p+e.length}function g(){var e={line:l,column:p};return function(t){return t.position=new _(e),b(),t}}function _(e){this.start=e,this.end={line:l,column:p},this.source=t.source}_.prototype.content=e;function v(n){var r=Error(t.source+`:`+l+`:`+p+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=p,r.source=e,!t.silent)throw r}function y(t){var n=t.exec(e);if(n){var r=n[0];return h(r),e=e.slice(r.length),n}}function b(){y(i)}function x(e){var t;for(e||=[];t=S();)t!==!1&&e.push(t);return e}function S(){var t=g();if(!(u!=e.charAt(0)||d!=e.charAt(1))){for(var n=2;f!=e.charAt(n)&&(d!=e.charAt(n)||u!=e.charAt(n+1));)++n;if(n+=2,f===e.charAt(n-1))return v(`End of comment missing`);var r=e.slice(2,n-2);return p+=2,h(r),e=e.slice(n),p+=2,t({type:`comment`,comment:r})}}function C(){var e=g(),t=y(a);if(t){if(S(),!y(o))return v(`property missing ':'`);var r=y(s),i=e({type:`declaration`,property:m(t[0].replace(n,f)),value:r?m(r[0].replace(n,f)):f});return y(c),i}}function w(){var e=[];x(e);for(var t;t=C();)t!==!1&&(e.push(t),x(e));return e}return b(),w()}function m(e){return e?e.replace(l,f):f}t.exports=p})),ye=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(ve());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),be=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),xe=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(ye()),r=be();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Se=we(`end`),Ce=we(`start`);function we(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Te(e){let t=Ce(e),n=Se(e);if(t&&n)return{start:t,end:n}}function Ee(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Oe(e.position):`start`in e||`end`in e?Oe(e):`line`in e||`column`in e?De(e):``}function De(e){return ke(e&&e.line)+`:`+ke(e&&e.column)}function Oe(e){return De(e&&e.start)+`-`+De(e&&e.end)}function ke(e){return e&&typeof e==`number`?e:1}var Ae=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Ee(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ae.prototype.file=``,Ae.prototype.name=``,Ae.prototype.reason=``,Ae.prototype.message=``,Ae.prototype.stack=``,Ae.prototype.column=void 0,Ae.prototype.line=void 0,Ae.prototype.ancestors=void 0,Ae.prototype.cause=void 0,Ae.prototype.fatal=void 0,Ae.prototype.place=void 0,Ae.prototype.ruleId=void 0,Ae.prototype.source=void 0;var je=t(xe(),1),Me={}.hasOwnProperty,Ne=new Map,Pe=/[A-Z]/g,Fe=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Ie=new Set([`td`,`th`]);function Le(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Je(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=qe(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?o:f,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Re(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Re(e,t,n){if(t.type===`element`)return ze(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Be(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return He(e,t,n);if(t.type===`mdxjsEsm`)return Ve(e,t);if(t.type===`root`)return Ue(e,t,n);if(t.type===`text`)return We(e,t)}function ze(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=o,e.schema=i),e.ancestors.push(t);let a=et(e,t.tagName,!1),s=Ye(e,t),c=Ze(e,t);return Fe.has(t.tagName)&&(c=c.filter(function(e){return typeof e==`string`?!ge(e):!0})),Ge(e,s,a,t),Ke(s,c),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Be(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}tt(e,t.position)}function Ve(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);tt(e,t.position)}function He(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=o,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:et(e,t.name,!0),s=Xe(e,t),c=Ze(e,t);return Ge(e,s,a,t),Ke(s,c),e.ancestors.pop(),e.schema=r,e.create(t,a,s,n)}function Ue(e,t,n){let r={};return Ke(r,Ze(e,t)),e.create(t,e.Fragment,r,n)}function We(e,t){return t.value}function Ge(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ke(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function qe(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Je(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Ce(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Ye(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Me.call(t.properties,i)){let a=Qe(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Ie.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Xe(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else tt(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else tt(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Ze(e,t){let n=[],r=-1,i=e.passKeys?new Map:Ne;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Re(e,a,o);s!==void 0&&n.push(s)}return n}function Qe(e,t,n){let i=d(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?u(n):a(n)),i.property===`style`){let t=typeof n==`object`?n:$e(e,String(n));return e.stylePropertyNameCase===`css`&&(t=nt(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&i.space?r[i.property]||i.property:i.attribute,n]}}function $e(e,t){try{return(0,je.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Ae("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function et(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=me(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=me(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Me.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);tt(e)}function tt(e,t){let n=new Ae("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function nt(e){let t={},n;for(n in e)Me.call(e,n)&&(t[rt(n)]=e[n]);return t}function rt(e){let t=e.replace(Pe,it);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function it(e){return`-`+e.toLowerCase()}var at={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},ot={};function st(e,t){let n=t||ot;return ct(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function ct(e,t,n){if(ut(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return lt(e.children,t,n)}return Array.isArray(e)?lt(e,t,n):``}function lt(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ct(e[i],t,n);return r.join(``)}function ut(e){return!!(e&&typeof e==`object`)}function dt(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function ft(e,t){return e.length>0?(dt(e,e.length,0,t),e):t}var pt={}.hasOwnProperty;function mt(e){let t={},n=-1;for(;++n<e.length;)ht(t,e[n]);return t}function ht(e,t){let n;for(n in t){let r=(pt.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){pt.call(r,a)||(r[a]=[]);let e=i[a];gt(r[a],Array.isArray(e)?e:e?[e]:[])}}}function gt(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);dt(e,0,0,r)}var _t=Et(/[A-Za-z]/),vt=Et(/[\dA-Za-z]/),yt=Et(/[#-'*+\--9=?A-Z^-~]/);function bt(e){return e!==null&&(e<32||e===127)}var xt=Et(/\d/),St=Et(/[\dA-Fa-f]/),Ct=Et(/[!-/:-@[-`{-~]/);function D(e){return e!==null&&e<-2}function O(e){return e!==null&&(e<0||e===32)}function k(e){return e===-2||e===-1||e===32}var wt=Et(/\p{P}|\p{S}/u),Tt=Et(/\s/);function Et(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function A(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return k(r)?(e.enter(n),s(r)):t(r)}function s(r){return k(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Dt={tokenize:Ot};function Ot(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),A(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return D(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var kt={tokenize:jt},At={tokenize:Mt};function jt(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return dt(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(At,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(At,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return D(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;dt(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Mt(e,t,n){return A(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Nt(e){if(e===null||O(e)||Tt(e))return 1;if(wt(e))return 2}function Pt(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Ft={name:`attention`,resolveAll:It,tokenize:Lt};function It(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Rt(d,-c),Rt(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=ft(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=ft(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=ft(l,Pt(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=ft(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=ft(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,dt(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Lt(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Nt(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Nt(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Rt(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var zt={name:`autolink`,tokenize:Bt};function Bt(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return _t(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||vt(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||vt(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||bt(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):yt(t)?(e.consume(t),l):n(t)}function u(e){return vt(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||vt(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Vt={partial:!0,tokenize:Ht};function Ht(e,t,n){return r;function r(t){return k(t)?A(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||D(e)?t(e):n(e)}}var Ut={continuation:{tokenize:Gt},exit:Kt,name:`blockQuote`,tokenize:Wt};function Wt(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return k(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Gt(e,t,n){let r=this;return i;function i(t){return k(t)?A(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Ut,t,n)(r)}}function Kt(e){e.exit(`blockQuote`)}var qt={name:`characterEscape`,tokenize:Jt};function Jt(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Ct(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Yt={name:`characterReference`,tokenize:Xt};function Xt(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),u):(e.enter(`characterReferenceValue`),a=31,o=vt,d(t))}function u(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=St,d):(e.enter(`characterReferenceValue`),a=7,o=xt,d(t))}function d(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===vt&&!l(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),d):n(s)}}var Zt={partial:!0,tokenize:en},Qt={concrete:!0,name:`codeFenced`,tokenize:$t};function $t(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),k(t)?A(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||D(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Zt,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||D(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):k(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),A(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||D(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||D(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&k(t)?A(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||D(t)?e.check(Zt,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||D(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),k(t)?A(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),k(t)?A(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||D(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function en(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var tn={name:`codeIndented`,tokenize:rn},nn={partial:!0,tokenize:an};function rn(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),A(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):D(t)?e.attempt(nn,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||D(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function an(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):D(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):A(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):D(e)?i(e):n(e)}}var on={name:`codeText`,previous:cn,resolve:sn,tokenize:ln};function sn(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function cn(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function ln(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):D(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||D(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var un=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&dn(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),dn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),dn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);dn(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);dn(this.left,t.reverse())}}};function dn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function fn(e){let t={},n=-1,r,i,a,o,s,c,l,u=new un(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,pn(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return dt(e,0,1/0,u.slice(0)),!l}function pn(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var mn={resolve:gn,tokenize:_n},hn={partial:!0,tokenize:vn};function gn(e){return fn(e),e}function _n(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):D(t)?e.check(hn,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function vn(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A(e,a,`linePrefix`)}function a(i){if(i===null||D(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function yn(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||bt(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||D(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||O(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||bt(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function bn(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):D(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||D(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!k(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function xn(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):D(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||D(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Sn(e,t){let n;return r;function r(i){return D(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):k(i)?A(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}function Cn(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var wn={name:`definition`,tokenize:En},Tn={partial:!0,tokenize:Dn};function En(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return bn.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Cn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return O(t)?Sn(e,l)(t):l(t)}function l(t){return yn(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Tn,d,d)(t)}function d(t){return k(t)?A(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||D(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Dn(e,t,n){return r;function r(t){return O(t)?Sn(e,i)(t):n(t)}function i(t){return xn(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return k(t)?A(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||D(e)?t(e):n(e)}}var On={name:`hardBreakEscape`,tokenize:kn};function kn(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return D(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var An={name:`headingAtx`,resolve:jn,tokenize:Mn};function jn(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},dt(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Mn(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||O(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||D(n)?(e.exit(`atxHeading`),t(n)):k(n)?A(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||O(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Nn=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Pn=[`pre`,`script`,`style`,`textarea`],Fn={concrete:!0,name:`htmlFlow`,resolveTo:Rn,tokenize:zn},In={partial:!0,tokenize:Vn},Ln={partial:!0,tokenize:Bn};function Rn(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function zn(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:le):_t(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):_t(a)?(e.consume(a),i=4,r.interrupt?t:le):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:le):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:E:m):n(i)}function h(t){return _t(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||O(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Pn.includes(l)?(i=1,r.interrupt?t(s):E(s)):Nn.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):E(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||vt(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:E):n(i)}function v(t){return k(t)?(e.consume(t),v):T(t)}function y(t){return t===47?(e.consume(t),T):t===58||t===95||_t(t)?(e.consume(t),b):k(t)?(e.consume(t),y):T(t)}function b(t){return t===45||t===46||t===58||t===95||vt(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):k(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):k(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,ee):t===null||D(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||O(t)?x(t):(e.consume(t),w)}function ee(e){return e===47||e===62||k(e)?y(e):n(e)}function T(t){return t===62?(e.consume(t),te):n(t)}function te(t){return t===null||D(t)?E(t):k(t)?(e.consume(t),te):n(t)}function E(t){return t===45&&i===2?(e.consume(t),ae):t===60&&i===1?(e.consume(t),oe):t===62&&i===4?(e.consume(t),ue):t===63&&i===3?(e.consume(t),le):t===93&&i===5?(e.consume(t),ce):D(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(In,de,ne)(t)):t===null||D(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),E)}function ne(t){return e.check(Ln,re,de)(t)}function re(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ie}function ie(t){return t===null||D(t)?ne(t):(e.enter(`htmlFlowData`),E(t))}function ae(t){return t===45?(e.consume(t),le):E(t)}function oe(t){return t===47?(e.consume(t),o=``,se):E(t)}function se(t){if(t===62){let n=o.toLowerCase();return Pn.includes(n)?(e.consume(t),ue):E(t)}return _t(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),se):E(t)}function ce(t){return t===93?(e.consume(t),le):E(t)}function le(t){return t===62?(e.consume(t),ue):t===45&&i===2?(e.consume(t),le):E(t)}function ue(t){return t===null||D(t)?(e.exit(`htmlFlowData`),de(t)):(e.consume(t),ue)}function de(n){return e.exit(`htmlFlow`),t(n)}}function Bn(e,t,n){let r=this;return i;function i(t){return D(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Vn(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Vt,t,n)}}var Hn={name:`htmlText`,tokenize:Un};function Un(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):_t(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):_t(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):D(t)?(o=d,oe(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ae(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):D(t)?(o=h,oe(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ae(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ae(t):D(t)?(o=v,oe(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):D(t)?(o=y,oe(t)):(e.consume(t),y)}function b(e){return e===62?ae(e):y(e)}function x(t){return _t(t)?(e.consume(t),S):n(t)}function S(t){return t===45||vt(t)?(e.consume(t),S):C(t)}function C(t){return D(t)?(o=C,oe(t)):k(t)?(e.consume(t),C):ae(t)}function w(t){return t===45||vt(t)?(e.consume(t),w):t===47||t===62||O(t)?ee(t):n(t)}function ee(t){return t===47?(e.consume(t),ae):t===58||t===95||_t(t)?(e.consume(t),T):D(t)?(o=ee,oe(t)):k(t)?(e.consume(t),ee):ae(t)}function T(t){return t===45||t===46||t===58||t===95||vt(t)?(e.consume(t),T):te(t)}function te(t){return t===61?(e.consume(t),E):D(t)?(o=te,oe(t)):k(t)?(e.consume(t),te):ee(t)}function E(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ne):D(t)?(o=E,oe(t)):k(t)?(e.consume(t),E):(e.consume(t),re)}function ne(t){return t===i?(e.consume(t),i=void 0,ie):t===null?n(t):D(t)?(o=ne,oe(t)):(e.consume(t),ne)}function re(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||O(t)?ee(t):(e.consume(t),re)}function ie(e){return e===47||e===62||O(e)?ee(e):n(e)}function ae(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function oe(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),se}function se(t){return k(t)?A(e,ce,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ce(t)}function ce(t){return e.enter(`htmlTextData`),o(t)}}var Wn={name:`labelEnd`,resolveAll:Jn,resolveTo:Yn,tokenize:Xn},Gn={tokenize:Zn},Kn={tokenize:Qn},qn={tokenize:$n};function Jn(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&dt(e,0,e.length,n),e}function Yn(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=ft(s,e.slice(a+1,a+r+3)),s=ft(s,[[`enter`,u,t]]),s=ft(s,Pt(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=ft(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=ft(s,e.slice(o+1)),s=ft(s,[[`exit`,c,t]]),dt(e,a,e.length,s),e}function Xn(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Cn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Gn,u,o?u:d)(t):t===91?e.attempt(Kn,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(qn,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Zn(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return O(t)?Sn(e,a)(t):a(t)}function a(t){return t===41?u(t):yn(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return O(t)?Sn(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?xn(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return O(t)?Sn(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Qn(e,t,n){let r=this;return i;function i(t){return bn.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Cn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function $n(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var er={name:`labelStartImage`,resolveAll:Wn.resolveAll,tokenize:tr};function tr(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var nr={name:`labelStartLink`,resolveAll:Wn.resolveAll,tokenize:rr};function rr(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var ir={name:`lineEnding`,tokenize:ar};function ar(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),A(e,t,`linePrefix`)}}var or={name:`thematicBreak`,tokenize:sr};function sr(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||D(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),k(t)?A(e,s,`whitespace`)(t):s(t))}}var cr={continuation:{tokenize:fr},exit:mr,name:`list`,tokenize:dr},lr={partial:!0,tokenize:hr},ur={partial:!0,tokenize:pr};function dr(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:xt(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(or,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return xt(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Vt,r.interrupt?n:u,e.attempt(lr,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return k(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function fr(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Vt,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,A(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!k(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ur,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,A(e,e.attempt(cr,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function pr(e,t,n){let r=this;return A(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function mr(e){e.exit(this.containerState.type)}function hr(e,t,n){let r=this;return A(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!k(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var gr={name:`setextUnderline`,resolveTo:_r,tokenize:vr};function _r(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function vr(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),k(t)?A(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||D(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var yr={tokenize:br};function br(e){let t=this,n=e.attempt(Vt,r,e.attempt(this.parser.constructs.flowInitial,i,A(e,e.attempt(this.parser.constructs.flow,i,e.attempt(mn,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var xr={resolveAll:Tr()},Sr=wr(`string`),Cr=wr(`text`);function wr(e){return{resolveAll:Tr(e===`text`?Er:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Tr(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Er(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Dr=e({attentionMarkers:()=>Fr,contentInitial:()=>kr,disable:()=>Ir,document:()=>Or,flow:()=>jr,flowInitial:()=>Ar,insideSpan:()=>Pr,string:()=>Mr,text:()=>Nr}),Or={42:cr,43:cr,45:cr,48:cr,49:cr,50:cr,51:cr,52:cr,53:cr,54:cr,55:cr,56:cr,57:cr,62:Ut},kr={91:wn},Ar={[-2]:tn,[-1]:tn,32:tn},jr={35:An,42:or,45:[gr,or],60:Fn,61:gr,95:or,96:Qt,126:Qt},Mr={38:Yt,92:qt},Nr={[-5]:ir,[-4]:ir,[-3]:ir,33:er,38:Yt,42:Ft,60:[zt,Hn],91:nr,92:[On,qt],93:Wn,95:Ft,96:on},Pr={null:[Ft,xr]},Fr={null:[42,95]},Ir={null:[]};function Lr(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=ft(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Pt(a,l.events,l),l.events):[]}function f(e,t){return zr(p(e),t)}function p(e){return Rr(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,T()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){D(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,T()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=ee(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&dt(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function ee(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Rr(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function zr(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
4
4
|
`;break;case-3:o=`\r
|
|
5
5
|
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Br(e){let t={constructs:mt([Dr,...(e||{}).extensions||[]]),content:n(Dt),defined:[],document:n(kt),flow:n(yr),lazy:{},string:n(Sr),text:n(Cr)};return t;function n(e){return n;function n(n){return Lr(t,e,n)}}}function Vr(e){for(;!fn(e););return e}var Hr=/[\0\t\n\r]/g;function Ur(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Hr.lastIndex=u,c=Hr.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}function Wr(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var Gr=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Kr(e){return e.replace(Gr,qr)}function qr(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Wr(n.slice(t?2:1),t?16:10)}return l(n)||e}var Jr={}.hasOwnProperty;function Yr(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Xr(n)(Vr(Br(n).document().write(Ur()(e,t,!0))))}function Xr(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Ae),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(Te),blockQuote:a(be),characterEscape:T,characterReference:T,codeFenced:a(xe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(xe,o),codeText:a(Se,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(Ce),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(we),hardBreakEscape:a(De),hardBreakTrailing:a(De),htmlFlow:a(Oe,o),htmlFlowData:T,htmlText:a(Oe,o),htmlTextData:T,image:a(ke),label:o,link:a(Ae),listItem:a(Me),listItemValue:p,listOrdered:a(je,f),listUnordered:a(je),paragraph:a(Ne),reference:pe,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Te),strong:a(Pe),thematicBreak:a(Ie)},exit:{atxHeading:c(),atxHeadingSequence:S,autolink:c(),autolinkEmail:ye,autolinkProtocol:ve,blockQuote:c(),characterEscapeValue:te,characterReferenceMarkerHexadecimal:he,characterReferenceMarkerNumeric:he,characterReferenceValue:ge,characterReference:_e,codeFenced:c(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:te,codeIndented:c(v),codeText:c(ae),codeTextData:te,data:te,definition:c(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(ne),hardBreakTrailing:c(ne),htmlFlow:c(re),htmlFlowData:te,htmlText:c(ie),htmlTextData:te,image:c(se),label:le,labelText:ce,lineEnding:E,link:c(oe),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:me,resourceDestinationString:ue,resourceTitleString:de,resource:fe,setextHeading:c(ee),setextHeadingLineSequence:w,setextHeadingText:C,strong:c(),thematicBreak:c()}};Qr(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:u,buffer:o,resume:d,data:n},c=[],l=-1;for(;++l<e.length;)(e[l][1].type===`listOrdered`||e[l][1].type===`listUnordered`)&&(e[l][0]===`enter`?c.push(l):l=i(e,c.pop(),l));for(l=-1;++l<e.length;){let n=t[e[l][0]];Jr.call(n,e[l][1].type)&&n[e[l][1].type].call(Object.assign({sliceSerialize:e[l][2].sliceSerialize},a),e[l][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||ei).call(a,void 0,e[0])}for(r.position={start:Zr(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Zr(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},l=-1;++l<t.transforms.length;)r=t.transforms[l](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Zr(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||ei).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Ee({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Zr(e.end)}function d(){return st(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Cn(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Fe(),n.position={start:Zr(e.start),end:void 0},t.push(n)),this.stack.push(n)}function te(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Zr(e.end)}function E(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Zr(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),te.call(this,e))}function ne(){this.data.atHardBreak=!0}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function oe(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function se(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ce(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Kr(t),n.identifier=Cn(t).toLowerCase()}function le(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ue(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function de(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function fe(){this.data.inReference=void 0}function pe(){this.data.referenceType=`collapsed`}function me(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Cn(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function he(e){this.data.characterReferenceType=e.type}function ge(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Wr(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=l(t);let i=this.stack[this.stack.length-1];i.value+=r}function _e(e){let t=this.stack.pop();t.position.end=Zr(e.end)}function ve(e){te.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ye(e){te.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function be(){return{type:`blockquote`,children:[]}}function xe(){return{type:`code`,lang:null,meta:null,value:``}}function Se(){return{type:`inlineCode`,value:``}}function Ce(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function we(){return{type:`emphasis`,children:[]}}function Te(){return{type:`heading`,depth:0,children:[]}}function De(){return{type:`break`}}function Oe(){return{type:`html`,value:``}}function ke(){return{type:`image`,title:null,url:``,alt:null}}function Ae(){return{type:`link`,title:null,url:``,children:[]}}function je(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Me(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ne(){return{type:`paragraph`,children:[]}}function Pe(){return{type:`strong`,children:[]}}function Fe(){return{type:`text`,value:``}}function Ie(){return{type:`thematicBreak`}}}function Zr(e){return{line:e.line,column:e.column,offset:e.offset}}function Qr(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Qr(e,r):$r(e,r)}}function $r(e,t){let n;for(n in t)if(Jr.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function ei(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Ee({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ee({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Ee({start:t.start,end:t.end})+`) is still open`)}function ti(e){let t=this;t.parser=n;function n(n){return Yr(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}var ni=typeof self==`object`?self:globalThis,ri=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new ni[e](t)},ii=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(ri(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(ri(a,o),i)};return r},ai=e=>ii(new Map,e)(0),oi=``,{toString:si}={},{keys:ci}=Object,li=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=si.call(e).slice(8,-1);switch(n){case`Array`:return[1,oi];case`Object`:return[2,oi];case`Date`:return[3,oi];case`RegExp`:return[4,oi];case`Map`:return[5,oi];case`Set`:return[6,oi];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},ui=([e,t])=>e===0&&(t===`function`||t===`symbol`),di=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=li(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of ci(r))(e||!ui(li(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(ui(li(n))||ui(li(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!ui(li(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},fi=(e,{json:t,lossy:n}={})=>{let r=[];return di(!(t||n),!!t,new Map,r)(e),r},pi=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?ai(fi(e,t)):structuredClone(e):(e,t)=>ai(fi(e,t));function mi(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&vt(e.charCodeAt(n+1))&&vt(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function hi(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function gi(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function _i(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||hi,r=e.options.footnoteBackLabel||gi,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=mi(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...pi(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
@@ -385,6 +385,6 @@ prepare();
|
|
|
385
385
|
|
|
386
386
|
`)||`(no output)`}function t_(e){return[e.stdout?`stdout\n${e.stdout.trimEnd()}`:``,e.stderr?`stderr\n${e.stderr.trimEnd()}`:``,e.error_code?`error\n${e.error_code}`:``].filter(Boolean).join(`
|
|
387
387
|
|
|
388
|
-
`)||`(no output)`}function n_(e){return e.status===`succeeded`||e.status===`failed`||e.status===`cancelled`}function r_({children:e,code:t,language:n}){let[r,i]=(0,M.useState)(!1),[a,o]=(0,M.useState)(t),[s,c]=(0,M.useState)(!1),[l,u]=(0,M.useState)(!1),[d,f]=(0,M.useState)(null),[p,m]=(0,M.useState)(null),[_,v]=(0,M.useState)(``),[y,b]=(0,M.useState)(0),w=(0,M.useMemo)(()=>typeof navigator>`u`?`unavailable`:jg(n,a,Mg()),[y,a,n]),T=Xg(n)&&w!==`unavailable`,ne=w===`cloud`,re=a!==t;(0,M.useEffect)(()=>{let e=()=>b(e=>e+1);return window.addEventListener(`online`,e),window.addEventListener(`offline`,e),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,e)}},[]);let ae=(0,M.useContext)(Qg),oe=ae!==null&&ae===t,se=!oe&&Hg(n,a),de=(0,M.useMemo)(()=>({type:`music-lab`,id:`chat-strudel-snippet`,title:`Strudel`,code:a,visualization:`pianoroll`}),[a]);(0,M.useEffect)(()=>{(oe||!re)&&o(t)},[t,oe]);let fe=(0,M.useMemo)(()=>oe?`writing…`:se?`Runs in the Strudel sandbox`:l?ne?`Running in Cloudflare`:`Running on this device`:_?`Run failed`:p?p.status===`succeeded`?`Finished`:p.status:d?d.ok?`Finished`:`Exit ${d.exitCode??`unknown`}`:w===`unavailable`&&Xg(n)?typeof navigator<`u`&&!navigator.onLine?`Unavailable offline`:`Hosted runs unavailable`:T?ne?`Runs in Cloudflare`:`Runs on this device`:`Not runnable`,[_,w,ne,p,n,d,T,l,oe,se]),pe=(0,M.useCallback)(async()=>{if(!(!T||l)){u(!0),v(``),f(null),m(null);try{if(ne){let e=Yg(n),t=e===`py`||e===`python`?`python`:`typescript`,r=Mg(),i=await Og({code:a,language:t,filename:t===`python`?`notebook.py`:`notebook.ts`,execution:{executor:`cloud`,device_class:r.deviceClass,network_class:r.networkClass,code_bytes:new TextEncoder().encode(a).byteLength}});m(i);for(let e=0;!n_(i)&&e<18;e+=1)await new Promise(e=>window.setTimeout(e,1e3)),i=await kg(i.id,i.pds_snapshot_id),m(i);if(!n_(i))throw Error(`Cloud run is still running. Try Run again to refresh its output.`);return}if(!S()&&!await C())throw Error(`NodePod could not boot in this browser session.`);let e=await Zg(a,n);f(await x(e.code,e.filename))}catch(e){v(e instanceof Error?e.message:String(e))}finally{u(!1)}}},[a,ne,n,T,l]),me=(0,M.useCallback)(async()=>{try{await navigator.clipboard.writeText(a),i(!0),window.setTimeout(()=>i(!1),2e3)}catch(e){v(e instanceof Error?e.message:`Could not copy code.`)}},[a]);return(0,j.jsxs)(`div`,{className:g({marginBlock:`1rem`,display:`grid`,gap:`0.5rem`}),children:[(0,j.jsxs)(`div`,{className:g({display:`flex`,flexWrap:`wrap`,alignItems:`center`,justifyContent:`space-between`,gap:`0.5rem`}),children:[(0,j.jsxs)(`div`,{className:g({display:`flex`,minWidth:0,alignItems:`center`,gap:`0.5rem`}),children:[(0,j.jsx)(ue,{size:12,className:g({flexShrink:0,color:`var(--muted-foreground)`})}),(0,j.jsx)(`span`,{className:g({fontSize:`11px`,fontWeight:600,textTransform:`uppercase`,letterSpacing:`0.06em`,color:`var(--muted-foreground)`}),children:se?`Strudel`:n||`text`}),(0,j.jsxs)(`span`,{className:g({display:`inline-flex`,alignItems:`center`,gap:`0.25rem`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontSize:`11px`,color:`var(--muted-foreground)`}),children:[oe&&(0,j.jsx)(`span`,{className:g({animation:`pulse 1.4s ease-in-out infinite`,color:`var(--primary)`}),children:`●`}),fe]})]}),(0,j.jsxs)(`div`,{className:g({display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:`0.375rem`,opacity:+!oe,pointerEvents:oe?`none`:`auto`,transition:`opacity 200ms`}),children:[(0,j.jsxs)(`button`,{type:`button`,onClick:()=>{c(e=>!e),v(``)},className:g({display:`inline-flex`,alignItems:`center`,gap:`0.25rem`,borderRadius:`0.375rem`,border:`1px solid var(--border)`,backgroundColor:`var(--background)`,paddingInline:`0.5rem`,paddingBlock:`0.25rem`,fontSize:`11px`,fontWeight:500,color:`var(--foreground)`,transitionProperty:`color, background-color, border-color`,transitionDuration:`150ms`,_hover:{background:`var(--accent)`}}),"aria-pressed":s,children:[(0,j.jsx)(ce,{size:11}),s?`Preview`:`Edit`]}),(0,j.jsxs)(`button`,{type:`button`,onClick:me,className:g({display:`inline-flex`,alignItems:`center`,gap:`0.25rem`,borderRadius:`0.375rem`,border:`1px solid var(--border)`,backgroundColor:`var(--background)`,paddingInline:`0.5rem`,paddingBlock:`0.25rem`,fontSize:`11px`,fontWeight:500,color:`var(--foreground)`,transitionProperty:`color, background-color, border-color`,transitionDuration:`150ms`,_hover:{background:`var(--accent)`}}),children:[r?(0,j.jsx)(te,{size:11}):(0,j.jsx)(ie,{size:11}),r?`Copied`:`Copy`]}),!se&&(0,j.jsxs)(`button`,{type:`button`,onClick:pe,disabled:!T||l||oe,title:T?ne?`Run in the Cloudflare CPU sandbox`:`Run code on this device`:Xg(n)?`This language needs a network connection`:`Only JavaScript, TypeScript, and Python blocks can run here`,className:g({display:`inline-flex`,alignItems:`center`,gap:`0.25rem`,borderRadius:`0.375rem`,border:`1px solid var(--primary)`,backgroundColor:`var(--primary)`,paddingInline:`0.5rem`,paddingBlock:`0.25rem`,fontSize:`11px`,fontWeight:500,color:`var(--primary-foreground)`,transitionProperty:`color, background-color, border-color`,transitionDuration:`150ms`,_hover:{backgroundColor:`color-mix(in srgb, var(--primary) 90%, black)`},_disabled:{cursor:`not-allowed`,borderColor:`var(--border)`,backgroundColor:`var(--muted)`,color:`var(--muted-foreground)`}}),children:[l?(0,j.jsx)(Eg,{size:11}):(0,j.jsx)(E,{size:11}),`Run`]})]})]}),s?(0,j.jsxs)(`div`,{className:g({overflow:`hidden`,borderRadius:`0.5rem`,backgroundColor:`#0d1117`}),children:[(0,j.jsx)(`textarea`,{value:a,onChange:e=>o(e.target.value),spellCheck:!1,className:g({minHeight:`12rem`,width:`100%`,resize:`vertical`,backgroundColor:`transparent`,padding:`1rem`,fontFamily:`var(--mono-display)`,fontSize:`0.82rem`,lineHeight:`1.625`,color:`#c9d1d9`,outline:`none`}),"aria-label":`Editable code`}),re&&(0,j.jsx)(`div`,{className:g({display:`flex`,justifyContent:`flex-end`,borderTop:`1px solid color-mix(in srgb, white 10%, transparent)`,paddingInline:`0.75rem`,paddingBlock:`0.375rem`}),children:(0,j.jsxs)(`button`,{type:`button`,onClick:()=>{o(t),f(null),m(null),v(``)},className:g({display:`inline-flex`,alignItems:`center`,gap:`0.25rem`,borderRadius:`0.375rem`,border:`1px solid color-mix(in srgb, white 15%, transparent)`,paddingInline:`0.5rem`,paddingBlock:`0.25rem`,fontSize:`11px`,fontWeight:500,color:`#c9d1d9`,transitionProperty:`color, background-color, border-color`,transitionDuration:`150ms`,_hover:{backgroundColor:`color-mix(in srgb, white 10%, transparent)`}}),children:[(0,j.jsx)(le,{size:11}),`Reset code`]})})]}):(0,j.jsxs)(`div`,{className:h(`runnable-code-surface`,g({overflow:`hidden`,borderRadius:`0.5rem`,position:`relative`})),children:[e,oe&&(0,j.jsx)(`span`,{"aria-hidden":!0,className:g({position:`absolute`,right:`0.75rem`,bottom:`0.75rem`,width:`0.5rem`,height:`1rem`,background:`var(--primary)`,animation:`pulse 1.1s steps(2, start) infinite`})})]}),se&&!s&&(0,j.jsx)(qg,{node:de}),(d||p||_)&&(0,j.jsxs)(`div`,{className:g({display:`grid`,gap:`0.375rem`,borderTop:`1px solid var(--border)`,paddingTop:`0.5rem`}),children:[(0,j.jsxs)(`div`,{className:g({display:`flex`,alignItems:`center`,gap:`0.5rem`,fontSize:`11px`,fontWeight:600,textTransform:`uppercase`,letterSpacing:`0.06em`,color:`var(--muted-foreground)`}),children:[_||d?.ok===!1||p&&p.status!==`succeeded`?(0,j.jsx)(ee,{size:12,className:g({color:`var(--destructive)`})}):(0,j.jsx)(te,{size:12}),`Output`]}),(0,j.jsx)(`pre`,{className:g({maxHeight:`16rem`,overflow:`auto`,whiteSpace:`pre-wrap`,fontFamily:`var(--mono-display)`,fontSize:`0.75rem`,lineHeight:`1.625`}),children:_||(p?t_(p):d?e_(d):``)})]})]})}var i_=(0,M.lazy)(()=>m(()=>import(`./CodeHighlighter-
|
|
388
|
+
`)||`(no output)`}function n_(e){return e.status===`succeeded`||e.status===`failed`||e.status===`cancelled`}function r_({children:e,code:t,language:n}){let[r,i]=(0,M.useState)(!1),[a,o]=(0,M.useState)(t),[s,c]=(0,M.useState)(!1),[l,u]=(0,M.useState)(!1),[d,f]=(0,M.useState)(null),[p,m]=(0,M.useState)(null),[_,v]=(0,M.useState)(``),[y,b]=(0,M.useState)(0),w=(0,M.useMemo)(()=>typeof navigator>`u`?`unavailable`:jg(n,a,Mg()),[y,a,n]),T=Xg(n)&&w!==`unavailable`,ne=w===`cloud`,re=a!==t;(0,M.useEffect)(()=>{let e=()=>b(e=>e+1);return window.addEventListener(`online`,e),window.addEventListener(`offline`,e),()=>{window.removeEventListener(`online`,e),window.removeEventListener(`offline`,e)}},[]);let ae=(0,M.useContext)(Qg),oe=ae!==null&&ae===t,se=!oe&&Hg(n,a),de=(0,M.useMemo)(()=>({type:`music-lab`,id:`chat-strudel-snippet`,title:`Strudel`,code:a,visualization:`pianoroll`}),[a]);(0,M.useEffect)(()=>{(oe||!re)&&o(t)},[t,oe]);let fe=(0,M.useMemo)(()=>oe?`writing…`:se?`Runs in the Strudel sandbox`:l?ne?`Running in Cloudflare`:`Running on this device`:_?`Run failed`:p?p.status===`succeeded`?`Finished`:p.status:d?d.ok?`Finished`:`Exit ${d.exitCode??`unknown`}`:w===`unavailable`&&Xg(n)?typeof navigator<`u`&&!navigator.onLine?`Unavailable offline`:`Hosted runs unavailable`:T?ne?`Runs in Cloudflare`:`Runs on this device`:`Not runnable`,[_,w,ne,p,n,d,T,l,oe,se]),pe=(0,M.useCallback)(async()=>{if(!(!T||l)){u(!0),v(``),f(null),m(null);try{if(ne){let e=Yg(n),t=e===`py`||e===`python`?`python`:`typescript`,r=Mg(),i=await Og({code:a,language:t,filename:t===`python`?`notebook.py`:`notebook.ts`,execution:{executor:`cloud`,device_class:r.deviceClass,network_class:r.networkClass,code_bytes:new TextEncoder().encode(a).byteLength}});m(i);for(let e=0;!n_(i)&&e<18;e+=1)await new Promise(e=>window.setTimeout(e,1e3)),i=await kg(i.id,i.pds_snapshot_id),m(i);if(!n_(i))throw Error(`Cloud run is still running. Try Run again to refresh its output.`);return}if(!S()&&!await C())throw Error(`NodePod could not boot in this browser session.`);let e=await Zg(a,n);f(await x(e.code,e.filename))}catch(e){v(e instanceof Error?e.message:String(e))}finally{u(!1)}}},[a,ne,n,T,l]),me=(0,M.useCallback)(async()=>{try{await navigator.clipboard.writeText(a),i(!0),window.setTimeout(()=>i(!1),2e3)}catch(e){v(e instanceof Error?e.message:`Could not copy code.`)}},[a]);return(0,j.jsxs)(`div`,{className:g({marginBlock:`1rem`,display:`grid`,gap:`0.5rem`}),children:[(0,j.jsxs)(`div`,{className:g({display:`flex`,flexWrap:`wrap`,alignItems:`center`,justifyContent:`space-between`,gap:`0.5rem`}),children:[(0,j.jsxs)(`div`,{className:g({display:`flex`,minWidth:0,alignItems:`center`,gap:`0.5rem`}),children:[(0,j.jsx)(ue,{size:12,className:g({flexShrink:0,color:`var(--muted-foreground)`})}),(0,j.jsx)(`span`,{className:g({fontSize:`11px`,fontWeight:600,textTransform:`uppercase`,letterSpacing:`0.06em`,color:`var(--muted-foreground)`}),children:se?`Strudel`:n||`text`}),(0,j.jsxs)(`span`,{className:g({display:`inline-flex`,alignItems:`center`,gap:`0.25rem`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontSize:`11px`,color:`var(--muted-foreground)`}),children:[oe&&(0,j.jsx)(`span`,{className:g({animation:`pulse 1.4s ease-in-out infinite`,color:`var(--primary)`}),children:`●`}),fe]})]}),(0,j.jsxs)(`div`,{className:g({display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:`0.375rem`,opacity:+!oe,pointerEvents:oe?`none`:`auto`,transition:`opacity 200ms`}),children:[(0,j.jsxs)(`button`,{type:`button`,onClick:()=>{c(e=>!e),v(``)},className:g({display:`inline-flex`,alignItems:`center`,gap:`0.25rem`,borderRadius:`0.375rem`,border:`1px solid var(--border)`,backgroundColor:`var(--background)`,paddingInline:`0.5rem`,paddingBlock:`0.25rem`,fontSize:`11px`,fontWeight:500,color:`var(--foreground)`,transitionProperty:`color, background-color, border-color`,transitionDuration:`150ms`,_hover:{background:`var(--accent)`}}),"aria-pressed":s,children:[(0,j.jsx)(ce,{size:11}),s?`Preview`:`Edit`]}),(0,j.jsxs)(`button`,{type:`button`,onClick:me,className:g({display:`inline-flex`,alignItems:`center`,gap:`0.25rem`,borderRadius:`0.375rem`,border:`1px solid var(--border)`,backgroundColor:`var(--background)`,paddingInline:`0.5rem`,paddingBlock:`0.25rem`,fontSize:`11px`,fontWeight:500,color:`var(--foreground)`,transitionProperty:`color, background-color, border-color`,transitionDuration:`150ms`,_hover:{background:`var(--accent)`}}),children:[r?(0,j.jsx)(te,{size:11}):(0,j.jsx)(ie,{size:11}),r?`Copied`:`Copy`]}),!se&&(0,j.jsxs)(`button`,{type:`button`,onClick:pe,disabled:!T||l||oe,title:T?ne?`Run in the Cloudflare CPU sandbox`:`Run code on this device`:Xg(n)?`This language needs a network connection`:`Only JavaScript, TypeScript, and Python blocks can run here`,className:g({display:`inline-flex`,alignItems:`center`,gap:`0.25rem`,borderRadius:`0.375rem`,border:`1px solid var(--primary)`,backgroundColor:`var(--primary)`,paddingInline:`0.5rem`,paddingBlock:`0.25rem`,fontSize:`11px`,fontWeight:500,color:`var(--primary-foreground)`,transitionProperty:`color, background-color, border-color`,transitionDuration:`150ms`,_hover:{backgroundColor:`color-mix(in srgb, var(--primary) 90%, black)`},_disabled:{cursor:`not-allowed`,borderColor:`var(--border)`,backgroundColor:`var(--muted)`,color:`var(--muted-foreground)`}}),children:[l?(0,j.jsx)(Eg,{size:11}):(0,j.jsx)(E,{size:11}),`Run`]})]})]}),s?(0,j.jsxs)(`div`,{className:g({overflow:`hidden`,borderRadius:`0.5rem`,backgroundColor:`#0d1117`}),children:[(0,j.jsx)(`textarea`,{value:a,onChange:e=>o(e.target.value),spellCheck:!1,className:g({minHeight:`12rem`,width:`100%`,resize:`vertical`,backgroundColor:`transparent`,padding:`1rem`,fontFamily:`var(--mono-display)`,fontSize:`0.82rem`,lineHeight:`1.625`,color:`#c9d1d9`,outline:`none`}),"aria-label":`Editable code`}),re&&(0,j.jsx)(`div`,{className:g({display:`flex`,justifyContent:`flex-end`,borderTop:`1px solid color-mix(in srgb, white 10%, transparent)`,paddingInline:`0.75rem`,paddingBlock:`0.375rem`}),children:(0,j.jsxs)(`button`,{type:`button`,onClick:()=>{o(t),f(null),m(null),v(``)},className:g({display:`inline-flex`,alignItems:`center`,gap:`0.25rem`,borderRadius:`0.375rem`,border:`1px solid color-mix(in srgb, white 15%, transparent)`,paddingInline:`0.5rem`,paddingBlock:`0.25rem`,fontSize:`11px`,fontWeight:500,color:`#c9d1d9`,transitionProperty:`color, background-color, border-color`,transitionDuration:`150ms`,_hover:{backgroundColor:`color-mix(in srgb, white 10%, transparent)`}}),children:[(0,j.jsx)(le,{size:11}),`Reset code`]})})]}):(0,j.jsxs)(`div`,{className:h(`runnable-code-surface`,g({overflow:`hidden`,borderRadius:`0.5rem`,position:`relative`})),children:[e,oe&&(0,j.jsx)(`span`,{"aria-hidden":!0,className:g({position:`absolute`,right:`0.75rem`,bottom:`0.75rem`,width:`0.5rem`,height:`1rem`,background:`var(--primary)`,animation:`pulse 1.1s steps(2, start) infinite`})})]}),se&&!s&&(0,j.jsx)(qg,{node:de}),(d||p||_)&&(0,j.jsxs)(`div`,{className:g({display:`grid`,gap:`0.375rem`,borderTop:`1px solid var(--border)`,paddingTop:`0.5rem`}),children:[(0,j.jsxs)(`div`,{className:g({display:`flex`,alignItems:`center`,gap:`0.5rem`,fontSize:`11px`,fontWeight:600,textTransform:`uppercase`,letterSpacing:`0.06em`,color:`var(--muted-foreground)`}),children:[_||d?.ok===!1||p&&p.status!==`succeeded`?(0,j.jsx)(ee,{size:12,className:g({color:`var(--destructive)`})}):(0,j.jsx)(te,{size:12}),`Output`]}),(0,j.jsx)(`pre`,{className:g({maxHeight:`16rem`,overflow:`auto`,whiteSpace:`pre-wrap`,fontFamily:`var(--mono-display)`,fontSize:`0.75rem`,lineHeight:`1.625`}),children:_||(p?t_(p):d?e_(d):``)})]})]})}var i_=(0,M.lazy)(()=>m(()=>import(`./CodeHighlighter-DhI0IV5H.js`),__vite__mapDeps([19,20,2,21,22,23,24,25,1,26,27,28,29,30,31,32,33])));function a_(e){let t=null,n=0;return e.split(`
|
|
389
389
|
`).map(e=>{let r=/^(?: {0,3})(`{3,}|~{3,})/.exec(e);if(t)return r&&r[1][0]===t.character&&r[1].length>=t.length&&e.slice(r[0].length).trim()===``&&(t=null),e;if(n===0&&r)return t={character:r[1][0],length:r[1].length},e;let i=``;for(let t=0;t<e.length;){if(e[t]==="`"){let r=t+1;for(;e[r]==="`";)r+=1;let a=r-t;n===0?n=a:n===a&&(n=0),i+=e.slice(t,r),t=r;continue}if(n===0&&e[t]===`\\`&&e[t-1]!==`\\`&&`()[]`.includes(e[t+1]??``)){i+=`$$`,t+=2;continue}i+=e[t],t+=1}return i}).join(`
|
|
390
390
|
`)}var o_=/\|\|([^|]+)\|\|/g;function s_(e){return()=>t=>{function n(t){if(!Array.isArray(t.children))return;let r=[];for(let i of t.children){let t=i.position?.start?.offset,a=i.position?.end?.offset;if(i.type!==`text`||typeof i.value!=`string`||t==null||a==null){n(i),r.push(i);continue}let o=e.filter(e=>e.start<a&&e.end>t),s=Array.from(new Set([t,a,...o.flatMap(e=>[Math.max(t,e.start),Math.min(a,e.end)])])).sort((e,t)=>e-t);for(let e=0;e<s.length-1;e+=1){let n=s[e],a=s[e+1];if(a<=n)continue;let c=Math.max(0,Math.min(i.value.length,n-t)),l=Math.max(c,Math.min(i.value.length,a-t)),u=i.value.slice(c,l);if(!u)continue;let d=o.filter(e=>e.start<=n&&e.end>=a),f=d[0],p=Array.from(new Set(d.flatMap(e=>e.ids)));r.push({type:f?`reviewHighlight`:`reviewSource`,data:{hName:f?`mark`:`span`,hProperties:{"data-source-start":n,"data-source-end":a,...f?{"data-review-highlight":`true`,"data-highlight-ids":p.join(`,`),"data-highlight-color":f.color,"data-highlight-active":d.some(e=>e.active)?`true`:`false`,"data-highlight-dashed":d.some(e=>e.dashed)?`true`:`false`,"aria-label":`${p.length} note${p.length===1?``:`s`} on “${u}”`}:{}}},children:[{type:`text`,value:u}]})}}t.children=r}n(t)}}function c_(){function e(t){if(!Array.isArray(t.children))return;let n=[];for(let r of t.children)if(r.type===`text`&&typeof r.value==`string`&&r.value.includes(`||`)){o_.lastIndex=0;let e=0,t=!1,i;for(;(i=o_.exec(r.value))!==null;)t=!0,i.index>e&&n.push({type:`text`,value:r.value.slice(e,i.index)}),n.push({type:`spoiler`,data:{hName:`span`,hProperties:{className:[`keating-spoiler`]}},children:[{type:`text`,value:i[1]}]}),e=i.index+i[0].length;t?e<r.value.length&&n.push({type:`text`,value:r.value.slice(e)}):n.push(r)}else e(r),n.push(r);t.children=n}return t=>e(t)}function l_({children:e}){let[t,n]=(0,M.useState)(!1);return t?(0,j.jsx)(`span`,{className:g({borderRadius:`0.25rem`,backgroundColor:`var(--muted)`,paddingInline:`0.25rem`,color:`var(--foreground)`}),children:e}):(0,j.jsx)(`button`,{type:`button`,onClick:()=>n(!0),title:`Reveal`,"aria-label":`Reveal hidden text`,className:g({cursor:`pointer`,userSelect:`none`,borderRadius:`0.25rem`,backgroundColor:`color-mix(in srgb, var(--foreground) 85%, transparent)`,paddingInline:`0.25rem`,color:`transparent`,transitionProperty:`color, background-color, border-color`,transitionDuration:`150ms`,_hover:{backgroundColor:`color-mix(in srgb, var(--foreground) 70%, transparent)`}}),children:e})}function u_({lang:e,children:t}){let n=e||`text`,r=t.replace(/\n$/,``);return n.toLowerCase()===`mermaid`?(0,j.jsx)(`div`,{className:g({marginBlock:`0.75rem`,overflow:`auto`,borderRadius:`0.5rem`,border:`1px solid var(--border)`,backgroundColor:`color-mix(in srgb, var(--muted) 30%, transparent)`,padding:`1rem`}),children:(0,j.jsx)(wg,{content:t})}):(0,j.jsx)(r_,{code:r,language:n,children:(0,j.jsx)(M.Suspense,{fallback:(0,j.jsx)(`pre`,{style:{margin:0,padding:`1em`,fontSize:`0.82rem`,lineHeight:1.55,background:`#0d1117`,color:`#c9d1d9`,overflowX:`auto`},children:(0,j.jsx)(`code`,{children:r})}),children:(0,j.jsx)(i_,{code:r,language:n})})})}var d_={span({className:e,children:t,...n}){return typeof e==`string`&&e.includes(`keating-spoiler`)?(0,j.jsx)(l_,{children:t}):(0,j.jsx)(`span`,{className:e,...n,children:t})},pre({children:e}){let t=Array.isArray(e)?e[0]:e;if(t&&typeof t==`object`&&`props`in t&&t.props&&typeof t.props==`object`){let e=t.props;return(0,j.jsx)(u_,{lang:/language-(\w+)/.exec(e.className??``)?.[1]??``,children:e.children??``})}return(0,j.jsx)(`pre`,{className:g({overflowX:`auto`,borderRadius:`0.375rem`,backgroundColor:`var(--muted)`,padding:`0.75rem`,fontSize:`0.75rem`}),children:e})},code({className:e,children:t,...n}){return e?.includes(`language-`)?(0,j.jsx)(`code`,{className:g({fontFamily:`var(--mono-display)`,fontSize:`0.875rem`}),...n,children:t}):(0,j.jsx)(`code`,{className:g({borderRadius:`0.25rem`,backgroundColor:`var(--muted)`,paddingInline:`0.375rem`,paddingBlock:`0.125rem`,fontSize:`0.875rem`,fontFamily:`var(--mono-display)`}),...n,children:t})},p:({children:e})=>(0,j.jsx)(`p`,{className:g({marginBottom:`0.75rem`,_last:{marginBottom:0}}),children:e}),ul:({children:e})=>(0,j.jsx)(`ul`,{className:g({marginBottom:`0.75rem`,paddingLeft:`1.25rem`,listStyleType:`disc`}),children:e}),ol:({children:e})=>(0,j.jsx)(`ol`,{className:g({marginBottom:`0.75rem`,paddingLeft:`1.25rem`,listStyleType:`decimal`}),children:e}),li:({children:e})=>(0,j.jsx)(`li`,{className:g({marginBottom:`0.25rem`}),children:e}),h1:({children:e})=>(0,j.jsx)(`h1`,{className:g({marginBottom:`0.5rem`,marginTop:`1rem`,fontSize:`1.125rem`,fontWeight:600}),children:e}),h2:({children:e})=>(0,j.jsx)(`h2`,{className:g({marginBottom:`0.5rem`,marginTop:`0.75rem`,fontSize:`1rem`,fontWeight:600}),children:e}),h3:({children:e})=>(0,j.jsx)(`h3`,{className:g({marginBottom:`0.25rem`,marginTop:`0.5rem`,fontSize:`0.875rem`,fontWeight:600}),children:e}),strong:({children:e})=>(0,j.jsx)(`strong`,{className:g({fontWeight:600}),children:e}),em:({children:e})=>(0,j.jsx)(`em`,{className:g({fontStyle:`italic`}),children:e}),a:({children:e,href:t})=>(0,j.jsx)(`a`,{href:t,className:g({color:`var(--primary)`,textDecoration:`underline`}),target:`_blank`,rel:`noreferrer`,children:e}),blockquote:({children:e})=>(0,j.jsx)(`blockquote`,{className:g({marginBlock:`0.5rem`,borderLeft:`2px solid var(--border)`,paddingLeft:`0.75rem`,color:`var(--muted-foreground)`}),children:e}),table:({children:e})=>(0,j.jsx)(`div`,{className:g({marginBlock:`0.75rem`,maxWidth:`100%`,overflowX:`auto`}),children:(0,j.jsx)(`table`,{className:g({width:`max-content`,minWidth:`100%`,borderCollapse:`collapse`,fontSize:`0.875rem`}),children:e})}),thead:({children:e})=>(0,j.jsx)(`thead`,{className:g({borderBottom:`1px solid var(--border)`,backgroundColor:`color-mix(in srgb, var(--muted) 50%, transparent)`}),children:e}),th:({children:e})=>(0,j.jsx)(`th`,{className:g({paddingInline:`0.75rem`,paddingBlock:`0.5rem`,textAlign:`left`,fontWeight:600}),children:e}),td:({children:e})=>(0,j.jsx)(`td`,{className:g({borderBottom:`1px solid var(--border)`,paddingInline:`0.75rem`,paddingBlock:`0.5rem`}),children:e})},f_=g({borderBottom:`1.5px solid`,background:`transparent`,color:`inherit`,cursor:`pointer`,transitionProperty:`background-color`,transitionDuration:`120ms`,_motionReduce:{transitionDuration:`0ms`},_focusVisible:{outline:`3px solid var(--accent)`,outlineOffset:`1px`}}),p_=g({borderBottomStyle:`solid`}),m_=g({borderBottomStyle:`dashed`});function h_({content:e,streaming:t=!1,sourceMapped:n=!1,highlights:r=[],onHighlightReveal:i,onHighlightConceal:a,onHighlightOpen:o}){let s=(0,M.useMemo)(()=>a_(e),[e]),c=(0,M.useMemo)(()=>({remark:[ul,Sl,...n?[s_(r)]:[],c_],rehype:[qh]}),[r,n]),l=(0,M.useMemo)(()=>({...d_,mark({children:e,...t}){let n=t;if(n[`data-review-highlight`]!==`true`)return(0,j.jsx)(`mark`,{...t,children:e});let r=String(n[`data-highlight-ids`]??``).split(`,`).filter(Boolean),s=String(n[`data-highlight-color`]??`var(--accent)`),c=n[`data-highlight-active`]===`true`,l=n[`data-highlight-dashed`]===`true`;return(0,j.jsx)(`mark`,{...t,tabIndex:0,role:`button`,className:h(f_,l?m_:p_),style:{borderBottomColor:s,background:c?`color-mix(in srgb, var(--accent) 18%, transparent)`:`transparent`},onMouseEnter:e=>i?.(r,e.currentTarget.getBoundingClientRect()),onFocus:e=>i?.(r,e.currentTarget.getBoundingClientRect()),onMouseLeave:a,onBlur:a,onClick:e=>o?.(r,e.currentTarget.getBoundingClientRect()),onKeyDown:e=>{e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),o?.(r,e.currentTarget.getBoundingClientRect()))},children:e})}}),[a,o,i]),u=(0,M.useMemo)(()=>t?$g(s):null,[s,t]);return(0,j.jsx)(Qg.Provider,{value:u,children:(0,j.jsx)(ao,{remarkPlugins:c.remark,rehypePlugins:c.rehype,components:l,children:s})})}export{wg as a,Sl as c,le as d,ce as f,re as g,ie as h,Eg as i,ul as l,ae as m,a_ as n,eg as o,se as p,qg as r,qh as s,h_ as t,ao as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e}from"./rolldown-runtime-BG2f4sTM.js";import{T as t}from"./syntax-highlighter-Buac5fmw.js";import{_ as n,c as r,d as i,f as a,g as o,u as s}from"./desktop-offline-IzFtwAhh.js";import{Dn as c,En as l,H as u,Hn as d,J as f,N as p,O as m,Sn as h,Un as g,Wn as _,Xn as v,Yn as y,at as b,ct as x,dr as S,ft as C,k as ee,q as w,ri as T,rt as te,st as E,ti as D,wn as O,wt as k}from"./index-DCgpDQKf.js";import{a as A,r as j,t as M}from"./NotOrganicAccessPromptDialog-DS7PLMx4.js";import{t as N}from"./check-BQLdkQGc.js";import{t as P}from"./search-DkD407V9.js";import{t as F}from"./x-dksMGet2.js";var I=e(t(),1),L=e(T(),1),R=[`openai-codex`,`anthropic`,`openai`,`google`,`mistral`,`groq`,`xai`,`openrouter`,`amazon-bedrock`,`vertex`];function z(e,t){let n=R.indexOf(e.toLowerCase()),r=R.indexOf(t.toLowerCase()),i=n===-1?R.length:n,a=r===-1?R.length:r;return i===a?e.localeCompare(t):i-a}function B(e){return{"desktop-offline":`On this device`,"amazon-bedrock":`Amazon Bedrock`,"openai-codex":`OpenAI Codex`,openai:`OpenAI`,anthropic:`Anthropic`,google:`Google`,mistral:`Mistral`,groq:`Groq`,xai:`xAI`,openrouter:`OpenRouter`,vertex:`Google Vertex`}[e.toLowerCase()]??e}function V(){return new Set([...S(),...y()?[_]:[]])}function ne(e){return V().has(e)}async function re(){let e=E(),t=V(),n=await O(),r=Array.from(new Set([...t,...n.map(e=>e.name)]));return(await Promise.all(r.map(async n=>({id:n,cloud:t.has(n),configured:await c(n),manuallyHidden:e.hiddenProviders.includes(n)})))).sort((e,t)=>z(e.id,t.id))}function H(e){return`${e.provider}::${e.api}::${e.id}`}function U(e){return r.filter(t=>!e||e.has(t.id)).map(e=>({id:e.id,name:e.name,api:`browser`,provider:`browser`,baseUrl:``,reasoning:!1,input:e.kind===`multimodal`?[`text`,`image`,`audio`]:[`text`],cost:{input:0,output:0,cacheRead:0,cacheWrite:0},contextWindow:e.kind===`multimodal`?4096:0,maxTokens:e.kind===`multimodal`?512:0}))}async function W(){let e=await Promise.all(r.map(async e=>[e.id,await s(e)]));return Object.fromEntries(e)}async function G(e,t={}){let n=E(),r=new Set(n.hiddenProviders),i=V(),a=t.revealProviders??new Set,o=new Set;await Promise.all(Array.from(i).map(async e=>{await c(e)&&o.add(e)}));let s=await l(e=>C({cloud:i.has(e),configured:o.has(e),manuallyHidden:r.has(e),revealed:a.has(e)}));for(let e of n.customModels)s.push(h(e));let u=new Set(S()),d=s.map(e=>({key:H(e),model:e,group:e.provider===`browser`?`browser`:u.has(e.provider)?`cloud`:`custom`}));d.sort((e,t)=>{let n=z(e.model.provider,t.model.provider);if(n!==0)return n;let r=e.model.name.localeCompare(t.model.name);return r===0?e.model.id.localeCompare(t.model.id):r});let f=new Set(Object.entries(e).filter(([,e])=>e.available).map(([e])=>e));return f.size>0&&d.unshift(...U(f).map(e=>({key:H(e),model:e,group:`browser`}))),Array.from(new Map(d.map(e=>[e.key,e])).values())}var K=k(),q=null;function J(){window.dispatchEvent(new CustomEvent(`keating:api-key-prompt-changed`))}async function Y(e,t={}){if(typeof window>`u`)return!1;if(v(e)){let n=await j({force:t.force,allowSignIn:!0});return n&&x(e),n}return!t.force&&await D().providerKeys.get(e)?!0:d(e)?(window.dispatchEvent(new CustomEvent(`keating:open-settings`,{detail:{tab:`models`}})),!1):(q&&q.resolve(!1),new Promise(t=>{q={id:crypto.randomUUID(),provider:e,resolve:t},J()}))}function X(e){if(!q)return;let t=q;q=null,t.resolve(e),J()}async function ie(e){if(e===`google`)return`Google Gemini`;if(e===`openai`)return`OpenAI`;if(e===`openai-codex`)return`OpenAI Codex`;if(e===`anthropic`)return`Anthropic`;if(e===`openrouter`)return`OpenRouter`;try{let t=(await D().customProviders.getAll()).find(t=>t?.name===e);if(t?.name)return t.name}catch{}return e}function ae(){let[e,t]=(0,I.useState)(q),[n,r]=(0,I.useState)(``),[i,a]=(0,I.useState)(!1),[o,s]=(0,I.useState)(``),[c,l]=(0,I.useState)(``);if((0,I.useEffect)(()=>{let e=()=>{t(q),r(``),s(``),q?ie(q.provider).then(l):l(``)};return e(),window.addEventListener(`keating:api-key-prompt-changed`,e),()=>window.removeEventListener(`keating:api-key-prompt-changed`,e)},[]),!e)return(0,K.jsx)(M,{});let d=async()=>{let t=n.trim();if(!t){s(`Enter an API key first.`);return}a(!0),s(``);try{await D().providerKeys.set(e.provider,t),x(e.provider),X(!0)}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1)}};return(0,K.jsx)(`div`,{className:p({position:`fixed`,inset:0,zIndex:100,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`color-mix(in srgb, var(--background) 70%, transparent)`,padding:`1rem`,backdropFilter:`blur(4px)`}),children:(0,K.jsxs)(`div`,{className:p({width:`100%`,maxWidth:`28rem`,borderRadius:`0.5rem`,border:`1px solid var(--border)`,backgroundColor:`var(--background)`,boxShadow:`var(--shadow-xl)`}),children:[(0,K.jsxs)(`div`,{className:p({display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`0.75rem`,borderBottom:`1px solid var(--border)`,paddingInline:`1rem`,paddingBlock:`0.75rem`}),children:[(0,K.jsxs)(`div`,{className:p({display:`flex`,alignItems:`center`,gap:`0.5rem`}),children:[(0,K.jsx)(A,{size:16,className:p({color:`var(--primary)`})}),(0,K.jsx)(`h2`,{className:p({fontSize:`0.875rem`,fontWeight:600}),children:`API key required`})]}),(0,K.jsx)(`button`,{type:`button`,className:p({display:`inline-flex`,height:`2rem`,width:`2rem`,alignItems:`center`,justifyContent:`center`,borderRadius:`0.375rem`,color:`var(--muted-foreground)`,transitionProperty:`color, background-color, border-color`,transitionDuration:`150ms`,_hover:{background:`var(--accent)`,color:`var(--foreground)`}}),onClick:()=>X(!1),"aria-label":`Close`,children:(0,K.jsx)(F,{size:16})})]}),(0,K.jsxs)(`div`,{className:p({display:`flex`,flexDirection:`column`,gap:`0.75rem`,padding:`1rem`}),children:[(0,K.jsxs)(`div`,{className:p({display:`flex`,alignItems:`flex-start`,gap:`0.75rem`}),children:[(0,K.jsx)(u,{size:52,state:`greeting`,label:``}),(0,K.jsxs)(`p`,{className:p({fontSize:`0.875rem`,color:`var(--muted-foreground)`}),children:[`Add a local browser API key for `,c||e.provider,` to use this model.`]})]}),(0,K.jsx)(`input`,{type:`password`,className:p({width:`100%`,borderRadius:`0.375rem`,border:`1px solid var(--border)`,backgroundColor:`var(--background)`,paddingInline:`0.75rem`,paddingBlock:`0.5rem`,fontSize:`0.875rem`}),placeholder:`${e.provider} API key`,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`&&d(),e.key===`Escape`&&X(!1)},autoFocus:!0}),(0,K.jsxs)(`div`,{className:p({display:`flex`,flexWrap:`wrap`,alignItems:`center`,justifyContent:`space-between`,gap:`0.75rem`}),children:[(0,K.jsx)(`a`,{href:f(e.provider),target:`_blank`,rel:`noopener noreferrer`,className:p({fontSize:`0.75rem`,color:`var(--primary)`,textDecorationLine:`underline`,textUnderlineOffset:`2px`}),onClick:t=>w(t.nativeEvent,f(e.provider)),children:`Need a key? Read the setup guide`}),(0,K.jsx)(`button`,{type:`button`,className:p({display:`inline-flex`,height:`2.25rem`,alignItems:`center`,borderRadius:`0.375rem`,backgroundColor:`var(--primary)`,paddingInline:`0.75rem`,fontSize:`0.875rem`,fontWeight:500,color:`var(--primary-foreground)`,transitionProperty:`color, background-color, border-color`,transitionDuration:`150ms`,_hover:{backgroundColor:`color-mix(in srgb, var(--primary) 90%, black)`},_disabled:{opacity:.5}}),onClick:d,disabled:i,children:i?`Saving...`:`Save key`})]}),o&&(0,K.jsx)(`div`,{className:p({fontSize:`0.75rem`,color:`var(--destructive)`}),children:o})]})]})})}function oe(e,t,n){let r=t.trim().toLowerCase(),i=e.filter(e=>!e.pinnedLabel&&(e.name+` `+e.group+` `+(e.summary??``)+` `+e.id).toLowerCase().includes(r));return[...e.filter(e=>e.pinnedLabel),...i.filter(e=>e.id===n),...i.filter(e=>e.id!==n)]}function Z(e,t){return e.pinnedLabel??(e.id===t?`Selected model`:e.group)}function se({open:e,label:t,items:n,selected:r,onSelect:i,onClose:a,filters:o,notice:s,noticeLabel:c=`Models that run on this device`,loading:l=!1,error:u=``,errorAction:d}){let f=(0,I.useRef)(null),p=(0,I.useRef)(null),m=(0,I.useRef)(new Map),[h,g]=(0,I.useState)(``),[_,v]=(0,I.useState)(``),[y,b]=(0,I.useState)(``);(0,I.useEffect)(()=>{if(!e){f.current?.close();return}let t=document.activeElement;return g(``),b(``),f.current?.showModal(),p.current?.focus(),()=>{f.current?.close(),t?.focus()}},[e]);let x=oe(n,h,r),S=e=>{let t=x[(e+x.length)%x.length];if(!t)return;let n=m.current.get(t.id);n?.focus(),n?.scrollIntoView({block:`nearest`})},C=async e=>{if(!_){v(e),b(``);try{await i(e),requestAnimationFrame(()=>{f.current?.open&&m.current.get(e)?.focus()})}catch(e){b(e instanceof Error?e.message:`Could not select this model. Try another model.`)}finally{v(``)}}};return(0,K.jsx)(`dialog`,{ref:f,className:`model-picker`,"aria-label":t,onCancel:e=>{e.preventDefault(),a()},onClick:e=>{if(e.target===e.currentTarget){let t=e.currentTarget.getBoundingClientRect();(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&a()}},children:(0,K.jsxs)(`div`,{className:`model-picker__body`,children:[(0,K.jsxs)(`div`,{className:`model-picker__toolbar`,children:[(0,K.jsxs)(`label`,{className:`library-search`,children:[(0,K.jsx)(P,{size:18,"aria-hidden":`true`}),(0,K.jsx)(`input`,{ref:p,"aria-label":t,placeholder:t,value:h,onChange:e=>g(e.target.value),onKeyDown:e=>{e.key===`ArrowDown`&&x.length&&(e.preventDefault(),S(0))}})]}),(0,K.jsx)(`button`,{type:`button`,className:`library-icon`,"aria-label":`Close model picker`,onClick:a,children:(0,K.jsx)(F,{size:18})})]}),o&&(0,K.jsx)(`div`,{className:`model-picker__filters`,children:o}),(0,K.jsxs)(`div`,{className:`model-picker__results`,"aria-label":`Models`,"aria-busy":l,children:[(u||y)&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`p`,{className:`library-message`,role:`alert`,children:y||u}),d&&(0,K.jsx)(`div`,{className:`model-picker__error-action`,children:d})]}),l?(0,K.jsx)(`p`,{className:`library-message`,role:`status`,children:`Finding available models…`}):x.length?x.map((e,t)=>(0,K.jsxs)(`div`,{className:`model-picker__item`,children:[(t===0||Z(x[t-1],r)!==Z(e,r))&&(0,K.jsx)(`div`,{className:`library-group`,children:Z(e,r)}),(0,K.jsxs)(`button`,{type:`button`,className:`model-picker__option`,"aria-pressed":e.id===r,"aria-busy":_===e.id,ref:t=>{t?m.current.set(e.id,t):m.current.delete(e.id)},onClick:()=>void C(e.id),onKeyDown:e=>{let n=e.key===`ArrowDown`?t+1:e.key===`ArrowUp`?t-1:e.key===`Home`?0:e.key===`End`?x.length-1:null;n!==null&&(e.preventDefault(),S(n))},children:[(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`strong`,{children:e.name}),(0,K.jsx)(`small`,{children:e.summary||e.group})]}),_===e.id?(0,K.jsx)(`small`,{children:`Loading…`}):e.id===r?(0,K.jsx)(N,{size:18,"aria-label":`Selected`}):null]}),e.details&&(0,K.jsxs)(`details`,{className:`model-picker__details`,children:[(0,K.jsx)(`summary`,{children:`Model details`}),e.details]}),e.action&&(0,K.jsx)(`div`,{className:`model-picker__item-action`,children:e.action})]},e.id)):(0,K.jsx)(`p`,{className:`library-message`,children:`No matching models. Try another name or clear your filters.`})]}),s&&(0,K.jsxs)(`details`,{className:`model-picker__notice`,children:[(0,K.jsx)(`summary`,{children:c}),s]}),(0,K.jsx)(`div`,{className:`model-picker__hint`,role:`status`,children:`↑ ↓ to browse · Enter to choose · Esc to close`})]})})}var Q=`keating:model-cache-changed`,$=null;function ce(){return $??=n(r.map(e=>e.id)),$}function le(){$=null,window.dispatchEvent(new CustomEvent(Q))}function ue(e,t=!0){let[n,r]=(0,I.useState)(o);return(0,I.useEffect)(()=>{if(!t||!e){r(o);return}let n=!0,i=()=>{ce().then(t=>{n&&r(t[e]??o)})};return i(),window.addEventListener(Q,i),()=>{n=!1,window.removeEventListener(Q,i)}},[e,t]),n}function de({id:e}){return(0,K.jsx)(m,{cachedBytes:ue(e,!0).bytes,loaded:a.getState().modelId===e&&a.getState().loaded,onRemove:async()=>{await a.removeDownload(e),le()}})}function fe({open:e,currentModel:t,onClose:n,onSelect:r,excludeKeys:o,preloadBrowserModel:s=!0}){let[l,u]=(0,I.useState)([]),[d,f]=(0,I.useState)([]),[p,m]=(0,I.useState)(!1),[h,_]=(0,I.useState)(``),[v,y]=(0,I.useState)(``),[x,S]=(0,I.useState)(!1),[C,w]=(0,I.useState)([]),[T,E]=(0,I.useState)(t?H(t):``),[D,O]=(0,I.useState)(``),[k,A]=(0,I.useState)(``),[j,M]=(0,I.useState)(``),[N,P]=(0,I.useState)(a.getState());(0,I.useEffect)(()=>a.subscribe(P),[]),(0,I.useEffect)(()=>{E(t?H(t):``)},[t]);let F=(0,I.useCallback)(async()=>{if(e){m(!0),_(``);try{let[e,n]=await Promise.all([W(),re()]),r=await G(e,{revealProviders:new Set(C)});if(t&&!r.some(e=>e.key===H(t))){let e=n.find(e=>e.id===t.provider);r=[{key:H(t),model:t,group:t.provider===`browser`?`browser`:e?.cloud?`cloud`:`custom`},...r]}u(r),f(n),M(Object.values(e).find(e=>!e.available)?.reason??``)}catch(e){_(e instanceof Error?e.message:`Could not load models.`)}finally{m(!1)}}},[t,e,C]);(0,I.useEffect)(()=>{e&&(_(``),O(``),A(``),y(``),F())},[F,e]),(0,I.useEffect)(()=>{let t=()=>{e&&F()};return window.addEventListener(te,t),window.addEventListener(`focus`,t),()=>{window.removeEventListener(te,t),window.removeEventListener(`focus`,t)}},[F,e]);let R=(0,I.useCallback)(()=>{(0,L.flushSync)(n),window.dispatchEvent(new CustomEvent(`keating:open-settings`,{detail:{tab:`models`}}))},[n]),z=(0,I.useCallback)(async e=>{y(e),(0,L.flushSync)(()=>S(!0));try{let t=await Y(e);return t&&(w(t=>t.includes(e)?t:[...t,e]),y(``)),t}catch{return!1}finally{S(!1)}},[]),V=Array.from(new Set(l.map(e=>e.model.provider))),U=d.filter(e=>e.cloud&&!e.configured),q=new Set(U.map(e=>e.id)),J=U.length>0?(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{children:`Connect a provider to show its models.`}),U.map(e=>(0,K.jsxs)(`p`,{children:[(0,K.jsx)(`strong`,{children:B(e.id)}),` `,(0,K.jsx)(`button`,{type:`button`,onClick:()=>void z(e.id),children:`Add key or sign in`}),` `,(0,K.jsx)(`button`,{type:`button`,onClick:R,children:`Open settings`})]},e.id))]}):null,X=l.filter(e=>!o?.includes(e.key)&&(!D||e.model.provider===D)&&(!k||(k===`reasoning`?e.model.reasoning:e.model.input.includes(`image`)))).map(({key:e,model:t})=>({id:e,name:t.name,group:B(t.provider),pinnedLabel:e===H(g)?`Provider default`:void 0,summary:[B(t.provider),t.reasoning?`Step-by-step reasoning`:``,t.input.includes(`image`)?`Understands images`:``].filter(Boolean).join(` · `),details:(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`p`,{children:[`Model ID: `,t.id]}),t.provider===`browser`?(0,K.jsxs)(`p`,{children:[i(t.id)?.blurb,` Downloads when selected.`]}):(0,K.jsxs)(`p`,{children:[`Context: `,t.contextWindow.toLocaleString(),` tokens`]}),t.provider===`browser`&&N.modelId===t.id&&N.loading&&(0,K.jsx)(ee,{progress:N.download,modelName:t.name,onCancel:()=>a.cancel()}),t.provider===`browser`&&!N.loading&&(0,K.jsx)(de,{id:t.id})]}),action:q.has(t.provider)?(0,K.jsxs)(`span`,{children:[`This provider is not connected. `,(0,K.jsx)(`button`,{type:`button`,onClick:()=>void z(t.provider),children:`Add key or sign in`}),` `,(0,K.jsx)(`button`,{type:`button`,onClick:R,children:`Open settings`})]}):void 0}));return(0,K.jsx)(se,{open:e&&!x,label:`Find a model`,items:X,selected:T,onClose:n,loading:p,error:h,errorAction:v?(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`button`,{type:`button`,onClick:()=>void z(v),children:[`Add key or sign in for `,B(v)]}),` `,(0,K.jsx)(`button`,{type:`button`,onClick:R,children:`Open provider settings`})]}):void 0,notice:J||(j?(0,K.jsx)(`p`,{children:j}):void 0),noticeLabel:J?`Provider setup`:void 0,filters:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`label`,{children:[`Provider`,(0,K.jsxs)(`select`,{value:D,onChange:e=>O(e.target.value),children:[(0,K.jsx)(`option`,{value:``,children:`All providers`}),V.map(e=>(0,K.jsx)(`option`,{value:e,children:B(e)},e))]})]}),(0,K.jsxs)(`label`,{children:[`Use it for`,(0,K.jsxs)(`select`,{value:k,onChange:e=>A(e.target.value),children:[(0,K.jsx)(`option`,{value:``,children:`Any conversation`}),(0,K.jsx)(`option`,{value:`reasoning`,children:`Step-by-step reasoning`}),(0,K.jsx)(`option`,{value:`image`,children:`Understanding images`})]})]})]}),onSelect:async e=>{let t=l.find(t=>t.key===e)?.model;if(!t)return;let n=ne(t.provider)&&!q.has(t.provider)&&!await c(t.provider);if((q.has(t.provider)||n)&&!await z(t.provider))throw Error(`${B(t.provider)} is not connected. Add a key or sign in, then try again.`);if(s&&t.provider===`browser`&&!(a.getState().modelId===t.id&&a.getState().loaded)&&(await a.load(t.id),!a.getState().loaded))throw Error(a.getState().error||`Download did not complete. Choose the model to retry.`);r(t),E(e),b(e)}})}function pe({open:e,searchLabel:t,badge:n,options:r,currentModelId:i,onClose:a,onSelect:o}){let[s,c]=(0,I.useState)(i);return(0,I.useEffect)(()=>c(i),[i]),(0,K.jsx)(se,{open:e,label:t,selected:s,onClose:a,items:r.map(e=>({id:e.value,name:e.label,group:n,summary:n})),onSelect:e=>{o(e),c(e)}})}function me({open:e,generator:t,currentModelId:n,onClose:r,onSelect:i}){let a=(0,I.useMemo)(()=>t.models.map(e=>({value:e,label:e})),[t.models]);return(0,K.jsx)(pe,{open:e,title:`Select image model`,description:`Only image-generation models from ${t.label} are shown.`,searchLabel:`Search image models`,emptyLabel:`No image-generation models matched this search.`,badge:`Image generation`,options:a,currentModelId:n,onClose:r,onSelect:i})}function he({open:e,provider:t,currentModelId:n,onClose:r,onSelect:i}){let a=t.kind===`duplex`;return(0,K.jsx)(pe,{open:e,title:a?`Select realtime voice model`:`Select speech model`,description:`Only ${a?`realtime voice`:`speech synthesis`} models from ${t.label} are shown.`,searchLabel:a?`Search realtime voice models`:`Search speech models`,emptyLabel:`No ${a?`realtime voice`:`speech synthesis`} models matched this search.`,badge:a?`Realtime voice`:`Speech output`,options:t.models,currentModelId:n,onClose:r,onSelect:i})}export{Y as a,H as c,ae as i,me as n,W as o,fe as r,G as s,he as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./rolldown-runtime-BG2f4sTM.js";import{T as t}from"./syntax-highlighter-Buac5fmw.js";import{C as n,Ct as r,G as i,M as a,N as o,S as s,Tt as c,U as l,W as u,_ as d,b as f,g as p,h as m,m as h,p as g,v as _,w as ee,wt as te,x as ne,y as re}from"./index-C8C76R86.js";import{t as v}from"./ThemeToggle-BdGijxoN.js";import{s as ie}from"./recipes-BcSW8MlI.js";var y=e(t(),1),ae=[];function b({locale:e,enableI18n:t,localesProp:n=ae}){let r=_().getDefaultLocale();return t&&_().requiresTranslation(e)?[...n,e,r]:[r]}var x=te();function oe({Currency:e,GtInternalCurrency:t,DateTime:n,GtInternalDateTime:r,Num:i,GtInternalNum:a,RelativeTime:o,GtInternalRelativeTime:s,Var:c,GtInternalVar:l}){return function({variableType:u,variableValue:d,variableOptions:f,locales:p,enableI18n:m,injectionType:h}){let g={_locale:p[0]??`en`,_enableI18n:m};if(u===`n`){let e=h===`automatic`?i:a,t=f;return(0,x.jsx)(e,{...g,options:t,children:d})}if(u===`d`){let e=h===`automatic`?n:r,t=f;return(0,x.jsx)(e,{...g,options:t,children:d})}if(u===`c`){let n=h===`automatic`?e:t,r=f;return(0,x.jsx)(n,{...g,options:r,children:d})}if(u===`rt`){let e=h===`automatic`?o:s,t=f;if(typeof d==`number`&&t?.unit)return(0,x.jsx)(e,{...g,value:d,unit:t.unit,baseDate:t?.baseDate,options:t});let n=d instanceof Date?d:typeof d==`string`||typeof d==`number`?new Date(d):void 0;return(0,x.jsx)(e,{...g,date:n&&!isNaN(n.getTime())?n:void 0,baseDate:t?.baseDate,options:t})}let _=d;return(0,x.jsx)(h===`automatic`?l:c,{...g,children:_})}}var se={variable:`value`,number:`n`,datetime:`date`,currency:`cost`,"relative-time":`time`};function S(e={},t){return typeof e.name==`string`?e.name:`_gt_${se[t]||`value`}_${e[`data-_gt`]?.id}`}function C(e){return typeof e==`object`&&!!e&&`data-_gt`in e&&typeof e[`data-_gt`]==`object`&&!!e[`data-_gt`]&&`transformation`in e[`data-_gt`]&&e[`data-_gt`]?.transformation===`variable`}function w(e){let t=e[`data-_gt`]?.variableType||`variable`;return{variableName:S(e,t),variableType:n(t),injectionType:e[`data-_gt`]?.injectionType||`manual`,variableValue:(()=>{if(e.value!==void 0)return e.value;if(e.date!==void 0)return e.date;if(e[`data-_gt-unformatted-value`]!==void 0)return e[`data-_gt-unformatted-value`];if(e.children!==void 0)return e.children})(),variableOptions:(()=>{let t={...e.currency!==void 0&&{currency:e.currency},...e.unit!==void 0&&{unit:e.unit},...e.baseDate!==void 0&&{baseDate:e.baseDate},...e.options!==void 0&&e.options};return Object.keys(t).length?t:typeof e[`data-_gt-variable-options`]==`string`?JSON.parse(e[`data-_gt-variable-options`]):e[`data-_gt-variable-options`]||void 0})()}}function T(e){return e&&e.props&&e.props[`data-_gt`]?e.props[`data-_gt`]:null}function E(e,t,n){let r=``,i=null;return typeof e==`number`&&!i&&n&&(r=ne(e,Object.keys(n).filter(s),t)),r&&!i&&(i=n[r]),i}function D({renderVariable:e}){return function({children:t,defaultLocale:n=`en`,enableI18n:r}){let i=t=>{let i=T(t);if(C(t.props)){let{variableType:i,variableValue:a,variableOptions:o,injectionType:s}=w(t.props);return e({variableType:i,variableValue:a,variableOptions:o,locales:[n],enableI18n:r,injectionType:s})}if(i?.transformation===`plural`){let e=i.branches||{};return typeof t.props.n==`number`?o(E(t.props.n,[n],e)??t.props.children):t.props.children==null?null:o(t.props.children)}if(i?.transformation===`branch`){let{children:e,branch:n}=t.props,r=i.branches||{},a=n==null||n===``?void 0:n.toString();return o(a&&r[a]!==void 0?r[a]:e)}return i?.transformation===`fragment`?y.createElement(y.Fragment,{key:t.props.key,children:o(t.props.children)}):t.props.children?y.cloneElement(t,{...t.props,"data-_gt":void 0,children:o(t.props.children)}):y.cloneElement(t,{...t.props,"data-_gt":void 0})},a=e=>y.isValidElement(e)?i(e):e,o=e=>Array.isArray(e)?y.Children.map(e,a):a(e);return o(t)}}function ce({renderVariable:e}){let t=D({renderVariable:e});function n({sourceElement:e,targetElement:n,locales:i=[`en`],enableI18n:a}){let{props:o}=e,s=o[`data-_gt`],c=s?.transformation,l=n.d,u={};if(l&&Object.entries(f).forEach(([e,t])=>{l[e]&&(u[t]=l[e])}),c===`plural`){let o=e.props.n;return typeof o==`number`?r({source:E(o,i,s.branches||{})??e.props.children,target:E(o,i,n.d?.b||{})??n.c,locales:i,enableI18n:a}):t({children:e,defaultLocale:i[0],enableI18n:a})}if(c===`branch`){let{branch:e,children:t}=o,c=e==null||e===``?void 0:e.toString(),l=s.branches||{},u=n.d?.b||{};return r({source:c&&l[c]!==void 0?l[c]:t,target:c&&u[c]!==void 0?u[c]:n.c,locales:i,enableI18n:a})}return c===`fragment`&&n.c?y.createElement(y.Fragment,{key:e.props.key,children:r({source:o.children,target:n.c,locales:i,enableI18n:a})}):o?.children&&n?.c?y.cloneElement(e,{...o,...u,"data-_gt":void 0,children:r({source:o.children,target:n.c,locales:i,enableI18n:a})}):t({children:e,defaultLocale:i[0],enableI18n:a})}function r({source:r,target:i,locales:a=[`en`],enableI18n:o}){if(i==null&&r)return t({children:r,defaultLocale:a[0],enableI18n:o});if(typeof i==`string`)return i;if(Array.isArray(i)&&!Array.isArray(r)&&r&&(r=[r]),Array.isArray(r)&&Array.isArray(i)){let t={},s={},c={},l=r.filter(e=>{if(y.isValidElement(e))if(C(e.props)){let{variableName:n,variableValue:r,variableOptions:i,injectionType:a}=w(e.props);t[n]=r,s[n]=i,c[n]=a}else return!0;return!1}),u=e=>l.find(t=>{let n=T(t);return n?.id===void 0?!1:n.id===e.i})||l.shift();return i.map((r,i)=>{if(typeof r==`string`)return(0,x.jsx)(y.Fragment,{children:r},`string_${i}`);if(ee(r))return(0,x.jsx)(y.Fragment,{children:e({variableType:r.v||`v`,variableValue:t[r.k],variableOptions:s[r.k],locales:a,enableI18n:o,injectionType:c[r.k]||`manual`})},`var_${i}`);let l=u(r);return l?(0,x.jsx)(y.Fragment,{children:n({sourceElement:l,targetElement:r,locales:a,enableI18n:o})},`element_${i}`):null})}if(i&&typeof i==`object`&&!Array.isArray(i)){let t=ee(i)?`variable`:`element`;if(y.isValidElement(r)){if(t===`element`)return n({sourceElement:r,targetElement:i,locales:a,enableI18n:o});if(C(r.props)){let{variableValue:t,variableOptions:n,variableType:i,injectionType:s}=w(r.props);return e({variableType:i,variableValue:t,variableOptions:n,locales:a,enableI18n:o,injectionType:s})}}}return t({children:r,defaultLocale:a[0],enableI18n:o})}return r}function le({renderDefaultChildren:e,renderTranslatedChildren:t}){function n({taggedSourceChildren:e,targetJsxChildren:t,locale:n,defaultLocale:a,enableI18n:o,shouldTranslate:s}){return!s||t==null?r({taggedSourceChildren:e,defaultLocale:a,enableI18n:o}):i({taggedSourceChildren:e,targetJsxChildren:t,locales:[n,a],enableI18n:o})}function r({taggedSourceChildren:t,defaultLocale:n,enableI18n:r}){return e({children:t,defaultLocale:n,enableI18n:r})}function i({taggedSourceChildren:e,targetJsxChildren:n,locales:r,enableI18n:i}){return t({source:e,target:n,locales:r,enableI18n:i})}return n}function ue(e){let t=oe(e),n=D({renderVariable:t}),r=ce({renderVariable:t});return{renderVariable:t,renderDefaultChildren:n,renderTranslatedChildren:r,renderPreparedT:le({renderDefaultChildren:n,renderTranslatedChildren:r})}}function O(){return g()?.conditionStore??m()}function k(){return O().getLocale()}function A(){return O().getEnableI18n()}function j(){return(0,y.useMemo)(()=>_().getDefaultLocale(),[])}function M(){let e=A(),t=k();return e&&_().requiresTranslation(t)}function N(){return g()?.i18nStore||h()}function P(){return g()?.translationsSnapshot||{}}var de=()=>{};function fe(){return de}var F=fe;function pe(e=[]){let t=P(),n=N(),r=F(),i=(0,y.useRef)(null);return i.current??=new Set,me(e,i),n.subscribeToTranslationEvents,(0,y.useCallback)(e=>(p(e),n.getTranslateSnapshot(e,t)),[n,t,r,!1])}function me(e,t){let n=N(),r=k(),i=M(),a=P(),o=(0,y.useMemo)(()=>e?.length>0&&i&&!1,[e,i,!1]),s=(0,y.useMemo)(()=>o?e.map(({message:e,...t})=>{let n=t.$locale??r,i={locale:n,message:e,options:d(n,t,`ICU`)};return[i,p(i)]}):[],[r,o,e]);o&&s.forEach(([,e])=>{t.current.add(e)}),(0,y.useEffect)(()=>{o&&s.filter(([e])=>n.getTranslateSnapshot(e,a)==null).forEach(([e])=>n.translate(e))},[o,n,s,a])}function he(e){let t=k(),n=j(),r=M(),i=pe(e);return(0,y.useCallback)((e,a={})=>{let o=d(a.$locale??t,a,`ICU`);return re(r?{source:e,target:i({locale:o.$locale,message:e,options:o}),options:o,sourceLocale:n}:{options:o,source:e,sourceLocale:n})},[n,t,r,i])}function ge({_enableI18n:e,_locale:t,children:n,currency:r=`USD`,options:i={},locales:a=[]}){let o=b({locale:t,enableI18n:e,localesProp:a}),s=_().getGTClass();if(n==null)return null;let c=typeof n==`string`?parseFloat(n):n;return s.formatCurrency(c,r,{locales:o,...i})}function I({_enableI18n:e,_locale:t,...n}){return ge({...n,_enableI18n:e??A(),_locale:t??k()})}function L(e){return(0,x.jsx)(I,{...e})}I._gtt=`variable-currency-automatic`,L._gtt=`variable-currency`;function _e({_enableI18n:e,_locale:t,children:n,options:r={},locales:i=[]}){let a=b({locale:t,enableI18n:e,localesProp:i}),o=_().getGTClass();return n==null?null:o.formatDateTime(n,{locales:a,...r}).replace(/[\u200F\u202B\u202E]/g,``)}function R({_enableI18n:e,_locale:t,...n}){return _e({...n,_enableI18n:e??A(),_locale:t??k()})}function z(e){return(0,x.jsx)(R,{...e})}R._gtt=`variable-datetime-automatic`,z._gtt=`variable-datetime`;function ve({_enableI18n:e,_locale:t,children:n,options:r={},locales:i=[]}){let a=b({locale:t,enableI18n:e,localesProp:i}),o=_().getGTClass();if(n==null)return null;let s=typeof n==`string`?parseFloat(n):n;return o.formatNum(s,{locales:a,...r})}function B({_enableI18n:e,_locale:t,...n}){return ve({...n,_enableI18n:e??A(),_locale:t??k()})}function V(e){return(0,x.jsx)(B,{...e})}B._gtt=`variable-number-automatic`,V._gtt=`variable-number`;function ye({_enableI18n:e,_locale:t,date:n,children:r,value:i,unit:a,baseDate:o,locales:s=[],options:c={}}){let l=b({locale:t,enableI18n:e,localesProp:s}),u=_().getGTClass(),d=n??r;return i!==void 0&&a?u.formatRelativeTime(i,a,{locales:l,numeric:c.numeric,style:c.style,localeMatcher:c.localeMatcher}):d==null?null:u.formatRelativeTimeFromDate(d,{locales:l,baseDate:o??new Date,numeric:c.numeric,style:c.style,localeMatcher:c.localeMatcher})}function H({_enableI18n:e,_locale:t,...n}){return ye({...n,_enableI18n:e??A(),_locale:t??k()})}function U(e){return(0,x.jsx)(H,{...e})}H._gtt=`variable-relative-time-automatic`,U._gtt=`variable-relative-time`;function W({children:e}){return e}function G({children:e}){return W({children:e})}function K({children:e}){return W({children:e})}G._gtt=`variable-variable`,K._gtt=`variable-variable-automatic`;function be(e){let t=N(),n=P();return F(),(0,y.useSyncExternalStore)(n=>t.subscribeToTranslate(e,n),()=>t.getTranslateSnapshot(e,n),()=>t.getTranslateSnapshot(e,n))}var{renderVariable:xe,renderDefaultChildren:Se,renderTranslatedChildren:Ce,renderPreparedT:we}=ue({Currency:L,GtInternalCurrency:I,DateTime:z,GtInternalDateTime:R,Num:V,GtInternalNum:B,RelativeTime:U,GtInternalRelativeTime:H,Var:G,GtInternalVar:K});function q(e,t=0){let n=t,r=e=>{let{type:t,props:r}=e;n+=1;let i={id:n,injectionType:`manual`},a;try{a=typeof t==`function`?t._gtt:void 0}catch{}if(a){let e=a.split(`-`);if((e[1]===`automatic`||e[2]===`automatic`)&&(i.injectionType=`automatic`),e[0]===`translate`&&(e[0]=`fragment`),e[0]===`variable`&&(i.variableType=e?.[1]||`variable`),e[0]===`plural`){let e=Object.entries(r).reduce((e,[t,r])=>(s(t)&&(e[t]=q(r,n)),e),{});Object.keys(e).length&&(i.branches=e)}if(e[0]===`branch`){let{children:e,branch:t,...a}=r,o=Object.fromEntries(Object.entries(a).filter(([e])=>!e.startsWith(`data-`))),s=Object.entries(o).reduce((e,[t,r])=>(e[t]=q(r,n),e),{});Object.keys(s).length&&(i.branches=s)}i.transformation=e[0]}return i};function i(e){let{props:t}=e,n=r(e),i={...t,"data-_gt":n};return t.children&&!n.variableType&&(i.children=o(t.children)),e.type===y.Fragment&&(i[`data-_gt`].transformation=`fragment`),y.cloneElement(e,i)}function a(e){return(0,y.isValidElement)(e)?i(e):e}function o(e){return Array.isArray(e)?y.Children.map(e,a):a(e)}return o(e)}function Te(e){return Y(e,0)}function Ee(e,t){let{type:n,props:r}=e,i=De(n);if(typeof r!=`object`||!r)return e;if(i){let{componentType:n,injectionType:a}=i;if(n===`variable`)return e;if(n===`branch`)return(0,y.cloneElement)(e,{...Object.entries(r).reduce((e,[n,r])=>(n!==`branch`&&!n.startsWith(`data-`)?e[n]=J(r,t):e[n]=r,e),{})});if(n===`plural`)return(0,y.cloneElement)(e,{...Object.entries(r).reduce((e,[n,r])=>(s(n)||n===`children`?e[n]=J(r,t):e[n]=r,e),{})});if(n===`derive`)return(0,y.cloneElement)(e,{...r,...`children`in r&&{children:Y(r.children,t+1)}});if(n===`translate`&&a===`automatic`&&t>0)return`children`in r?Y(r.children,t):void 0;n===`translate`&&a===`automatic`&&console.warn(Oe)}return(0,y.cloneElement)(e,{...r,...`children`in r&&{children:Y(r.children,t)}})}function J(e,t){return(0,y.isValidElement)(e)?Ee(e,t):e}function Y(e,t){return Array.isArray(e)?y.Children.map(e,e=>J(e,t)):J(e,t)}function De(e){let t=typeof e==`function`&&`_gtt`in e?e._gtt:void 0;if(t==null||typeof t!=`string`)return;let n=t.split(`-`);return{componentType:n[0],injectionType:n[1]===`automatic`||n[2]===`automatic`?`automatic`:`manual`}}var Oe=`'@generaltranslation/react-core Warning: A <_T> component was found injected outside of a <Derive> boundary. This may affect translation resolution for this component.`;function ke(e){return y.isValidElement(e)}var Ae=e=>{if(!e)return``;let{type:t,props:n}=e;if(t&&typeof t==`function`){if(`displayName`in t&&typeof t.displayName==`string`&&t.displayName)return t.displayName;if(`name`in t&&typeof t.name==`string`&&t.name)return t.name}return t&&typeof t==`string`?t:n.href?`a`:n[`data-_gt`]?.id?`C${n[`data-_gt`].id}`:`function`},je=(e,t,n)=>{let r=Object.entries(f).reduce((e,[n,r])=>{let i=t[r];return typeof i==`string`&&(e[n]=i),e},{});if((e===`plural`||e===`branch`)&&n){let t={};Object.entries(n).forEach(([e,n])=>{t[e]=X(n)}),r={...r,b:t,t:e===`plural`?`p`:`b`}}return Object.keys(r).length?r:void 0},Me=e=>{let{props:t}=e,r={t:Ae(e)};if(t[`data-_gt`]){let e=t[`data-_gt`],i=e.transformation;if(i===`variable`){let r=e.variableType||`variable`,i=S(t,r),a=n(r);return{i:e.id,k:i,v:a}}r.i=e.id,r.d=je(i,t,e.branches)}return t.children&&(r.c=X(t.children)),r},Ne=e=>ke(e)?Me(e):typeof e==`number`?e.toString():e;function X(e){return Array.isArray(e)?e.map(Ne):Ne(e)}function Pe({sourceChildren:e,params:t,locale:n}){let r=Fe(e);return{taggedSourceChildren:r,sourceJsxChildren:Ie(r),targetOptions:Le({options:Re(t),locale:n})}}function Fe(e){return q(Te(e))}function Ie(e){return X(e)}function Le({options:e,locale:t}){return{...e,$locale:t}}function Re(e){return{...e,$format:`JSX`,$context:e.$context??e.context,$id:e.$id??e.id,$_hash:e.$_hash??e._hash,$maxChars:e.$maxChars??e.maxChars,$requiresReview:e.$requiresReview??e.requiresReview}}function ze({sourceChildren:e,params:t,_locale:n,_enableI18n:r}){let i=k(),a=A(),o=j(),s=n??i,c=r??a;return{defaultLocale:o,enableI18n:c,locale:s,shouldTranslate:c&&_().requiresTranslation(s),...(0,y.useMemo)(()=>Pe({sourceChildren:e,params:t,locale:s}),[s,t,e])}}function Z(e){return Q(e)}function Be(e){return Q(e)}Z._gtt=`translate-client`,Be._gtt=`translate-client-automatic`;function Q({children:e,_locale:t,_enableI18n:n,_renderPreparedT:r=we,...i}){let{defaultLocale:a,locale:o,enableI18n:s,targetOptions:c,taggedSourceChildren:l,sourceJsxChildren:u,shouldTranslate:d}=ze({sourceChildren:e,params:i,_locale:t,_enableI18n:n}),f=be({locale:o,message:u,options:c}),p=(0,y.useRef)(null),m=r({taggedSourceChildren:l,targetJsxChildren:f,locale:o,defaultLocale:a,enableI18n:s,shouldTranslate:d});return p.current=m,m}function $(e){let t=u()&&typeof e.to==`string`?l(e.to):null;return(0,x.jsx)(r,{...e,to:t??e.to,target:t?`_blank`:e.target,rel:t?`noopener noreferrer`:e.rel})}var Ve=1152;function He(e,t){switch(t.type){case`toggle-mobile`:return{mobileOpen:!e.mobileOpen,moreOpen:!1};case`toggle-more`:return{mobileOpen:!1,moreOpen:!e.moreOpen};case`close-mobile`:return e.mobileOpen?{...e,mobileOpen:!1}:e;case`close-more`:return e.moreOpen?{...e,moreOpen:!1}:e;case`close-all`:return e.mobileOpen||e.moreOpen?{mobileOpen:!1,moreOpen:!1}:e}}function Ue({primaryAction:e=`chat`}){let[t,n]=(0,y.useReducer)(He,{mobileOpen:!1,moreOpen:!1}),r=c(),s=he(),d=()=>n({type:`close-all`}),f=()=>{if(d(),e===`download`&&u()){window.open(l(`/download`),`_blank`,`noopener,noreferrer`);return}r({to:e===`download`?`/download`:`/chat`})},p=(0,y.useRef)(null),m=(0,y.useRef)(null),h=(0,y.useRef)(null);return(0,y.useEffect)(()=>{let e=()=>{n({type:window.innerWidth>=Ve?`close-mobile`:`close-more`})};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,y.useEffect)(()=>{if(!t.mobileOpen&&!t.moreOpen)return;let e=e=>{e.key===`Escape`&&n({type:`close-all`})},r=e=>{let t=e.target;m.current&&m.current.contains(t)||p.current?.contains(t)||h.current?.contains(t)||n({type:`close-all`})};return document.addEventListener(`keydown`,e),document.addEventListener(`mousedown`,r),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`mousedown`,r)}},[t.mobileOpen,t.moreOpen]),(0,x.jsxs)(`nav`,{id:`main-nav`,className:`retro-layout`,style:{position:`sticky`,top:0,zIndex:50,borderBottom:`2px solid var(--ink, #1c211b)`,background:`var(--paper, #f1ece0)`},children:[(0,x.jsxs)(`div`,{style:{maxWidth:`72rem`,margin:`0 auto`,padding:`0 1rem`,height:`3.5rem`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`1rem`},children:[(0,x.jsxs)($,{to:u()?`/chat`:`/`,className:`nav-logo`,style:{display:`flex`,alignItems:`center`,gap:`0.5rem`,textDecoration:`none`,color:`inherit`,flexShrink:1,minWidth:0},children:[(0,x.jsx)(`img`,{src:`/brand/logo-lockup-compact.avif`,alt:`Keating`,style:{height:`1.875rem`,width:`auto`}}),(0,x.jsxs)(`span`,{className:`nav-version font-terminal`,children:[`v`,`4.0.2`]})]}),(0,x.jsxs)(`div`,{className:`nav-desktop`,style:{alignItems:`center`,gap:`1rem`},children:[(0,x.jsx)($,{to:`/pricing`,className:`nav-link glitch-hover font-terminal nav-desktop-link`,children:(0,x.jsx)(Z,{children:`[PRICING]`})}),(0,x.jsx)($,{to:`/courses`,className:`nav-link glitch-hover font-terminal nav-desktop-link`,children:(0,x.jsx)(Z,{children:`[COURSES]`})}),(0,x.jsx)($,{to:`/coming-up`,className:`nav-link glitch-hover font-terminal nav-desktop-link`,children:(0,x.jsx)(Z,{children:`[COMING UP]`})}),(0,x.jsx)($,{to:i,className:`nav-link glitch-hover font-terminal nav-desktop-link`,children:(0,x.jsx)(Z,{children:`[BLOG]`})}),(0,x.jsx)($,{to:`/live`,className:`nav-link glitch-hover font-terminal nav-desktop-link`,children:(0,x.jsx)(Z,{children:`[LIVE]`})}),(0,x.jsxs)(`div`,{ref:h,className:o({position:`relative`}),children:[(0,x.jsx)(`button`,{type:`button`,className:`nav-link glitch-hover font-terminal nav-desktop-link`,"aria-expanded":t.moreOpen,"aria-controls":`desktop-more-menu`,"aria-haspopup":`true`,onClick:()=>n({type:`toggle-more`}),children:(0,x.jsx)(Z,{children:`[MORE]`})}),t.moreOpen&&(0,x.jsxs)(`div`,{id:`desktop-more-menu`,"aria-label":s(`More navigation`),className:o({position:`absolute`,top:`calc(100% + 0.75rem)`,right:0,zIndex:60,display:`grid`,minWidth:`13rem`,border:`2px solid var(--ink)`,background:`var(--paper)`,padding:`0.5rem`,boxShadow:`5px 5px 0 var(--accent-dim)`,"& > a":{padding:`0.65rem 0.75rem`,whiteSpace:`nowrap`,_focusVisible:{outline:`3px solid var(--accent)`,outlineOffset:`-2px`}}}),children:[e!==`download`&&(0,x.jsx)($,{to:`/download`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[DOWNLOAD]`})}),(0,x.jsx)($,{to:`https://docs.keating.help/`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[DOCS]`})}),(0,x.jsx)($,{to:`/paper`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[PAPER]`})}),(0,x.jsx)($,{to:`/usage`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[USAGE]`})}),(0,x.jsx)($,{to:`/training-data`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[TRAINING DATA]`})}),(0,x.jsx)($,{to:`/bench`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[BENCH]`})}),(0,x.jsx)(`a`,{href:`https://github.com/Diogenesoftoronto/keating`,target:`_blank`,rel:`noreferrer`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[GITHUB]`})})]})]}),(0,x.jsx)(v,{}),(0,x.jsx)(`button`,{className:a(ie(),`nav-desktop-link`),style:{padding:`0.5rem 0.75rem`,fontWeight:700,fontSize:`0.875rem`,fontFamily:`'VT323', monospace`},onClick:f,children:e===`download`?(0,x.jsx)(Z,{children:`Download Keating`}):u()?(0,x.jsx)(Z,{children:`Open chat`}):(0,x.jsx)(Z,{children:`TRY_KEATING`})})]}),(0,x.jsx)(`div`,{className:a(`nav-mobile-actions`,o({display:`flex`,alignItems:`center`,gap:`0.5rem`})),children:(0,x.jsx)(`button`,{ref:m,id:`mobile-menu-btn`,className:`nav-mobile-toggle glitch-hover font-terminal`,style:{color:`var(--ink, #1c211b)`,border:`2px solid var(--ink, #1c211b)`,padding:`0.375rem 0.75rem`,cursor:`pointer`,background:`transparent`,fontSize:`1rem`,transition:`background 0.15s, color 0.15s`},onClick:()=>n({type:`toggle-mobile`}),"aria-expanded":t.mobileOpen,"aria-controls":`mobile-menu`,"aria-label":s(`Toggle navigation menu`),children:t.mobileOpen?(0,x.jsx)(Z,{children:`[CLOSE]`}):(0,x.jsx)(Z,{children:`[MENU]`})})})]}),t.mobileOpen&&(0,x.jsx)(`div`,{id:`mobile-menu`,ref:p,style:{borderTop:`2px solid var(--ink, #1c211b)`,background:`var(--paper, #f1ece0)`,maxHeight:`calc(100dvh - 3.5rem)`,overflowY:`auto`},children:(0,x.jsxs)(`div`,{className:`font-terminal`,style:{padding:`0.75rem 1rem`,display:`flex`,flexDirection:`column`,gap:`0.25rem`,fontSize:`1.125rem`},children:[(0,x.jsx)(v,{variant:`menu`,onToggled:d,className:o({width:`100%`,marginBottom:`0.25rem`})}),e!==`download`&&(0,x.jsx)($,{to:`/download`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[DOWNLOAD]`})}),(0,x.jsx)($,{to:`/pricing`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[PRICING]`})}),(0,x.jsx)($,{to:`/courses`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[COURSES]`})}),(0,x.jsx)($,{to:`/coming-up`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[COMING UP]`})}),(0,x.jsx)($,{to:`https://docs.keating.help/`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[DOCS]`})}),(0,x.jsx)($,{to:`https://blog.keating.help/`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[BLOG]`})}),(0,x.jsx)($,{to:`/paper`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[PAPER]`})}),(0,x.jsx)($,{to:`/usage`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[USAGE]`})}),(0,x.jsx)($,{to:`/training-data`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[TRAINING DATA]`})}),(0,x.jsx)($,{to:`/bench`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[BENCH]`})}),(0,x.jsx)($,{to:`/live`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[LIVE]`})}),(0,x.jsx)(`a`,{href:`https://github.com/Diogenesoftoronto/keating`,target:`_blank`,rel:`noreferrer`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[GITHUB]`})}),(0,x.jsx)(`button`,{className:ie(),style:{padding:`0.75rem 1rem`,fontWeight:700,fontSize:`1rem`,marginTop:`0.5rem`,width:`100%`,fontFamily:`'VT323', monospace`},onClick:f,children:e===`download`?(0,x.jsx)(Z,{children:`Download Keating`}):u()?(0,x.jsx)(Z,{children:`Open chat`}):(0,x.jsx)(Z,{children:`TRY_KEATING`})})]})})]})}export{$ as n,Z as r,Ue as t};
|
|
1
|
+
import{s as e}from"./rolldown-runtime-BG2f4sTM.js";import{T as t}from"./syntax-highlighter-Buac5fmw.js";import{C as n,Ct as r,G as i,M as a,N as o,S as s,Tt as c,U as l,W as u,_ as d,b as f,g as p,h as m,m as h,p as g,v as _,w as ee,wt as te,x as ne,y as re}from"./index-DCgpDQKf.js";import{t as v}from"./ThemeToggle-BZH64Rpu.js";import{s as ie}from"./recipes-lg2hVa6Q.js";var y=e(t(),1),ae=[];function b({locale:e,enableI18n:t,localesProp:n=ae}){let r=_().getDefaultLocale();return t&&_().requiresTranslation(e)?[...n,e,r]:[r]}var x=te();function oe({Currency:e,GtInternalCurrency:t,DateTime:n,GtInternalDateTime:r,Num:i,GtInternalNum:a,RelativeTime:o,GtInternalRelativeTime:s,Var:c,GtInternalVar:l}){return function({variableType:u,variableValue:d,variableOptions:f,locales:p,enableI18n:m,injectionType:h}){let g={_locale:p[0]??`en`,_enableI18n:m};if(u===`n`){let e=h===`automatic`?i:a,t=f;return(0,x.jsx)(e,{...g,options:t,children:d})}if(u===`d`){let e=h===`automatic`?n:r,t=f;return(0,x.jsx)(e,{...g,options:t,children:d})}if(u===`c`){let n=h===`automatic`?e:t,r=f;return(0,x.jsx)(n,{...g,options:r,children:d})}if(u===`rt`){let e=h===`automatic`?o:s,t=f;if(typeof d==`number`&&t?.unit)return(0,x.jsx)(e,{...g,value:d,unit:t.unit,baseDate:t?.baseDate,options:t});let n=d instanceof Date?d:typeof d==`string`||typeof d==`number`?new Date(d):void 0;return(0,x.jsx)(e,{...g,date:n&&!isNaN(n.getTime())?n:void 0,baseDate:t?.baseDate,options:t})}let _=d;return(0,x.jsx)(h===`automatic`?l:c,{...g,children:_})}}var se={variable:`value`,number:`n`,datetime:`date`,currency:`cost`,"relative-time":`time`};function S(e={},t){return typeof e.name==`string`?e.name:`_gt_${se[t]||`value`}_${e[`data-_gt`]?.id}`}function C(e){return typeof e==`object`&&!!e&&`data-_gt`in e&&typeof e[`data-_gt`]==`object`&&!!e[`data-_gt`]&&`transformation`in e[`data-_gt`]&&e[`data-_gt`]?.transformation===`variable`}function w(e){let t=e[`data-_gt`]?.variableType||`variable`;return{variableName:S(e,t),variableType:n(t),injectionType:e[`data-_gt`]?.injectionType||`manual`,variableValue:(()=>{if(e.value!==void 0)return e.value;if(e.date!==void 0)return e.date;if(e[`data-_gt-unformatted-value`]!==void 0)return e[`data-_gt-unformatted-value`];if(e.children!==void 0)return e.children})(),variableOptions:(()=>{let t={...e.currency!==void 0&&{currency:e.currency},...e.unit!==void 0&&{unit:e.unit},...e.baseDate!==void 0&&{baseDate:e.baseDate},...e.options!==void 0&&e.options};return Object.keys(t).length?t:typeof e[`data-_gt-variable-options`]==`string`?JSON.parse(e[`data-_gt-variable-options`]):e[`data-_gt-variable-options`]||void 0})()}}function T(e){return e&&e.props&&e.props[`data-_gt`]?e.props[`data-_gt`]:null}function E(e,t,n){let r=``,i=null;return typeof e==`number`&&!i&&n&&(r=ne(e,Object.keys(n).filter(s),t)),r&&!i&&(i=n[r]),i}function D({renderVariable:e}){return function({children:t,defaultLocale:n=`en`,enableI18n:r}){let i=t=>{let i=T(t);if(C(t.props)){let{variableType:i,variableValue:a,variableOptions:o,injectionType:s}=w(t.props);return e({variableType:i,variableValue:a,variableOptions:o,locales:[n],enableI18n:r,injectionType:s})}if(i?.transformation===`plural`){let e=i.branches||{};return typeof t.props.n==`number`?o(E(t.props.n,[n],e)??t.props.children):t.props.children==null?null:o(t.props.children)}if(i?.transformation===`branch`){let{children:e,branch:n}=t.props,r=i.branches||{},a=n==null||n===``?void 0:n.toString();return o(a&&r[a]!==void 0?r[a]:e)}return i?.transformation===`fragment`?y.createElement(y.Fragment,{key:t.props.key,children:o(t.props.children)}):t.props.children?y.cloneElement(t,{...t.props,"data-_gt":void 0,children:o(t.props.children)}):y.cloneElement(t,{...t.props,"data-_gt":void 0})},a=e=>y.isValidElement(e)?i(e):e,o=e=>Array.isArray(e)?y.Children.map(e,a):a(e);return o(t)}}function ce({renderVariable:e}){let t=D({renderVariable:e});function n({sourceElement:e,targetElement:n,locales:i=[`en`],enableI18n:a}){let{props:o}=e,s=o[`data-_gt`],c=s?.transformation,l=n.d,u={};if(l&&Object.entries(f).forEach(([e,t])=>{l[e]&&(u[t]=l[e])}),c===`plural`){let o=e.props.n;return typeof o==`number`?r({source:E(o,i,s.branches||{})??e.props.children,target:E(o,i,n.d?.b||{})??n.c,locales:i,enableI18n:a}):t({children:e,defaultLocale:i[0],enableI18n:a})}if(c===`branch`){let{branch:e,children:t}=o,c=e==null||e===``?void 0:e.toString(),l=s.branches||{},u=n.d?.b||{};return r({source:c&&l[c]!==void 0?l[c]:t,target:c&&u[c]!==void 0?u[c]:n.c,locales:i,enableI18n:a})}return c===`fragment`&&n.c?y.createElement(y.Fragment,{key:e.props.key,children:r({source:o.children,target:n.c,locales:i,enableI18n:a})}):o?.children&&n?.c?y.cloneElement(e,{...o,...u,"data-_gt":void 0,children:r({source:o.children,target:n.c,locales:i,enableI18n:a})}):t({children:e,defaultLocale:i[0],enableI18n:a})}function r({source:r,target:i,locales:a=[`en`],enableI18n:o}){if(i==null&&r)return t({children:r,defaultLocale:a[0],enableI18n:o});if(typeof i==`string`)return i;if(Array.isArray(i)&&!Array.isArray(r)&&r&&(r=[r]),Array.isArray(r)&&Array.isArray(i)){let t={},s={},c={},l=r.filter(e=>{if(y.isValidElement(e))if(C(e.props)){let{variableName:n,variableValue:r,variableOptions:i,injectionType:a}=w(e.props);t[n]=r,s[n]=i,c[n]=a}else return!0;return!1}),u=e=>l.find(t=>{let n=T(t);return n?.id===void 0?!1:n.id===e.i})||l.shift();return i.map((r,i)=>{if(typeof r==`string`)return(0,x.jsx)(y.Fragment,{children:r},`string_${i}`);if(ee(r))return(0,x.jsx)(y.Fragment,{children:e({variableType:r.v||`v`,variableValue:t[r.k],variableOptions:s[r.k],locales:a,enableI18n:o,injectionType:c[r.k]||`manual`})},`var_${i}`);let l=u(r);return l?(0,x.jsx)(y.Fragment,{children:n({sourceElement:l,targetElement:r,locales:a,enableI18n:o})},`element_${i}`):null})}if(i&&typeof i==`object`&&!Array.isArray(i)){let t=ee(i)?`variable`:`element`;if(y.isValidElement(r)){if(t===`element`)return n({sourceElement:r,targetElement:i,locales:a,enableI18n:o});if(C(r.props)){let{variableValue:t,variableOptions:n,variableType:i,injectionType:s}=w(r.props);return e({variableType:i,variableValue:t,variableOptions:n,locales:a,enableI18n:o,injectionType:s})}}}return t({children:r,defaultLocale:a[0],enableI18n:o})}return r}function le({renderDefaultChildren:e,renderTranslatedChildren:t}){function n({taggedSourceChildren:e,targetJsxChildren:t,locale:n,defaultLocale:a,enableI18n:o,shouldTranslate:s}){return!s||t==null?r({taggedSourceChildren:e,defaultLocale:a,enableI18n:o}):i({taggedSourceChildren:e,targetJsxChildren:t,locales:[n,a],enableI18n:o})}function r({taggedSourceChildren:t,defaultLocale:n,enableI18n:r}){return e({children:t,defaultLocale:n,enableI18n:r})}function i({taggedSourceChildren:e,targetJsxChildren:n,locales:r,enableI18n:i}){return t({source:e,target:n,locales:r,enableI18n:i})}return n}function ue(e){let t=oe(e),n=D({renderVariable:t}),r=ce({renderVariable:t});return{renderVariable:t,renderDefaultChildren:n,renderTranslatedChildren:r,renderPreparedT:le({renderDefaultChildren:n,renderTranslatedChildren:r})}}function O(){return g()?.conditionStore??m()}function k(){return O().getLocale()}function A(){return O().getEnableI18n()}function j(){return(0,y.useMemo)(()=>_().getDefaultLocale(),[])}function M(){let e=A(),t=k();return e&&_().requiresTranslation(t)}function N(){return g()?.i18nStore||h()}function P(){return g()?.translationsSnapshot||{}}var de=()=>{};function fe(){return de}var F=fe;function pe(e=[]){let t=P(),n=N(),r=F(),i=(0,y.useRef)(null);return i.current??=new Set,me(e,i),n.subscribeToTranslationEvents,(0,y.useCallback)(e=>(p(e),n.getTranslateSnapshot(e,t)),[n,t,r,!1])}function me(e,t){let n=N(),r=k(),i=M(),a=P(),o=(0,y.useMemo)(()=>e?.length>0&&i&&!1,[e,i,!1]),s=(0,y.useMemo)(()=>o?e.map(({message:e,...t})=>{let n=t.$locale??r,i={locale:n,message:e,options:d(n,t,`ICU`)};return[i,p(i)]}):[],[r,o,e]);o&&s.forEach(([,e])=>{t.current.add(e)}),(0,y.useEffect)(()=>{o&&s.filter(([e])=>n.getTranslateSnapshot(e,a)==null).forEach(([e])=>n.translate(e))},[o,n,s,a])}function he(e){let t=k(),n=j(),r=M(),i=pe(e);return(0,y.useCallback)((e,a={})=>{let o=d(a.$locale??t,a,`ICU`);return re(r?{source:e,target:i({locale:o.$locale,message:e,options:o}),options:o,sourceLocale:n}:{options:o,source:e,sourceLocale:n})},[n,t,r,i])}function ge({_enableI18n:e,_locale:t,children:n,currency:r=`USD`,options:i={},locales:a=[]}){let o=b({locale:t,enableI18n:e,localesProp:a}),s=_().getGTClass();if(n==null)return null;let c=typeof n==`string`?parseFloat(n):n;return s.formatCurrency(c,r,{locales:o,...i})}function I({_enableI18n:e,_locale:t,...n}){return ge({...n,_enableI18n:e??A(),_locale:t??k()})}function L(e){return(0,x.jsx)(I,{...e})}I._gtt=`variable-currency-automatic`,L._gtt=`variable-currency`;function _e({_enableI18n:e,_locale:t,children:n,options:r={},locales:i=[]}){let a=b({locale:t,enableI18n:e,localesProp:i}),o=_().getGTClass();return n==null?null:o.formatDateTime(n,{locales:a,...r}).replace(/[\u200F\u202B\u202E]/g,``)}function R({_enableI18n:e,_locale:t,...n}){return _e({...n,_enableI18n:e??A(),_locale:t??k()})}function z(e){return(0,x.jsx)(R,{...e})}R._gtt=`variable-datetime-automatic`,z._gtt=`variable-datetime`;function ve({_enableI18n:e,_locale:t,children:n,options:r={},locales:i=[]}){let a=b({locale:t,enableI18n:e,localesProp:i}),o=_().getGTClass();if(n==null)return null;let s=typeof n==`string`?parseFloat(n):n;return o.formatNum(s,{locales:a,...r})}function B({_enableI18n:e,_locale:t,...n}){return ve({...n,_enableI18n:e??A(),_locale:t??k()})}function V(e){return(0,x.jsx)(B,{...e})}B._gtt=`variable-number-automatic`,V._gtt=`variable-number`;function ye({_enableI18n:e,_locale:t,date:n,children:r,value:i,unit:a,baseDate:o,locales:s=[],options:c={}}){let l=b({locale:t,enableI18n:e,localesProp:s}),u=_().getGTClass(),d=n??r;return i!==void 0&&a?u.formatRelativeTime(i,a,{locales:l,numeric:c.numeric,style:c.style,localeMatcher:c.localeMatcher}):d==null?null:u.formatRelativeTimeFromDate(d,{locales:l,baseDate:o??new Date,numeric:c.numeric,style:c.style,localeMatcher:c.localeMatcher})}function H({_enableI18n:e,_locale:t,...n}){return ye({...n,_enableI18n:e??A(),_locale:t??k()})}function U(e){return(0,x.jsx)(H,{...e})}H._gtt=`variable-relative-time-automatic`,U._gtt=`variable-relative-time`;function W({children:e}){return e}function G({children:e}){return W({children:e})}function K({children:e}){return W({children:e})}G._gtt=`variable-variable`,K._gtt=`variable-variable-automatic`;function be(e){let t=N(),n=P();return F(),(0,y.useSyncExternalStore)(n=>t.subscribeToTranslate(e,n),()=>t.getTranslateSnapshot(e,n),()=>t.getTranslateSnapshot(e,n))}var{renderVariable:xe,renderDefaultChildren:Se,renderTranslatedChildren:Ce,renderPreparedT:we}=ue({Currency:L,GtInternalCurrency:I,DateTime:z,GtInternalDateTime:R,Num:V,GtInternalNum:B,RelativeTime:U,GtInternalRelativeTime:H,Var:G,GtInternalVar:K});function q(e,t=0){let n=t,r=e=>{let{type:t,props:r}=e;n+=1;let i={id:n,injectionType:`manual`},a;try{a=typeof t==`function`?t._gtt:void 0}catch{}if(a){let e=a.split(`-`);if((e[1]===`automatic`||e[2]===`automatic`)&&(i.injectionType=`automatic`),e[0]===`translate`&&(e[0]=`fragment`),e[0]===`variable`&&(i.variableType=e?.[1]||`variable`),e[0]===`plural`){let e=Object.entries(r).reduce((e,[t,r])=>(s(t)&&(e[t]=q(r,n)),e),{});Object.keys(e).length&&(i.branches=e)}if(e[0]===`branch`){let{children:e,branch:t,...a}=r,o=Object.fromEntries(Object.entries(a).filter(([e])=>!e.startsWith(`data-`))),s=Object.entries(o).reduce((e,[t,r])=>(e[t]=q(r,n),e),{});Object.keys(s).length&&(i.branches=s)}i.transformation=e[0]}return i};function i(e){let{props:t}=e,n=r(e),i={...t,"data-_gt":n};return t.children&&!n.variableType&&(i.children=o(t.children)),e.type===y.Fragment&&(i[`data-_gt`].transformation=`fragment`),y.cloneElement(e,i)}function a(e){return(0,y.isValidElement)(e)?i(e):e}function o(e){return Array.isArray(e)?y.Children.map(e,a):a(e)}return o(e)}function Te(e){return Y(e,0)}function Ee(e,t){let{type:n,props:r}=e,i=De(n);if(typeof r!=`object`||!r)return e;if(i){let{componentType:n,injectionType:a}=i;if(n===`variable`)return e;if(n===`branch`)return(0,y.cloneElement)(e,{...Object.entries(r).reduce((e,[n,r])=>(n!==`branch`&&!n.startsWith(`data-`)?e[n]=J(r,t):e[n]=r,e),{})});if(n===`plural`)return(0,y.cloneElement)(e,{...Object.entries(r).reduce((e,[n,r])=>(s(n)||n===`children`?e[n]=J(r,t):e[n]=r,e),{})});if(n===`derive`)return(0,y.cloneElement)(e,{...r,...`children`in r&&{children:Y(r.children,t+1)}});if(n===`translate`&&a===`automatic`&&t>0)return`children`in r?Y(r.children,t):void 0;n===`translate`&&a===`automatic`&&console.warn(Oe)}return(0,y.cloneElement)(e,{...r,...`children`in r&&{children:Y(r.children,t)}})}function J(e,t){return(0,y.isValidElement)(e)?Ee(e,t):e}function Y(e,t){return Array.isArray(e)?y.Children.map(e,e=>J(e,t)):J(e,t)}function De(e){let t=typeof e==`function`&&`_gtt`in e?e._gtt:void 0;if(t==null||typeof t!=`string`)return;let n=t.split(`-`);return{componentType:n[0],injectionType:n[1]===`automatic`||n[2]===`automatic`?`automatic`:`manual`}}var Oe=`'@generaltranslation/react-core Warning: A <_T> component was found injected outside of a <Derive> boundary. This may affect translation resolution for this component.`;function ke(e){return y.isValidElement(e)}var Ae=e=>{if(!e)return``;let{type:t,props:n}=e;if(t&&typeof t==`function`){if(`displayName`in t&&typeof t.displayName==`string`&&t.displayName)return t.displayName;if(`name`in t&&typeof t.name==`string`&&t.name)return t.name}return t&&typeof t==`string`?t:n.href?`a`:n[`data-_gt`]?.id?`C${n[`data-_gt`].id}`:`function`},je=(e,t,n)=>{let r=Object.entries(f).reduce((e,[n,r])=>{let i=t[r];return typeof i==`string`&&(e[n]=i),e},{});if((e===`plural`||e===`branch`)&&n){let t={};Object.entries(n).forEach(([e,n])=>{t[e]=X(n)}),r={...r,b:t,t:e===`plural`?`p`:`b`}}return Object.keys(r).length?r:void 0},Me=e=>{let{props:t}=e,r={t:Ae(e)};if(t[`data-_gt`]){let e=t[`data-_gt`],i=e.transformation;if(i===`variable`){let r=e.variableType||`variable`,i=S(t,r),a=n(r);return{i:e.id,k:i,v:a}}r.i=e.id,r.d=je(i,t,e.branches)}return t.children&&(r.c=X(t.children)),r},Ne=e=>ke(e)?Me(e):typeof e==`number`?e.toString():e;function X(e){return Array.isArray(e)?e.map(Ne):Ne(e)}function Pe({sourceChildren:e,params:t,locale:n}){let r=Fe(e);return{taggedSourceChildren:r,sourceJsxChildren:Ie(r),targetOptions:Le({options:Re(t),locale:n})}}function Fe(e){return q(Te(e))}function Ie(e){return X(e)}function Le({options:e,locale:t}){return{...e,$locale:t}}function Re(e){return{...e,$format:`JSX`,$context:e.$context??e.context,$id:e.$id??e.id,$_hash:e.$_hash??e._hash,$maxChars:e.$maxChars??e.maxChars,$requiresReview:e.$requiresReview??e.requiresReview}}function ze({sourceChildren:e,params:t,_locale:n,_enableI18n:r}){let i=k(),a=A(),o=j(),s=n??i,c=r??a;return{defaultLocale:o,enableI18n:c,locale:s,shouldTranslate:c&&_().requiresTranslation(s),...(0,y.useMemo)(()=>Pe({sourceChildren:e,params:t,locale:s}),[s,t,e])}}function Z(e){return Q(e)}function Be(e){return Q(e)}Z._gtt=`translate-client`,Be._gtt=`translate-client-automatic`;function Q({children:e,_locale:t,_enableI18n:n,_renderPreparedT:r=we,...i}){let{defaultLocale:a,locale:o,enableI18n:s,targetOptions:c,taggedSourceChildren:l,sourceJsxChildren:u,shouldTranslate:d}=ze({sourceChildren:e,params:i,_locale:t,_enableI18n:n}),f=be({locale:o,message:u,options:c}),p=(0,y.useRef)(null),m=r({taggedSourceChildren:l,targetJsxChildren:f,locale:o,defaultLocale:a,enableI18n:s,shouldTranslate:d});return p.current=m,m}function $(e){let t=u()&&typeof e.to==`string`?l(e.to):null;return(0,x.jsx)(r,{...e,to:t??e.to,target:t?`_blank`:e.target,rel:t?`noopener noreferrer`:e.rel})}var Ve=1152;function He(e,t){switch(t.type){case`toggle-mobile`:return{mobileOpen:!e.mobileOpen,moreOpen:!1};case`toggle-more`:return{mobileOpen:!1,moreOpen:!e.moreOpen};case`close-mobile`:return e.mobileOpen?{...e,mobileOpen:!1}:e;case`close-more`:return e.moreOpen?{...e,moreOpen:!1}:e;case`close-all`:return e.mobileOpen||e.moreOpen?{mobileOpen:!1,moreOpen:!1}:e}}function Ue({primaryAction:e=`chat`}){let[t,n]=(0,y.useReducer)(He,{mobileOpen:!1,moreOpen:!1}),r=c(),s=he(),d=()=>n({type:`close-all`}),f=()=>{if(d(),e===`download`&&u()){window.open(l(`/download`),`_blank`,`noopener,noreferrer`);return}r({to:e===`download`?`/download`:`/chat`})},p=(0,y.useRef)(null),m=(0,y.useRef)(null),h=(0,y.useRef)(null);return(0,y.useEffect)(()=>{let e=()=>{n({type:window.innerWidth>=Ve?`close-mobile`:`close-more`})};return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,y.useEffect)(()=>{if(!t.mobileOpen&&!t.moreOpen)return;let e=e=>{e.key===`Escape`&&n({type:`close-all`})},r=e=>{let t=e.target;m.current&&m.current.contains(t)||p.current?.contains(t)||h.current?.contains(t)||n({type:`close-all`})};return document.addEventListener(`keydown`,e),document.addEventListener(`mousedown`,r),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`mousedown`,r)}},[t.mobileOpen,t.moreOpen]),(0,x.jsxs)(`nav`,{id:`main-nav`,className:`retro-layout`,style:{position:`sticky`,top:0,zIndex:50,borderBottom:`2px solid var(--ink, #1c211b)`,background:`var(--paper, #f1ece0)`},children:[(0,x.jsxs)(`div`,{style:{maxWidth:`72rem`,margin:`0 auto`,padding:`0 1rem`,height:`3.5rem`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`1rem`},children:[(0,x.jsxs)($,{to:u()?`/chat`:`/`,className:`nav-logo`,style:{display:`flex`,alignItems:`center`,gap:`0.5rem`,textDecoration:`none`,color:`inherit`,flexShrink:1,minWidth:0},children:[(0,x.jsx)(`img`,{src:`/brand/logo-lockup-compact.avif`,alt:`Keating`,style:{height:`1.875rem`,width:`auto`}}),(0,x.jsxs)(`span`,{className:`nav-version font-terminal`,children:[`v`,`4.0.3`]})]}),(0,x.jsxs)(`div`,{className:`nav-desktop`,style:{alignItems:`center`,gap:`1rem`},children:[(0,x.jsx)($,{to:`/pricing`,className:`nav-link glitch-hover font-terminal nav-desktop-link`,children:(0,x.jsx)(Z,{children:`[PRICING]`})}),(0,x.jsx)($,{to:`/courses`,className:`nav-link glitch-hover font-terminal nav-desktop-link`,children:(0,x.jsx)(Z,{children:`[COURSES]`})}),(0,x.jsx)($,{to:`/coming-up`,className:`nav-link glitch-hover font-terminal nav-desktop-link`,children:(0,x.jsx)(Z,{children:`[COMING UP]`})}),(0,x.jsx)($,{to:i,className:`nav-link glitch-hover font-terminal nav-desktop-link`,children:(0,x.jsx)(Z,{children:`[BLOG]`})}),(0,x.jsx)($,{to:`/live`,className:`nav-link glitch-hover font-terminal nav-desktop-link`,children:(0,x.jsx)(Z,{children:`[LIVE]`})}),(0,x.jsxs)(`div`,{ref:h,className:o({position:`relative`}),children:[(0,x.jsx)(`button`,{type:`button`,className:`nav-link glitch-hover font-terminal nav-desktop-link`,"aria-expanded":t.moreOpen,"aria-controls":`desktop-more-menu`,"aria-haspopup":`true`,onClick:()=>n({type:`toggle-more`}),children:(0,x.jsx)(Z,{children:`[MORE]`})}),t.moreOpen&&(0,x.jsxs)(`div`,{id:`desktop-more-menu`,"aria-label":s(`More navigation`),className:o({position:`absolute`,top:`calc(100% + 0.75rem)`,right:0,zIndex:60,display:`grid`,minWidth:`13rem`,border:`2px solid var(--ink)`,background:`var(--paper)`,padding:`0.5rem`,boxShadow:`5px 5px 0 var(--accent-dim)`,"& > a":{padding:`0.65rem 0.75rem`,whiteSpace:`nowrap`,_focusVisible:{outline:`3px solid var(--accent)`,outlineOffset:`-2px`}}}),children:[e!==`download`&&(0,x.jsx)($,{to:`/download`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[DOWNLOAD]`})}),(0,x.jsx)($,{to:`https://docs.keating.help/`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[DOCS]`})}),(0,x.jsx)($,{to:`/paper`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[PAPER]`})}),(0,x.jsx)($,{to:`/usage`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[USAGE]`})}),(0,x.jsx)($,{to:`/training-data`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[TRAINING DATA]`})}),(0,x.jsx)($,{to:`/bench`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[BENCH]`})}),(0,x.jsx)(`a`,{href:`https://github.com/Diogenesoftoronto/keating`,target:`_blank`,rel:`noreferrer`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[GITHUB]`})})]})]}),(0,x.jsx)(v,{}),(0,x.jsx)(`button`,{className:a(ie(),`nav-desktop-link`),style:{padding:`0.5rem 0.75rem`,fontWeight:700,fontSize:`0.875rem`,fontFamily:`'VT323', monospace`},onClick:f,children:e===`download`?(0,x.jsx)(Z,{children:`Download Keating`}):u()?(0,x.jsx)(Z,{children:`Open chat`}):(0,x.jsx)(Z,{children:`TRY_KEATING`})})]}),(0,x.jsx)(`div`,{className:a(`nav-mobile-actions`,o({display:`flex`,alignItems:`center`,gap:`0.5rem`})),children:(0,x.jsx)(`button`,{ref:m,id:`mobile-menu-btn`,className:`nav-mobile-toggle glitch-hover font-terminal`,style:{color:`var(--ink, #1c211b)`,border:`2px solid var(--ink, #1c211b)`,padding:`0.375rem 0.75rem`,cursor:`pointer`,background:`transparent`,fontSize:`1rem`,transition:`background 0.15s, color 0.15s`},onClick:()=>n({type:`toggle-mobile`}),"aria-expanded":t.mobileOpen,"aria-controls":`mobile-menu`,"aria-label":s(`Toggle navigation menu`),children:t.mobileOpen?(0,x.jsx)(Z,{children:`[CLOSE]`}):(0,x.jsx)(Z,{children:`[MENU]`})})})]}),t.mobileOpen&&(0,x.jsx)(`div`,{id:`mobile-menu`,ref:p,style:{borderTop:`2px solid var(--ink, #1c211b)`,background:`var(--paper, #f1ece0)`,maxHeight:`calc(100dvh - 3.5rem)`,overflowY:`auto`},children:(0,x.jsxs)(`div`,{className:`font-terminal`,style:{padding:`0.75rem 1rem`,display:`flex`,flexDirection:`column`,gap:`0.25rem`,fontSize:`1.125rem`},children:[(0,x.jsx)(v,{variant:`menu`,onToggled:d,className:o({width:`100%`,marginBottom:`0.25rem`})}),e!==`download`&&(0,x.jsx)($,{to:`/download`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[DOWNLOAD]`})}),(0,x.jsx)($,{to:`/pricing`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[PRICING]`})}),(0,x.jsx)($,{to:`/courses`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[COURSES]`})}),(0,x.jsx)($,{to:`/coming-up`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[COMING UP]`})}),(0,x.jsx)($,{to:`https://docs.keating.help/`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[DOCS]`})}),(0,x.jsx)($,{to:`https://blog.keating.help/`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[BLOG]`})}),(0,x.jsx)($,{to:`/paper`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[PAPER]`})}),(0,x.jsx)($,{to:`/usage`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[USAGE]`})}),(0,x.jsx)($,{to:`/training-data`,className:`nav-link glitch-hover font-terminal`,onClick:d,children:(0,x.jsx)(Z,{children:`[TRAINING DATA]`})}),(0,x.jsx)($,{to:`/bench`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[BENCH]`})}),(0,x.jsx)($,{to:`/live`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[LIVE]`})}),(0,x.jsx)(`a`,{href:`https://github.com/Diogenesoftoronto/keating`,target:`_blank`,rel:`noreferrer`,className:`nav-link glitch-hover`,style:{padding:`0.75rem 0.5rem`},onClick:d,children:(0,x.jsx)(Z,{children:`[GITHUB]`})}),(0,x.jsx)(`button`,{className:ie(),style:{padding:`0.75rem 1rem`,fontWeight:700,fontSize:`1rem`,marginTop:`0.5rem`,width:`100%`,fontFamily:`'VT323', monospace`},onClick:f,children:e===`download`?(0,x.jsx)(Z,{children:`Download Keating`}):u()?(0,x.jsx)(Z,{children:`Open chat`}):(0,x.jsx)(Z,{children:`TRY_KEATING`})})]})})]})}export{$ as n,Z as r,Ue as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./rolldown-runtime-BG2f4sTM.js";import{T as t}from"./syntax-highlighter-Buac5fmw.js";import{r as n}from"./public-client-KRBnkgBr.js";import{$n as r,Gn as i,H as a,Jn as o,Kn as s,M as c,N as l,Qn as u,Yn as d,er as f,ir as p,nr as m,qn as h,tr as g,wt as _}from"./index-C8C76R86.js";import{t as v}from"./createLucideIcon-C_7xXnHN.js";import{t as y}from"./refresh-cw-BoSK2-Rv.js";import{t as b}from"./x-dksMGet2.js";import{m as x,u as S}from"./recipes-BcSW8MlI.js";var C=v(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),w=v(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),T=e(t(),1),E=_();function D({refreshing:e=!1,ready:t=!1,balanceMicros:n}){let r=(0,T.useRef)(void 0),[i,a]=(0,T.useState)(0),[o,s]=(0,T.useState)(!1);(0,T.useEffect)(()=>{e||n===void 0||(t&&(r.current===void 0||n>r.current)&&(a(e=>e+1),s(!0)),r.current=n)},[t,e,n]);let c=e?`wallet-refresh`:t?`credits-ready`:`insufficient-funds`;return(0,E.jsx)(`span`,{className:`keating-credit-sprite`,"data-state":c,"data-animated":c!==`credits-ready`||o,"aria-hidden":`true`,onAnimationEnd:()=>s(!1),style:{backgroundImage:`url("/brand/keatingbot-${c}-${c===`insufficient-funds`?`v2`:`v1`}.png")`}},`${c}:${i}`)}function O({wallet:e,refreshing:t=!1,checkingOut:n=!1,retrying:i=!1,error:a,checkoutUrl:o,requiredMicros:s=1e5,checkoutEnabled:c=!1,details:l,initialPackId:u,preserveMessage:d=!0,onRefresh:p,onRetry:m,onCheckout:h,onModelSelect:_}){let[v,b]=(0,T.useState)(!!u),[x,S]=(0,T.useState)(u??`keating_pack_10`),w=(0,T.useId)(),O=(0,T.useId)(),k=f(e,s),A=r(e,c),j=A.find(e=>e.id===x)??A[0],M=e?.welcomeCredit,N=!!M?.granted&&M.remainingMicros>0,P=t||n||i;return(0,E.jsxs)(`section`,{className:`keating-credit-recovery`,"aria-labelledby":w,"aria-busy":P,children:[(0,E.jsx)(D,{refreshing:t,ready:k,balanceMicros:e?.availableMicros}),(0,E.jsxs)(`div`,{className:`keating-credit-recovery__body`,children:[(0,E.jsx)(`h3`,{id:w,children:k?N?`Your starter credit is ready`:`Ready to keep learning`:d?`Your message is safe`:`Your Keating credits`}),(0,E.jsx)(`p`,{children:k?`Your wallet has enough credit. You can retry your saved message.`:d?`Keating needs a little more credit to answer. You won’t need to type your message again.`:`Choose a one-time balance for Inkling Small, or check your current credits.`}),(0,E.jsxs)(`div`,{"aria-live":`polite`,role:`status`,children:[t?(0,E.jsx)(`p`,{children:`Checking your wallet…`}):e?(0,E.jsxs)(`div`,{className:`keating-credit-recovery__balance`,children:[(0,E.jsxs)(`p`,{children:[(0,E.jsx)(`strong`,{children:g(e.availableMicros)}),` available`]}),k&&(0,E.jsx)(`button`,{type:`button`,disabled:P,onClick:()=>b(e=>!e),"aria-expanded":v,children:`Top up`})]}):(0,E.jsx)(`p`,{className:`keating-credit-recovery__muted`,children:`Your balance hasn’t been verified yet.`}),N&&(0,E.jsxs)(`p`,{className:`keating-credit-recovery__muted`,children:[`Your account received `,g(M.amountMicros),` in one-time free starter credit.`]}),e?.blocked&&(0,E.jsx)(`p`,{children:`Your account needs attention before hosted responses can continue. Adding credits may not resolve an account restriction.`}),o&&!k&&!t&&(0,E.jsx)(`p`,{children:`Come back after checkout and refresh your balance. Payment is confirmed by your wallet, not this page.`})]}),a&&(0,E.jsx)(`p`,{className:`keating-credit-recovery__error`,role:`alert`,children:a}),(0,E.jsxs)(`div`,{className:`keating-credit-recovery__actions`,children:[k&&m?(0,E.jsx)(`button`,{type:`button`,"data-primary":`true`,disabled:P,onClick:m,children:i?`Resuming…`:d?`Retry response`:`Continue`}):(0,E.jsx)(`button`,{type:`button`,"data-primary":`true`,disabled:P,onClick:()=>b(e=>!e),"aria-expanded":v,children:`Add credits`}),(0,E.jsxs)(`button`,{type:`button`,disabled:P,onClick:p,children:[(0,E.jsx)(y,{size:14,"aria-hidden":`true`}),t?`Refreshing…`:`Refresh balance`]}),_&&(0,E.jsx)(`button`,{type:`button`,disabled:P,onClick:_,children:`Choose another model`})]}),v&&(0,E.jsxs)(`fieldset`,{disabled:P,children:[(0,E.jsx)(`legend`,{children:`One-time credit packs · USD`}),A.length?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`div`,{className:`keating-credit-recovery__packs`,children:A.map(e=>(0,E.jsxs)(`label`,{className:`keating-credit-recovery__pack`,children:[(0,E.jsx)(`input`,{type:`radio`,name:O,value:e.id,checked:j?.id===e.id,onChange:()=>S(e.id)}),`$`,e.priceUsd]},e.id))}),(0,E.jsx)(`p`,{className:`keating-credit-recovery__muted`,children:`The amount you choose becomes AI credit. No subscription.`}),(0,E.jsx)(`div`,{className:`keating-credit-recovery__actions`,children:(0,E.jsx)(`button`,{type:`button`,"data-primary":`true`,disabled:P||!j,onClick:()=>j&&h(j.id),children:n?`Preparing checkout…`:`Continue to checkout · $${j?.priceUsd}`})})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`p`,{children:[`Credit purchases aren’t available right now.`,d?` Your saved message will stay here.`:``]}),(0,E.jsx)(`p`,{className:`keating-credit-recovery__muted`,children:`Refresh to check your balance and any starter credit, or use another model.`})]})]}),o&&(0,E.jsx)(`div`,{className:`keating-credit-recovery__actions`,children:(0,E.jsxs)(`a`,{className:`keating-credit-recovery__link`,href:o,target:`_blank`,rel:`noopener noreferrer`,children:[`Open secure checkout `,(0,E.jsx)(C,{size:14,"aria-hidden":`true`})]})}),l&&(0,E.jsxs)(`details`,{children:[(0,E.jsx)(`summary`,{children:`Technical details`}),(0,E.jsx)(`p`,{children:l})]})]})]})}function k({onRetry:e,onModelSelect:t,details:i,initialPackId:a,preserveMessage:c=!0}){let[l,u]=(0,T.useState)(),[d,p]=(0,T.useState)(!1),[h,g]=(0,T.useState)(!1),[_,v]=(0,T.useState)(!1),[y,b]=(0,T.useState)(),[x,S]=(0,T.useState)(),C=(0,T.useRef)(!0),w=(0,T.useRef)(!1),D=n();(0,T.useEffect)(()=>(C.current=!0,()=>{C.current=!1}),[]);let k=(0,T.useCallback)(async()=>{p(!0);try{let e=m(await o());return C.current&&(u(e),b(void 0)),e}catch{C.current&&(u(void 0),b(`We couldn’t verify your balance. Check your connection and refresh again.`));return}finally{C.current&&p(!1)}},[]),A=(0,T.useCallback)(async()=>{if(!w.current){w.current=!0;try{await k()}finally{w.current=!1}}},[k]);(0,T.useEffect)(()=>{A()},[A]),(0,T.useEffect)(()=>{if(!x)return;let e=()=>{document.visibilityState!==`hidden`&&A()};return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[x,A]);let j=async()=>{if(!(w.current||!e)){w.current=!0,v(!0);try{let t=await k();C.current&&f(t,D)&&await e()}finally{w.current=!1,C.current&&v(!1)}}},M=async e=>{if(!w.current){w.current=!0,g(!0),b(void 0);try{if(!r(await k(),!1).some(t=>t.id===e))throw Error(`Credit purchases aren’t available right now. Your message is still saved.`);let t=await s(e,`${window.location.protocol===`https:`?window.location.origin:`https://keating.help`}/pricing?checkout=returned`),n=new URL(t.url??t.checkout_url??``);if(n.protocol!==`https:`||n.username||n.password)throw Error(`Checkout could not be opened. Please try again.`);C.current&&(S(n.href),window.open(n.href,`_blank`,`noopener,noreferrer`))}catch(e){C.current&&b(e instanceof Error?e.message:`Checkout could not be opened. Your message is still saved.`)}finally{w.current=!1,C.current&&g(!1)}}};return(0,E.jsx)(O,{wallet:l,refreshing:d,checkingOut:h,retrying:_,requiredMicros:D,checkoutEnabled:!1,error:y,checkoutUrl:x,details:i,initialPackId:a,preserveMessage:c,onRefresh:()=>void A(),onRetry:e?()=>void j():void 0,onCheckout:e=>void M(e),onModelSelect:t})}var A=null;function j(){window.dispatchEvent(new CustomEvent(`keating:notorganic-prompt-changed`))}async function M(){try{let e=u();return e?e.getSession()!==null:d()?(await h(),!0):!1}catch{return!1}}async function N(e={}){return typeof window>`u`||!d()&&!(e.allowSignIn&&!e.packId)?!1:!e.force&&!e.packId&&await M()?!0:(A?.resolve(!1),new Promise(t=>{A={id:crypto.randomUUID(),packId:e.packId,allowSignIn:e.allowSignIn,resolve:t},j()}))}function P(e){if(!A)return;let t=A;A=null,t.resolve(e),j()}function F(e,t){return`${e.did??e.id} · ${`${g(m(t).availableMicros)} available`}`}function I({loading:e=!1,error:t,summary:n,connected:r=!1,pack:i,onConnect:o,onDismiss:s,onCheckout:u,creditContent:d}){let f=(0,T.useRef)(null),p=(0,T.useId)(),m=(0,T.useId)(),[h]=(0,T.useState)(()=>typeof document<`u`&&document.activeElement instanceof HTMLElement?document.activeElement:null);return(0,T.useEffect)(()=>{let e=f.current;return e?.showModal(),()=>{e?.close(),h?.isConnected&&h.focus()}},[h]),(0,E.jsxs)(`dialog`,{ref:f,"aria-labelledby":p,"aria-describedby":m,onCancel:e=>{e.preventDefault(),s()},onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),s())},className:l({width:`calc(100% - 2rem)`,maxWidth:`28rem`,maxHeight:`calc(100dvh - 2rem)`,margin:`auto`,padding:0,borderRadius:`0.5rem`,border:`1px solid var(--border)`,backgroundColor:`var(--background)`,color:`var(--foreground)`,boxShadow:`var(--shadow-xl)`,overflowY:`auto`,"&::backdrop":{backgroundColor:`color-mix(in srgb, var(--background) 70%, transparent)`,backdropFilter:`blur(4px)`}}),children:[(0,E.jsxs)(`header`,{className:l({display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`0.75rem`,padding:`1rem`,borderBottom:`1px solid var(--border)`}),children:[(0,E.jsxs)(`div`,{className:l({display:`flex`,alignItems:`center`,gap:`0.625rem`}),children:[(0,E.jsx)(w,{size:20,"aria-hidden":`true`,className:l({color:`var(--primary)`})}),(0,E.jsx)(`h2`,{id:p,className:l({fontSize:`1.125rem`,fontWeight:600}),children:i?`Add Keating credits`:`Use Keating’s model`})]}),(0,E.jsx)(`button`,{type:`button`,onClick:s,"aria-label":`Close account sign-in`,className:c(x({size:`md`,tone:`ghost`}),l({minWidth:`2.75rem`,minHeight:`2.75rem`})),children:(0,E.jsx)(b,{size:18,"aria-hidden":`true`})})]}),d?(0,E.jsx)(`div`,{id:m,className:l({padding:`0.75rem`}),children:d}):(0,E.jsxs)(`div`,{className:l({display:`flex`,flexDirection:`column`,gap:`1rem`,padding:`1.25rem`}),children:[(0,E.jsxs)(`div`,{className:l({display:`flex`,alignItems:`flex-start`,gap:`0.875rem`}),children:[(0,E.jsx)(a,{size:64,state:e?`connecting`:r?`settled`:`greeting`,label:``}),(0,E.jsx)(`p`,{id:m,className:l({fontSize:`0.9375rem`,lineHeight:1.6}),children:i?(0,E.jsxs)(E.Fragment,{children:[`Add `,(0,E.jsxs)(`strong`,{children:[`$`,i.priceUsd]}),` in Keating credits with your Not Organic account.`]}):(0,E.jsxs)(E.Fragment,{children:[`Sign up or sign in to use `,(0,E.jsx)(`strong`,{children:`Inkling Small`}),`, Keating’s default model. Your account is managed by Not Organic.`]})})]}),n&&(0,E.jsx)(`p`,{role:`status`,className:l({fontSize:`0.875rem`,overflowWrap:`anywhere`}),children:n}),t&&(0,E.jsx)(`p`,{role:`alert`,className:l({fontSize:`0.875rem`,color:`var(--destructive)`,overflowWrap:`anywhere`}),children:t}),(0,E.jsxs)(`div`,{className:l({display:`flex`,flexWrap:`wrap`,justifyContent:`flex-end`,gap:`0.75rem`}),children:[(0,E.jsx)(`button`,{type:`button`,onClick:s,className:l({minHeight:`2.75rem`,paddingInline:`1rem`,borderRadius:`0.375rem`,border:`1px solid var(--border)`,fontSize:`0.875rem`,cursor:`pointer`,_hover:{backgroundColor:`var(--secondary)`}}),children:`Not now`}),(0,E.jsx)(`button`,{type:`button`,autoFocus:!0,className:c(S(),l({minHeight:`2.75rem`,paddingInline:`1rem`})),onClick:o,disabled:e,children:e?`Connecting…`:r?i?`Refresh wallet`:`Continue`:`Sign up / Sign in`}),i&&u&&(0,E.jsx)(`button`,{type:`button`,className:c(S(),l({minHeight:`2.75rem`,paddingInline:`1rem`})),onClick:u,disabled:e,children:`Continue to checkout`})]})]})]})}function L(){let[e,t]=(0,T.useState)(A),[n,r]=(0,T.useState)(``),[a,s]=(0,T.useState)(!1),[c,l]=(0,T.useState)(``);if((0,T.useEffect)(()=>{let e=()=>{t(A),r(``),l(``),s(!1)};return window.addEventListener(`keating:notorganic-prompt-changed`,e),()=>window.removeEventListener(`keating:notorganic-prompt-changed`,e)},[]),!e)return null;let d=p(e.packId??`keating_pack_25`),f=async()=>{s(!0),l(``);try{let t=u();if(t&&!t.getSession()||!t&&e.allowSignIn){await i(window.location.pathname);return}if(t&&!e.packId){P(!0);return}let[n,a]=await Promise.all([h(),o()]);A?.id===e.id&&(r(F(n,a)),e.packId||P(!0))}catch(t){A?.id===e.id&&(r(``),l(t instanceof Error?t.message:`Sign-in could not open. Please try again.`))}finally{A?.id===e.id&&s(!1)}},m=!1;try{m=!!u()?.getSession()}catch{}return(0,E.jsx)(I,{pack:e.packId?d:void 0,connected:m,loading:a,summary:n,error:c,creditContent:m&&e.packId?(0,E.jsx)(k,{initialPackId:e.packId,preserveMessage:!1,onRetry:()=>P(!0)}):void 0,onConnect:()=>void f(),onDismiss:()=>P(!1)},e.id)}export{w as a,k as i,M as n,C as o,N as r,L as t};
|
|
1
|
+
import{s as e}from"./rolldown-runtime-BG2f4sTM.js";import{T as t}from"./syntax-highlighter-Buac5fmw.js";import{r as n}from"./public-client-CqivHtfG.js";import{$n as r,Gn as i,H as a,Jn as o,Kn as s,M as c,N as l,Qn as u,Yn as d,er as f,ir as p,nr as m,qn as h,tr as g,wt as _}from"./index-DCgpDQKf.js";import{t as v}from"./createLucideIcon-C_7xXnHN.js";import{t as y}from"./refresh-cw-BoSK2-Rv.js";import{t as b}from"./x-dksMGet2.js";import{m as x,u as S}from"./recipes-lg2hVa6Q.js";var C=v(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),w=v(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),T=e(t(),1),E=_();function D({refreshing:e=!1,ready:t=!1,balanceMicros:n}){let r=(0,T.useRef)(void 0),[i,a]=(0,T.useState)(0),[o,s]=(0,T.useState)(!1);(0,T.useEffect)(()=>{e||n===void 0||(t&&(r.current===void 0||n>r.current)&&(a(e=>e+1),s(!0)),r.current=n)},[t,e,n]);let c=e?`wallet-refresh`:t?`credits-ready`:`insufficient-funds`;return(0,E.jsx)(`span`,{className:`keating-credit-sprite`,"data-state":c,"data-animated":c!==`credits-ready`||o,"aria-hidden":`true`,onAnimationEnd:()=>s(!1),style:{backgroundImage:`url("/brand/keatingbot-${c}-${c===`insufficient-funds`?`v2`:`v1`}.png")`}},`${c}:${i}`)}function O({wallet:e,refreshing:t=!1,checkingOut:n=!1,retrying:i=!1,error:a,checkoutUrl:o,requiredMicros:s=1e5,checkoutEnabled:c=!1,details:l,initialPackId:u,preserveMessage:d=!0,onRefresh:p,onRetry:m,onCheckout:h,onModelSelect:_}){let[v,b]=(0,T.useState)(!!u),[x,S]=(0,T.useState)(u??`keating_pack_10`),w=(0,T.useId)(),O=(0,T.useId)(),k=f(e,s),A=r(e,c),j=A.find(e=>e.id===x)??A[0],M=e?.welcomeCredit,N=!!M?.granted&&M.remainingMicros>0,P=t||n||i;return(0,E.jsxs)(`section`,{className:`keating-credit-recovery`,"aria-labelledby":w,"aria-busy":P,children:[(0,E.jsx)(D,{refreshing:t,ready:k,balanceMicros:e?.availableMicros}),(0,E.jsxs)(`div`,{className:`keating-credit-recovery__body`,children:[(0,E.jsx)(`h3`,{id:w,children:k?N?`Your starter credit is ready`:`Ready to keep learning`:d?`Your message is safe`:`Your Keating credits`}),(0,E.jsx)(`p`,{children:k?`Your wallet has enough credit. You can retry your saved message.`:d?`Keating needs a little more credit to answer. You won’t need to type your message again.`:`Choose a one-time balance for Inkling Small, or check your current credits.`}),(0,E.jsxs)(`div`,{"aria-live":`polite`,role:`status`,children:[t?(0,E.jsx)(`p`,{children:`Checking your wallet…`}):e?(0,E.jsxs)(`div`,{className:`keating-credit-recovery__balance`,children:[(0,E.jsxs)(`p`,{children:[(0,E.jsx)(`strong`,{children:g(e.availableMicros)}),` available`]}),k&&(0,E.jsx)(`button`,{type:`button`,disabled:P,onClick:()=>b(e=>!e),"aria-expanded":v,children:`Top up`})]}):(0,E.jsx)(`p`,{className:`keating-credit-recovery__muted`,children:`Your balance hasn’t been verified yet.`}),N&&(0,E.jsxs)(`p`,{className:`keating-credit-recovery__muted`,children:[`Your account received `,g(M.amountMicros),` in one-time free starter credit.`]}),e?.blocked&&(0,E.jsx)(`p`,{children:`Your account needs attention before hosted responses can continue. Adding credits may not resolve an account restriction.`}),o&&!k&&!t&&(0,E.jsx)(`p`,{children:`Come back after checkout and refresh your balance. Payment is confirmed by your wallet, not this page.`})]}),a&&(0,E.jsx)(`p`,{className:`keating-credit-recovery__error`,role:`alert`,children:a}),(0,E.jsxs)(`div`,{className:`keating-credit-recovery__actions`,children:[k&&m?(0,E.jsx)(`button`,{type:`button`,"data-primary":`true`,disabled:P,onClick:m,children:i?`Resuming…`:d?`Retry response`:`Continue`}):(0,E.jsx)(`button`,{type:`button`,"data-primary":`true`,disabled:P,onClick:()=>b(e=>!e),"aria-expanded":v,children:`Add credits`}),(0,E.jsxs)(`button`,{type:`button`,disabled:P,onClick:p,children:[(0,E.jsx)(y,{size:14,"aria-hidden":`true`}),t?`Refreshing…`:`Refresh balance`]}),_&&(0,E.jsx)(`button`,{type:`button`,disabled:P,onClick:_,children:`Choose another model`})]}),v&&(0,E.jsxs)(`fieldset`,{disabled:P,children:[(0,E.jsx)(`legend`,{children:`One-time credit packs · USD`}),A.length?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`div`,{className:`keating-credit-recovery__packs`,children:A.map(e=>(0,E.jsxs)(`label`,{className:`keating-credit-recovery__pack`,children:[(0,E.jsx)(`input`,{type:`radio`,name:O,value:e.id,checked:j?.id===e.id,onChange:()=>S(e.id)}),`$`,e.priceUsd]},e.id))}),(0,E.jsx)(`p`,{className:`keating-credit-recovery__muted`,children:`The amount you choose becomes AI credit. No subscription.`}),(0,E.jsx)(`div`,{className:`keating-credit-recovery__actions`,children:(0,E.jsx)(`button`,{type:`button`,"data-primary":`true`,disabled:P||!j,onClick:()=>j&&h(j.id),children:n?`Preparing checkout…`:`Continue to checkout · $${j?.priceUsd}`})})]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`p`,{children:[`Credit purchases aren’t available right now.`,d?` Your saved message will stay here.`:``]}),(0,E.jsx)(`p`,{className:`keating-credit-recovery__muted`,children:`Refresh to check your balance and any starter credit, or use another model.`})]})]}),o&&(0,E.jsx)(`div`,{className:`keating-credit-recovery__actions`,children:(0,E.jsxs)(`a`,{className:`keating-credit-recovery__link`,href:o,target:`_blank`,rel:`noopener noreferrer`,children:[`Open secure checkout `,(0,E.jsx)(C,{size:14,"aria-hidden":`true`})]})}),l&&(0,E.jsxs)(`details`,{children:[(0,E.jsx)(`summary`,{children:`Technical details`}),(0,E.jsx)(`p`,{children:l})]})]})]})}function k({onRetry:e,onModelSelect:t,details:i,initialPackId:a,preserveMessage:c=!0}){let[l,u]=(0,T.useState)(),[d,p]=(0,T.useState)(!1),[h,g]=(0,T.useState)(!1),[_,v]=(0,T.useState)(!1),[y,b]=(0,T.useState)(),[x,S]=(0,T.useState)(),C=(0,T.useRef)(!0),w=(0,T.useRef)(!1),D=n();(0,T.useEffect)(()=>(C.current=!0,()=>{C.current=!1}),[]);let k=(0,T.useCallback)(async()=>{p(!0);try{let e=m(await o());return C.current&&(u(e),b(void 0)),e}catch{C.current&&(u(void 0),b(`We couldn’t verify your balance. Check your connection and refresh again.`));return}finally{C.current&&p(!1)}},[]),A=(0,T.useCallback)(async()=>{if(!w.current){w.current=!0;try{await k()}finally{w.current=!1}}},[k]);(0,T.useEffect)(()=>{A()},[A]),(0,T.useEffect)(()=>{if(!x)return;let e=()=>{document.visibilityState!==`hidden`&&A()};return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[x,A]);let j=async()=>{if(!(w.current||!e)){w.current=!0,v(!0);try{let t=await k();C.current&&f(t,D)&&await e()}finally{w.current=!1,C.current&&v(!1)}}},M=async e=>{if(!w.current){w.current=!0,g(!0),b(void 0);try{if(!r(await k(),!1).some(t=>t.id===e))throw Error(`Credit purchases aren’t available right now. Your message is still saved.`);let t=await s(e,`${window.location.protocol===`https:`?window.location.origin:`https://keating.help`}/pricing?checkout=returned`),n=new URL(t.url??t.checkout_url??``);if(n.protocol!==`https:`||n.username||n.password)throw Error(`Checkout could not be opened. Please try again.`);C.current&&(S(n.href),window.open(n.href,`_blank`,`noopener,noreferrer`))}catch(e){C.current&&b(e instanceof Error?e.message:`Checkout could not be opened. Your message is still saved.`)}finally{w.current=!1,C.current&&g(!1)}}};return(0,E.jsx)(O,{wallet:l,refreshing:d,checkingOut:h,retrying:_,requiredMicros:D,checkoutEnabled:!1,error:y,checkoutUrl:x,details:i,initialPackId:a,preserveMessage:c,onRefresh:()=>void A(),onRetry:e?()=>void j():void 0,onCheckout:e=>void M(e),onModelSelect:t})}var A=null;function j(){window.dispatchEvent(new CustomEvent(`keating:notorganic-prompt-changed`))}async function M(){try{let e=u();return e?e.getSession()!==null:d()?(await h(),!0):!1}catch{return!1}}async function N(e={}){return typeof window>`u`||!d()&&!(e.allowSignIn&&!e.packId)?!1:!e.force&&!e.packId&&await M()?!0:(A?.resolve(!1),new Promise(t=>{A={id:crypto.randomUUID(),packId:e.packId,allowSignIn:e.allowSignIn,resolve:t},j()}))}function P(e){if(!A)return;let t=A;A=null,t.resolve(e),j()}function F(e,t){return`${e.did??e.id} · ${`${g(m(t).availableMicros)} available`}`}function I({loading:e=!1,error:t,summary:n,connected:r=!1,pack:i,onConnect:o,onDismiss:s,onCheckout:u,creditContent:d}){let f=(0,T.useRef)(null),p=(0,T.useId)(),m=(0,T.useId)(),[h]=(0,T.useState)(()=>typeof document<`u`&&document.activeElement instanceof HTMLElement?document.activeElement:null);return(0,T.useEffect)(()=>{let e=f.current;return e?.showModal(),()=>{e?.close(),h?.isConnected&&h.focus()}},[h]),(0,E.jsxs)(`dialog`,{ref:f,"aria-labelledby":p,"aria-describedby":m,onCancel:e=>{e.preventDefault(),s()},onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),s())},className:l({width:`calc(100% - 2rem)`,maxWidth:`28rem`,maxHeight:`calc(100dvh - 2rem)`,margin:`auto`,padding:0,borderRadius:`0.5rem`,border:`1px solid var(--border)`,backgroundColor:`var(--background)`,color:`var(--foreground)`,boxShadow:`var(--shadow-xl)`,overflowY:`auto`,"&::backdrop":{backgroundColor:`color-mix(in srgb, var(--background) 70%, transparent)`,backdropFilter:`blur(4px)`}}),children:[(0,E.jsxs)(`header`,{className:l({display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`0.75rem`,padding:`1rem`,borderBottom:`1px solid var(--border)`}),children:[(0,E.jsxs)(`div`,{className:l({display:`flex`,alignItems:`center`,gap:`0.625rem`}),children:[(0,E.jsx)(w,{size:20,"aria-hidden":`true`,className:l({color:`var(--primary)`})}),(0,E.jsx)(`h2`,{id:p,className:l({fontSize:`1.125rem`,fontWeight:600}),children:i?`Add Keating credits`:`Use Keating’s model`})]}),(0,E.jsx)(`button`,{type:`button`,onClick:s,"aria-label":`Close account sign-in`,className:c(x({size:`md`,tone:`ghost`}),l({minWidth:`2.75rem`,minHeight:`2.75rem`})),children:(0,E.jsx)(b,{size:18,"aria-hidden":`true`})})]}),d?(0,E.jsx)(`div`,{id:m,className:l({padding:`0.75rem`}),children:d}):(0,E.jsxs)(`div`,{className:l({display:`flex`,flexDirection:`column`,gap:`1rem`,padding:`1.25rem`}),children:[(0,E.jsxs)(`div`,{className:l({display:`flex`,alignItems:`flex-start`,gap:`0.875rem`}),children:[(0,E.jsx)(a,{size:64,state:e?`connecting`:r?`settled`:`greeting`,label:``}),(0,E.jsx)(`p`,{id:m,className:l({fontSize:`0.9375rem`,lineHeight:1.6}),children:i?(0,E.jsxs)(E.Fragment,{children:[`Add `,(0,E.jsxs)(`strong`,{children:[`$`,i.priceUsd]}),` in Keating credits with your Not Organic account.`]}):(0,E.jsxs)(E.Fragment,{children:[`Sign up or sign in to use `,(0,E.jsx)(`strong`,{children:`Inkling Small`}),`, Keating’s default model. Your account is managed by Not Organic.`]})})]}),n&&(0,E.jsx)(`p`,{role:`status`,className:l({fontSize:`0.875rem`,overflowWrap:`anywhere`}),children:n}),t&&(0,E.jsx)(`p`,{role:`alert`,className:l({fontSize:`0.875rem`,color:`var(--destructive)`,overflowWrap:`anywhere`}),children:t}),(0,E.jsxs)(`div`,{className:l({display:`flex`,flexWrap:`wrap`,justifyContent:`flex-end`,gap:`0.75rem`}),children:[(0,E.jsx)(`button`,{type:`button`,onClick:s,className:l({minHeight:`2.75rem`,paddingInline:`1rem`,borderRadius:`0.375rem`,border:`1px solid var(--border)`,fontSize:`0.875rem`,cursor:`pointer`,_hover:{backgroundColor:`var(--secondary)`}}),children:`Not now`}),(0,E.jsx)(`button`,{type:`button`,autoFocus:!0,className:c(S(),l({minHeight:`2.75rem`,paddingInline:`1rem`})),onClick:o,disabled:e,children:e?`Connecting…`:r?i?`Refresh wallet`:`Continue`:`Sign up / Sign in`}),i&&u&&(0,E.jsx)(`button`,{type:`button`,className:c(S(),l({minHeight:`2.75rem`,paddingInline:`1rem`})),onClick:u,disabled:e,children:`Continue to checkout`})]})]})]})}function L(){let[e,t]=(0,T.useState)(A),[n,r]=(0,T.useState)(``),[a,s]=(0,T.useState)(!1),[c,l]=(0,T.useState)(``);if((0,T.useEffect)(()=>{let e=()=>{t(A),r(``),l(``),s(!1)};return window.addEventListener(`keating:notorganic-prompt-changed`,e),()=>window.removeEventListener(`keating:notorganic-prompt-changed`,e)},[]),!e)return null;let d=p(e.packId??`keating_pack_25`),f=async()=>{s(!0),l(``);try{let t=u();if(t&&!t.getSession()||!t&&e.allowSignIn){await i(window.location.pathname);return}if(t&&!e.packId){P(!0);return}let[n,a]=await Promise.all([h(),o()]);A?.id===e.id&&(r(F(n,a)),e.packId||P(!0))}catch(t){A?.id===e.id&&(r(``),l(t instanceof Error?t.message:`Sign-in could not open. Please try again.`))}finally{A?.id===e.id&&s(!1)}},m=!1;try{m=!!u()?.getSession()}catch{}return(0,E.jsx)(I,{pack:e.packId?d:void 0,connected:m,loading:a,summary:n,error:c,creditContent:m&&e.packId?(0,E.jsx)(k,{initialPackId:e.packId,preserveMessage:!1,onRetry:()=>P(!0)}):void 0,onConnect:()=>void f(),onDismiss:()=>P(!1)},e.id)}export{w as a,k as i,M as n,C as o,N as r,L as t};
|
package/web/.output/public/assets/{NotOrganicCallback-DWbhlP2j.js → NotOrganicCallback-BxKOsisT.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./rolldown-runtime-BG2f4sTM.js";import{T as t}from"./syntax-highlighter-Buac5fmw.js";import{i as n,n as r,t as i}from"./public-client-
|
|
1
|
+
import{s as e}from"./rolldown-runtime-BG2f4sTM.js";import{T as t}from"./syntax-highlighter-Buac5fmw.js";import{i as n,n as r,t as i}from"./public-client-CqivHtfG.js";import{n as a,r as o,t as s}from"./Nav-DQ-5KEsA.js";import{G as c,Gn as l,K as u,Tt as d,wt as f}from"./index-DCgpDQKf.js";import{t as p}from"./circle-alert-D3ZnhkzN.js";import{t as m}from"./loader-circle-NSGC9iIj.js";import{i as h,t as g}from"./pending-chat-turn-DtnQB0Sy.js";var _=e(t(),1),v=f();function y(){return(0,v.jsx)(`footer`,{className:`foot`,children:(0,v.jsxs)(`div`,{className:`wrap`,children:[(0,v.jsxs)(`div`,{className:`foot-grid`,children:[(0,v.jsxs)(`div`,{className:`foot-brand`,children:[(0,v.jsx)(`img`,{src:`/brand/logo-lockup-compact.avif`,alt:`Keating`}),(0,v.jsx)(`p`,{children:(0,v.jsx)(o,{children:`An AI tutor for explanations, practice, and review.`})})]}),(0,v.jsxs)(`div`,{className:`foot-col`,children:[(0,v.jsx)(`h5`,{children:(0,v.jsx)(o,{children:`Product`})}),(0,v.jsxs)(`ul`,{children:[(0,v.jsx)(`li`,{children:(0,v.jsx)(a,{to:`/download`,children:(0,v.jsx)(o,{children:`Download`})})}),(0,v.jsx)(`li`,{children:(0,v.jsx)(a,{to:`/chat`,children:(0,v.jsx)(o,{children:`Open Keating`})})}),(0,v.jsx)(`li`,{children:(0,v.jsx)(a,{to:`/live`,children:(0,v.jsx)(o,{children:`Live sessions`})})}),(0,v.jsx)(`li`,{children:(0,v.jsx)(a,{to:`/bench`,children:(0,v.jsx)(o,{children:`Bench`})})})]})]}),(0,v.jsxs)(`div`,{className:`foot-col`,children:[(0,v.jsx)(`h5`,{children:(0,v.jsx)(o,{children:`Resources`})}),(0,v.jsxs)(`ul`,{children:[(0,v.jsx)(`li`,{children:(0,v.jsx)(a,{to:u,children:(0,v.jsx)(o,{children:`Documentation`})})}),(0,v.jsx)(`li`,{children:(0,v.jsx)(a,{to:`/paper`,children:(0,v.jsx)(o,{children:`Paper`})})}),(0,v.jsx)(`li`,{children:(0,v.jsx)(a,{to:c,children:(0,v.jsx)(o,{children:`Blog`})})}),(0,v.jsx)(`li`,{children:(0,v.jsx)(a,{to:`/usage`,children:(0,v.jsx)(o,{children:`Usage`})})}),(0,v.jsx)(`li`,{children:(0,v.jsx)(`a`,{href:`https://github.com/Diogenesoftoronto/keating/blob/main/CHANGELOG.md`,target:`_blank`,rel:`noreferrer`,children:`Changelog`})})]})]}),(0,v.jsxs)(`div`,{className:`foot-col`,children:[(0,v.jsx)(`h5`,{children:(0,v.jsx)(o,{children:`Source`})}),(0,v.jsxs)(`ul`,{children:[(0,v.jsx)(`li`,{children:(0,v.jsx)(`a`,{href:`https://github.com/Diogenesoftoronto/keating`,target:`_blank`,rel:`noreferrer`,children:`GitHub`})}),(0,v.jsx)(`li`,{children:(0,v.jsx)(`a`,{href:`https://github.com/Diogenesoftoronto/keating/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:`License`})}),(0,v.jsx)(`li`,{children:(0,v.jsx)(`a`,{href:`https://keating.help`,children:`keating.help`})})]})]})]}),(0,v.jsxs)(`div`,{className:`foot-base`,children:[(0,v.jsxs)(`span`,{children:[`© 2026 Keating · v`,`4.0.3`,` ·`,` `,(0,v.jsx)(`a`,{href:`https://www.mozilla.org/en-US/MPL/2.0/`,target:`_blank`,rel:`noreferrer`,children:`MPL 2.0`})]}),(0,v.jsxs)(`span`,{className:`foot-legal-links`,"aria-label":`Legal links`,children:[(0,v.jsx)(a,{to:`/terms`,children:(0,v.jsx)(o,{children:`Terms of Service`})}),(0,v.jsx)(`span`,{"aria-hidden":`true`,children:`//`}),(0,v.jsx)(a,{to:`/privacy`,children:(0,v.jsx)(o,{children:`Privacy Policy`})})]})]})]})})}function b(){let e=d(),[t,a]=(0,_.useState)(null),[o,c]=(0,_.useState)(!1),u=(0,_.useRef)(!1);(0,_.useEffect)(()=>{if(u.current)return;u.current=!0;let e=r();if(!e){a(`This Keating deployment has not enabled Not Organic sign-in.`);return}new i(e).completeAuthorization(new URLSearchParams(window.location.search)).then(e=>{g();let t=h();window.location.replace(t?`/chat?session=${encodeURIComponent(t.sessionId)}`:n(e.returnTo))}).catch(e=>a(e instanceof Error?e.message:`Not Organic sign-in could not be completed.`))},[e]);let f=async()=>{c(!0);try{await l(`/chat`)}catch(e){a(e instanceof Error?e.message:`Sign-in could not open. Please try again.`),c(!1)}};return(0,v.jsxs)(`div`,{className:`retro-layout retro-page`,children:[(0,v.jsx)(s,{}),(0,v.jsx)(`main`,{className:`notorganic-callback`,children:(0,v.jsxs)(`section`,{"aria-labelledby":`connection-title`,"aria-busy":!t||o,children:[t?(0,v.jsx)(p,{size:28,"aria-hidden":`true`,className:`connection-icon`}):(0,v.jsx)(m,{size:28,"aria-hidden":`true`,className:`connection-icon connection-spinner`}),(0,v.jsx)(`h1`,{id:`connection-title`,className:`notorganic-callback-title`,children:t?`Let’s reconnect`:`Connecting your account`}),(0,v.jsx)(`p`,{className:`connection-message`,role:t?`alert`:`status`,children:t??`Confirming your Not Organic sign-in. You’ll return to Keating in a moment.`}),t&&(0,v.jsxs)(`div`,{className:`connection-actions`,children:[(0,v.jsx)(`button`,{type:`button`,className:`connection-primary`,disabled:o,onClick:()=>void f(),children:o?`Opening sign-in…`:`Try sign-in again`}),(0,v.jsx)(`button`,{type:`button`,onClick:()=>e({to:`/chat`}),children:`Back to chat`})]})]})}),(0,v.jsx)(y,{})]})}export{b as NotOrganicCallback};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as e}from"./rolldown-runtime-BG2f4sTM.js";import{T as t}from"./syntax-highlighter-Buac5fmw.js";import{H as n,Ln as r,M as i,N as a,Pn as o,ni as s,wt as c}from"./index-
|
|
1
|
+
import{s as e}from"./rolldown-runtime-BG2f4sTM.js";import{T as t}from"./syntax-highlighter-Buac5fmw.js";import{H as n,Ln as r,M as i,N as a,Pn as o,ni as s,wt as c}from"./index-DCgpDQKf.js";var l=e(t(),1),u=c();function d(e){let t=e.toLowerCase();return t.includes(`denied`)||t.includes(`cancel`)?`access_denied`:t.includes(`state`)?`state_mismatch`:t.includes(`code`)?`missing_or_invalid_code`:t.includes(`exchange`)||t.includes(`token`)?`token_exchange`:t.includes(`timeout`)||t.includes(`network`)?`network`:`unknown`}var f={page:a({display:`flex`,minH:`100vh`,alignItems:`center`,justifyContent:`center`,bg:`var(--background)`}),card:a({maxW:`28rem`,borderRadius:`0.5rem`,border:`1px solid var(--border)`,bg:`var(--card)`,p:`2rem`,textAlign:`center`,boxShadow:`0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)`}),scene:a({display:`flex`,justifyContent:`center`,mb:`0.75rem`}),spinner:a({mx:`auto`,mb:`1rem`,h:`2rem`,w:`2rem`,animation:`spin 1s linear infinite`,borderRadius:`9999px`,border:`2px solid var(--primary)`,borderTopColor:`transparent`}),icon:a({mx:`auto`,mb:`1rem`,display:`flex`,h:`2.5rem`,w:`2.5rem`,alignItems:`center`,justifyContent:`center`,borderRadius:`9999px`}),successIcon:a({bg:`color-mix(in srgb, var(--primary) 10%, transparent)`,color:`var(--primary)`}),errorIcon:a({bg:`color-mix(in srgb, var(--destructive) 10%, transparent)`,color:`var(--destructive)`}),svg:a({h:`1.5rem`,w:`1.5rem`}),title:a({fontSize:`1.125rem`,fontWeight:`600`,color:`var(--foreground)`}),copy:a({mt:`0.5rem`,fontSize:`0.875rem`,color:`var(--muted-foreground)`}),error:a({mt:`0.5rem`,fontSize:`0.875rem`,color:`var(--destructive)`}),copySpaced:a({mt:`0.75rem`,fontSize:`0.875rem`,color:`var(--muted-foreground)`})};function p(){let e=s(),[t,a]=(0,l.useState)(null);return(0,l.useEffect)(()=>{r(window.location.href).then(t=>{a(t),e.capture(`oauth_login_completed`,{success:t.success,error_type:t.success?void 0:d(t.error??``)}),m(t)})},[e]),(0,u.jsx)(`div`,{className:f.page,children:(0,u.jsx)(`div`,{className:f.card,children:t===null?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:f.scene,children:(0,u.jsx)(n,{size:96,state:`connecting`,label:``})}),(0,u.jsx)(`h2`,{className:f.title,children:`Signing you in…`}),(0,u.jsx)(`p`,{className:f.copy,children:`Finishing up with your provider. This usually takes a moment.`})]}):t.success?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:i(f.icon,f.successIcon),children:(0,u.jsx)(`svg`,{className:f.svg,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,u.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M5 13l4 4L19 7`})})}),(0,u.jsx)(`h2`,{className:f.title,children:`Signed in successfully`}),(0,u.jsx)(`p`,{className:f.copy,children:`You can close this window and return to Keating.`})]}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:i(f.icon,f.errorIcon),children:(0,u.jsx)(`svg`,{className:f.svg,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2,children:(0,u.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M6 18L18 6M6 6l12 12`})})}),(0,u.jsx)(`h2`,{className:f.title,children:`Sign-in failed`}),(0,u.jsx)(`p`,{className:f.error,children:t.error}),(0,u.jsx)(`p`,{className:f.copySpaced,children:`You can close this window and try again.`})]})})})}function m(e){let t={type:o,...e};try{let e=new BroadcastChannel(o);e.postMessage(t),e.close()}catch{}try{window.opener&&!window.opener.closed&&window.opener.postMessage(t,window.location.origin)}catch{}}export{p as OAuthCallback};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Q as e}from"./operation-kDIu8RLw.js";import{N as t,wt as n}from"./index-DCgpDQKf.js";import{t as r}from"./createLucideIcon-C_7xXnHN.js";import{t as i}from"./circle-question-mark-CK-DUGIA.js";import{n as a,r as o,t as s}from"./sliders-horizontal-CkwSTvEI.js";import{t as c}from"./layers-CAYsIN-0.js";import{m as l,p as u,t as d}from"./MarkdownBlock-C89ecD-M.js";import{t as f}from"./clipboard-list-CRJvmiKL.js";import{n as p,t as m}from"./notebook-pen-B5BMXnIB.js";import{c as h}from"./Select-BYfJxqbI.js";import{t as g}from"./segments-BuQ4O8Bd.js";var _=r(`book-marked`,[[`path`,{d:`M10 2v8l3-3 3 3V2`,key:`sqw3rj`}],[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),v=r(`git-fork`,[[`circle`,{cx:`12`,cy:`18`,r:`3`,key:`1mpf1b`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`path`,{d:`M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9`,key:`1uq4wg`}],[`path`,{d:`M12 12v3`,key:`158kv8`}]]),y=r(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]);function b(e){return e?e.reduce((e,t)=>e+1+b(t.children),0):0}function x(e,t){return`${e} ${t}${e===1?``:`s`}`}function S(e,t=80){let n=e.replace(/\s+/g,` `).trim();return n.length<=t?n:`${n.slice(0,t-1).trimEnd()}…`}function C(e,t){let n=`${t}:${e.id}`;switch(e.type){case`markdown`:return e.markdown.trim()?{type:`prose`,id:n,markdown:e.markdown.trim()}:null;case`callout`:return{type:`prose`,id:n,markdown:e.title?`**${e.title}** — ${e.markdown}`:e.markdown};case`study-plan`:{let t=b(e.items);return{type:`artifact`,id:n,kind:`study-plan`,label:e.title??`Study plan`,...t?{detail:x(t,`item`)}:{}}}case`concept-map`:return{type:`artifact`,id:n,kind:`concept-map`,label:e.title??`Concept map`};case`question`:return{type:`artifact`,id:n,kind:`question`,label:`Question`,detail:S(e.prompt)};case`question-group`:return{type:`artifact`,id:n,kind:`question`,label:e.title??`Questions`,detail:x(e.questions.length,`question`)};case`quiz`:return{type:`artifact`,id:n,kind:`quiz`,label:e.title,detail:x(e.questions.length,`question`)};case`deck`:return{type:`artifact`,id:n,kind:`deck`,label:e.title,detail:x(e.cards.length,`card`)};case`goal`:return{type:`artifact`,id:n,kind:`goal`,label:e.title,detail:x(e.steps.length,`step`)};case`notes`:return{type:`artifact`,id:n,kind:`notes`,label:e.title,detail:`shared notes`};case`image`:return{type:`artifact`,id:n,kind:`image`,label:`Image`,detail:S(e.alt)};case`media`:return{type:`artifact`,id:n,kind:`media`,label:e.kind===`animation`?`Animation`:e.kind===`audio`?`Audio`:`Video`};case`artifact`:return{type:`artifact`,id:n,kind:`artifact`,label:`Attached artifact`};case`handoff`:return{type:`artifact`,id:n,kind:`handoff`,label:`Handoff`,detail:e.target};case`simulation`:return{type:`artifact`,id:n,kind:`simulation`,label:e.title,detail:`${x(e.parameters.length,`parameter`)} · ${x(e.readouts.length,`readout`)}`};case`task`:{let t=[e.kind===`practice`?`Practice`:e.kind===`draft`?`Draft`:e.kind===`fieldwork`?`Fieldwork`:`Assignment`,...e.items?.length?[x(e.items.length,e.kind===`practice`?`exercise`:(e.kind,`step`))]:[],...e.estimatedMinutes===void 0?[]:[`~${e.estimatedMinutes} min`]];return{type:`artifact`,id:n,kind:`task`,label:e.title,detail:t.join(` · `)}}default:return null}}function w(t){if(t.format===`document`)return t.document;let n=t.program||t.rawProgram;if(!t.complete||!n.trim())return;let r=e(n,{documentId:t.metadata.id,revision:t.metadata.revision});return r.ok?r.document:void 0}function T(e,t=``){let n=[],r=0;return g(e,t).forEach((t,i)=>{if(t.type===`text`){let a=e.indexOf(t.content,r),o=a<0?r:a;r=o+t.content.length;let s=t.content.length-t.content.trimStart().length,c=t.content.trim();c&&n.push({type:`prose`,id:`text:${i}`,markdown:c,sourceStart:o+s});return}let a=e.indexOf(t.rawProgram,r);r=a<0?r:a+t.rawProgram.length;let o=w(t);if(!o){n.push({type:`artifact`,id:`openui:${i}`,kind:`unavailable`,label:`Interactive artifact`,detail:`preview unavailable`});return}for(let e of o.nodes){let t=C(e,`openui:${i}`);t&&n.push(t)}}),n}var E=n(),D={"study-plan":y,"concept-map":p,question:i,quiz:o,deck:c,goal:l,notes:m,image:a,media:h,artifact:u,handoff:v,task:f,simulation:s,unavailable:_},O=t({display:`inline-flex`,maxWidth:`100%`,alignItems:`center`,gap:`0.5rem`,borderRadius:`0.5rem`,border:`1px solid var(--border)`,backgroundColor:`color-mix(in srgb, var(--muted) 30%, transparent)`,padding:`0.4375rem 0.625rem`,fontSize:`0.8125rem`,color:`var(--foreground)`});function k({blocks:e,sourceMapped:n=!1,highlights:r,onHighlightReveal:i,onHighlightConceal:a,onHighlightOpen:o}){return(0,E.jsx)(`div`,{className:t({display:`flex`,flexDirection:`column`,gap:`0.75rem`}),children:e.map(e=>{if(e.type===`prose`)return(0,E.jsx)(d,{content:e.markdown,sourceMapped:n,highlights:A(r,e.sourceStart,e.markdown.length),onHighlightReveal:i,onHighlightConceal:a,onHighlightOpen:o},e.id);let s=D[e.kind];return(0,E.jsxs)(`div`,{className:O,"data-openui-preview":e.kind,children:[(0,E.jsx)(s,{"aria-hidden":`true`,size:14,className:t({flexShrink:0,color:`var(--muted-foreground)`})}),(0,E.jsx)(`span`,{className:t({fontWeight:650,overflowWrap:`anywhere`}),children:e.label}),e.detail?(0,E.jsxs)(`span`,{className:t({color:`var(--muted-foreground)`,overflowWrap:`anywhere`}),children:[`· `,e.detail]}):null]},e.id)})})}function A(e,t,n){if(!e?.length||t===void 0)return;let r=t+n;return e.flatMap(e=>{let n=Math.max(e.start,t),i=Math.min(e.end,r);return i<=n?[]:[{...e,start:n-t,end:i-t}]})}export{T as n,v as r,k as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ct as e,M as t,N as n,wt as r}from"./index-DCgpDQKf.js";import{i,o as a,r as o}from"./recipes-lg2hVa6Q.js";import{r as s}from"./Plus-RIb_ldNd.js";import{l as c,m as l,n as u,o as d,x as f}from"./use-review-passes-DmWsvYdF.js";var p=r();function m({sessions:r,pools:m,titleForSession:h,className:g}){let _=u(`keating:pattern-digest`,[],[]),v=m[0],y=r.length>=2&&!!v,b=_.running===`pattern-digest`;return(0,p.jsxs)(`section`,{"aria-labelledby":`pattern-digest-heading`,className:t(n({border:`1.5px solid var(--ink)`,borderRadius:`{radii.keating}`,background:`var(--card)`,boxShadow:`3px 3px 0 var(--ink)`,padding:`1rem`}),g),children:[(0,p.jsxs)(`div`,{className:n({display:`flex`,flexWrap:`wrap`,alignItems:`flex-start`,justifyContent:`space-between`,gap:`0.75rem`}),children:[(0,p.jsxs)(`div`,{className:n({display:`flex`,alignItems:`flex-start`,gap:`0.6rem`,minWidth:0}),children:[(0,p.jsx)(s,{icon:f.digest,size:20,className:n({marginTop:`0.1rem`,color:`var(--accent-dim)`})}),(0,p.jsxs)(`div`,{className:n({minWidth:0}),children:[(0,p.jsx)(`h2`,{id:`pattern-digest-heading`,className:n({fontFamily:`var(--mono-display)`,fontSize:`0.95rem`,fontWeight:700,color:`var(--ink)`}),children:`Across your reviews`}),(0,p.jsx)(`p`,{className:t(c,n({marginTop:`0.2rem`,maxWidth:`44rem`})),children:r.length<2?`Finish two reviews and Keating can start naming the habits that recur across them.`:`Reads all ${r.length} finished reviews and names the teaching habits that keep coming back.`})]})]}),(0,p.jsxs)(`button`,{type:`button`,className:d,disabled:!y||b,title:v?r.length<2?`Two finished reviews are needed.`:void 0:`Configure a model pool first.`,onClick:()=>b?_.cancel():v&&void _.runPatternDigest(v,r),children:[(0,p.jsx)(s,{icon:b?f.retry:f.digest,size:13,active:b}),b?`Reading…`:_.digest?`Read again`:`Find patterns`]})]}),_.error?(0,p.jsx)(`p`,{role:`alert`,className:n({marginTop:`0.75rem`,fontSize:`0.75rem`,color:`var(--destructive)`}),children:_.error}):null,_.digest&&_.digest.entries.length>0?(0,p.jsxs)(`div`,{className:n({marginTop:`0.9rem`}),children:[(0,p.jsx)(`ul`,{className:n({display:`grid`,gap:`0.5rem`}),children:_.digest.entries.map(r=>(0,p.jsxs)(`li`,{className:o({state:`proposed`}),children:[(0,p.jsxs)(`div`,{className:n({display:`flex`,flexWrap:`wrap`,alignItems:`baseline`,justifyContent:`space-between`,gap:`0.5rem`}),children:[(0,p.jsx)(`strong`,{className:n({fontSize:`0.82rem`,fontWeight:700,color:`var(--ink)`}),children:r.pattern}),(0,p.jsxs)(`span`,{className:t(a(),n({fontSize:`10px`})),children:[r.rubricKey?`${l[r.rubricKey]} · `:``,r.occurrences,` session`,r.occurrences===1?``:`s`]})]}),(0,p.jsx)(`p`,{className:n({marginTop:`0.25rem`,fontSize:`0.75rem`,lineHeight:1.5,color:`var(--ink-soft)`}),children:r.detail}),r.sessionIds.length>0?(0,p.jsx)(`div`,{className:n({display:`flex`,flexWrap:`wrap`,gap:`0.3rem`,marginTop:`0.4rem`}),children:r.sessionIds.map(t=>(0,p.jsxs)(e,{to:`/review/sessions/$sessionId`,params:{sessionId:t},className:n({display:`inline-flex`,alignItems:`center`,gap:`0.25rem`,borderRadius:`9999px`,border:`1px solid var(--line)`,paddingInline:`0.45rem`,paddingBlock:`0.1rem`,fontSize:`0.65rem`,color:`var(--ink-soft)`,maxWidth:`16rem`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,transitionProperty:`background-color, color, border-color`,transitionDuration:`{durations.base}`,_hover:{background:`var(--accent)`,color:`var(--accent-foreground)`,borderColor:`var(--accent-dim)`},_focusVisible:{outline:`3px solid var(--accent)`,outlineOffset:`2px`}}),children:[(0,p.jsx)(s,{icon:f.page,size:10}),h?.(t)??t]},t))}):null]},r.id))}),_.digest.throughLine?(0,p.jsxs)(`p`,{className:t(i({flat:!0}),n({marginTop:`0.6rem`,fontSize:`0.8rem`,lineHeight:1.55,color:`var(--ink)`})),children:[(0,p.jsx)(`span`,{className:t(a(),n({display:`block`,fontSize:`10px`,marginBottom:`0.2rem`})),children:`Work on this next`}),_.digest.throughLine]}):null]}):null]})}export{m as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e}from"./rolldown-runtime-BG2f4sTM.js";import{T as t}from"./syntax-highlighter-Buac5fmw.js";import{M as n,wt as r}from"./index-DCgpDQKf.js";import{n as i}from"./Check-C4euVM-9.js";import{n as a}from"./recipes-lg2hVa6Q.js";var o=i(`Magnifier`,{F:`<path fill-rule="evenodd" clip-rule="evenodd" d="M 14.811 14.811 C 15.2016 14.4205 15.8346 14.4205 16.2252 14.811 L 21.707 20.2929 C 22.0975 20.6834 22.0975 21.3165 21.707 21.707 C 21.3165 22.0975 20.6834 22.0975 20.2929 21.707 L 14.811 16.2252 C 14.4205 15.8346 14.4205 15.2016 14.811 14.811 Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M 2 10.3333 C 2 5.731 5.731 2 10.3333 2 C 14.9356 2 18.6666 5.731 18.6666 10.3333 C 18.6666 14.9356 14.9356 18.6666 10.3333 18.6666 C 5.731 18.6666 2 14.9356 2 10.3333 Z M 10.3333 4 C 6.8356 4 4 6.8356 4 10.3333 C 4 13.831 6.8356 16.6666 10.3333 16.6666 C 13.831 16.6666 16.6666 13.831 16.6666 10.3333 C 16.6666 6.8356 13.831 4 10.3333 4 Z" fill="currentColor"></path>`,O:`<path d="M 20.9999 20.9999 L 15.5181 15.5181" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path> <path d="M 10.3333 17.6666 C 14.3833 17.6666 17.6666 14.3833 17.6666 10.3333 C 17.6666 6.2833 14.3833 3 10.3333 3 C 6.2833 3 3 6.2833 3 10.3333 C 3 14.3833 6.2833 17.6666 10.3333 17.6666 Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path>`}),s=i(`Xmark`,{F:`<path d="M 5.3333 19.6666 c -0.256 0 -0.512 -0.0973 -0.7067 -0.2933 -0.3907 -0.3907 -0.3907 -1.024 0 -1.4147 L 17.96 4.6267 c 0.3907 -0.3907 1.024 -0.3907 1.4147 0 s 0.3907 1.024 0 1.4147 L 6.04 19.3733 c -0.1947 0.1947 -0.4507 0.2933 -0.7067 0.2933 Z" fill="currentColor"></path><path d="M 18.6666 19.6666 c -0.256 0 -0.512 -0.0973 -0.7067 -0.2933 L 4.6267 6.04 c -0.3907 -0.3907 -0.3907 -1.024 0 -1.4147 s 1.024 -0.3907 1.4147 0 L 19.3733 17.96 c 0.3907 0.3907 0.3907 1.024 0 1.4147 -0.1947 0.1947 -0.4507 0.2933 -0.7067 0.2933 Z" fill="currentColor"></path>`,O:`<line x1="18.6666" y1="5.3333" x2="5.3333" y2="18.6666" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></line><line x1="5.3333" y1="5.3333" x2="18.6666" y2="18.6666" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></line>`}),c=e(t(),1),l=r(),u=(0,c.forwardRef)(function({icon:e,size:t=15,active:r,label:i,strokeWidth:o,className:s},c){let u=i?{role:`img`,"aria-label":i}:{"aria-hidden":!0};return(0,l.jsxs)(`span`,{ref:c,className:n(a({active:r}),s),...u,children:[(0,l.jsx)(e,{"data-weight":`Outline`,weight:`Outline`,size:t,strokeWidth:o,"aria-hidden":!0}),(0,l.jsx)(e,{"data-weight":`Filled`,weight:`Filled`,size:t,strokeWidth:o,"aria-hidden":!0})]})}),d=i(`Feather`,{F:`<path d="m 20.3333 3.6667 c -9.8509 0.862 -13.9577 7.8516 -15.6121 12.5013 0.5151 0.2719 0.8868 0.4401 0.8868 0.4401 1.08 0.4837 2.1493 0.6972 2.212 0.708 1.1387 0.208 2.1907 0.3119 3.156 0.3119 2.0093 0 3.64 -0.4505 4.8667 -1.3467 0.3857 -0.282 1.088 -0.8669 1.6004 -1.8185 -2.8519 -0.4287 -4.6723 -1.7128 -4.6723 -1.7128 0 0 4.3952 0.3324 5.7892 -0.7689 0.6416 -0.5068 1.1987 -1.3304 1.488 -2.4411 0.2109 -0.8099 0.304 -1.6055 0.4173 -2.3681 0.18 -1.2012 0.3493 -2.3347 0.7347 -3.0079 0.1064 -0.1852 0.1304 -0.3925 0.1089 -0.5976 -0.5857 0.058 -0.9757 0.1003 -0.9757 0.1003 Z" fill="currentColor"></path><path d="m 3.668 21.3333 c -0.0377 0 -0.0755 -0.002 -0.1145 -0.0065 -0.5481 -0.0625 -0.9427 -0.558 -0.8803 -1.1068 0.0183 -0.1615 2.0208 -16.1888 17.5729 -17.5494 0.5429 -0.0508 1.0352 0.3587 1.0833 0.9088 s -0.3593 1.0352 -0.9088 1.0833 C 6.4779 5.8828 4.6771 20.3007 4.6601 20.4466 c -0.0585 0.5104 -0.4909 0.8867 -0.9921 0.8867 Z" fill="currentColor" ></path>`,O:`<path d="m 17.2986 11.6413 c -0.6036 4.7 -4.5831 5.4245 -8.7144 4.7904" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="m 3.6667 20.3333 S 5.416 4.972 20.3333 3.6667 c -0.7467 1.3013 -0.764 3.4733 -1.2613 5.652 -0.6987 2.6813 -3.1133 3.0147 -6.072 3.0147" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>`}),f=i(`Plus`,{O:`<path d="M11.25 20C11.25 20.4142 11.5858 20.75 12 20.75C12.4142 20.75 12.75 20.4142 12.75 20V12.75H20C20.4142 12.75 20.75 12.4142 20.75 12C20.75 11.5858 20.4142 11.25 20 11.25H12.75V4C12.75 3.58579 12.4142 3.25 12 3.25C11.5858 3.25 11.25 3.58579 11.25 4V11.25H4C3.58579 11.25 3.25 11.5858 3.25 12C3.25 12.4142 3.58579 12.75 4 12.75H11.25V20Z" fill="currentColor"/>`,F:`<path d="M11 20C11 20.5523 11.4477 21 12 21C12.5523 21 13 20.5523 13 20V13H20C20.5523 13 21 12.5523 21 12C21 11.4477 20.5523 11 20 11H13V4C13 3.44771 12.5523 3 12 3C11.4477 3 11 3.44771 11 4V11H4C3.44771 11 3 11.4477 3 12C3 12.5523 3.44771 13 4 13H11V20Z" fill="currentColor"/>`});export{o as a,s as i,d as n,u as r,f as t};
|