PageSourceSearch

https://agentic.kikimora.io/assets/markdown-processing.D-HoomyH.js

js kikimora.io collected 2026-10-04 13:09:22 UTC 10,442 bytes, 1 lines download raw bytes

1import{az as e,aA as n,aB as t,aC as r,aD as o,aE as i,aF as s,aG as a,aH as l,aI as c,aJ as u,aK as f,aL as p,aM as d,aN as m,j as h,aO as g,aP as y,aQ as x,aR as w,aS as k}from"./vendor.DPP4yccj.js";import{k as b}from"./math-katex.BiqVCru-.js";const E={};function v(r){const o=r||E,i=this.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(e(o)),a.push(n()),l.push(t(o))}const N={};function j(e){const n=e||N,t=this.data(),s=t.micromarkExtensions||(t.micromarkExtensions=[]),a=t.fromMarkdownExtensions||(t.fromMarkdownExtensions=[]),l=t.toMarkdownExtensions||(t.toMarkdownExtensions=[]);s.push(r(n)),a.push(o()),l.push(i(n))}const O=function(e){return function(e){return function(e){return n;function n(n,...t){return Boolean(n&&"object"==typeof n&&"type"in n&&Boolean(e.call(this,n,...t)))}}(n);function n(n){return n&&n.type===e}}(e)};const A=!0,M=!1,P=function(e,n,t,r){const o=O(n);!function e(n,r,i){const s=n&&"object"==typeof n?n:{};if("string"==typeof s.type){const e="string"==typeof s.tagName?s.tagName:"string"==typeof s.name?s.name:void 0;Object.defineProperty(a,"name",{value:"node ("+n.type+(e?"<"+e+">":"")+")"})}return a;function a(){let s,a,l,c=[];if(o(n,r,i[i.length-1]||null)&&(c=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[A,e];return[e]}(t(n,i)),c[0]===M))return c;if(n.children&&"skip"!==c[0])for(a=0,l=i.concat(n);a>-1&&a<n.children.length;){if(s=e(n.children[a],a,l)(),s[0]===M)return s;a="number"==typeof s[1]?s[1]:a+1}return c}}(e,void 0,[])()};const S=Object.assign,T="rehype-katex";function B(e){const n=e||{},t=n.throwOnError||!1;return(e,r)=>{!function(e,n,t){P(e,n,function(e,n){const r=n[n.length-1];return t(e,r?r.children.indexOf(e):null,r)}
1)}(e,"element",e=>{const o=e.properties&&Array.isArray(e.properties.className)?e.properties.className:[],i=o.includes("math-inline"),l=o.includes("math-display");if(!i&&!l)return;const c=s(e,{whitespace:"pre"});let u;try{u=b.renderToString(c,S({},n,{displayMode:l,throwOnError:!0}))}catch(p){const o=p,i=t?"fail":"message",s=[T,o.name.toLowerCase()].join(":");if(r[i](o.message,e.position,s),"ParseError"!==o.name)return void(e.children=[{type:"element",tagName:"span",properties:{className:["katex-error"],title:String(o),style:"color:"+(n.errorColor||"#cc0000")},children:[{type:"text",value:c}]}]);u=b.renderToString(c,S({},n,{displayMode:l,throwOnError:!1,strict:"ignore"}))}const f=a(u);e.children=f.children})}}const H=function(e){if(null==e)return D;if("string"==typeof e)return function(e){return I(n);function n(n){return n&&n.type===e}}(e);if("object"==typeof e)return Array.isArray(e)?function(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=H(e[t]);return I(r);function r(...e){let t=-1;for(;++t<n.length;)if(n[t].call(this,...e))return!0;return!1}}(e):function(e){return I(n);function n(n){let t;for(t in e)if(n[t]!==e[t])return!1;return!0}}(e);if("function"==typeof e)return I(e);throw new Error("Expected function, string, or object as test")};function I(e){return function(n,...t){return Boolean(n&&"object"==typeof n&&"type"in n&&Boolean(e.call(this,n,...t)))}}function D(){return!0}const L=!0,U=!1,C=function(e,n,t,r){"function"==typeof n&&"function"!=typeof t&&(r=t,t=n,n=null);const o=H(n),i=r?-1:1;!function e(s,a,l){const c=s&&"object"==typeof s?s:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+s.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,f,p=[];if((!n||o(s,a,l[l.length-1]||null))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[L,e];return[e]}(t(s,l)),p[0]===U))return p;if(s.children&&"skip"!==p[0])for(u=(r?s.children.length:-1)+i,f=l.concat(s);u>-1&&u<s.children.length;){if(c=e(s.children[u],u,f)(),c[0]===U)return c;u="number"==typeof c[1]?c[1]:u+i}return p}}(e,void 0,[])()};const F=function(e,n,t,r){"function"==typeof n&&"function"!=typeof t&&(r=t,t=n,n=null),C(e,n,function(e,n){const r=n[n.length-1];return t(e,r?r.children.indexOf(e):null,r)},r)};function R(){return e=>{F(e,["text"],(e,n,t)=>{if("text"!==e.type)return;const{value:r}=e,o=r.split(/\^/);if(1===o.length||o.length%2==0)return;const i=o.map((e,n)=>n%2==0?{type:"text",value:e}:{type:"superscript",data:{hName:"sup"},children:[{type:"text",value:e}]});t.children.splice(n,1,...i)}),F(e,["text"],(e,n,t)=>{if("text"!==e.type)return;const{value:r}=e,o=r.split(/\~/);if(1===o.length||o.length%2==0)return;const i=o.map((e,n)=>n%2==0?{type:"text",value:e}:{type:"subscript",data:{hName:"sub"},children:[{type:"text",value:e}]});t.children.splice(n,1,...i)})}}function K(e){const n=this;n.parser=function(t){return l(t,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function z(e,n){return e&&"run"in e?async function(t,r){const o=c(t,{file:r,...n});await e.run(o,r)}:function(t,r){return c(t,{file:r,...e||n})}}const G="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",J=[],Q={allowDangerousHtml:!0},$=/^(https?|ircs?|mailto|xmpp)$/i,q=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function V(e){const n=function(e){const n=e.rehypePlugins||J,t=e.remarkPlugins||J,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Q}:Q,o=u().use(K).use(t).use(z,r).use(n);return o}(e),t=function(e){const n=e.children||"",t=new f;"string"==typeof n&&(t.value=n);return t}(e);return function(e,n){const t=n.allowedElements,r=n.allowElement,o=n.components,i=n.disallowedElements,s=n.skipHtml,a=n.unwrapDisallowed,l=n.urlTransform||W;for(const u of q)Object.hasOwn(n,u.from)&&p("Unexpected `"+u.from+"` prop, "+(u.to?"use `"+u.to+"` instead":"remove it")+" (see <"+G+"#"+u.id+"> for more info)");n.className&&(e={type:"element",tagName:"div",properties:{className:n.className},children:"root"===e.type?e.children:[e]});return d(e,c),m(e,{Fragment:h.Fragment,components:o,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function c(e,n,o){if("raw"===e.type&&o&&"number"==typeof n)return s?o.children.splice(n,1):o.children[n]={type:"text",value:e.value},n;if("element"===e.type){let n;for(n in g)if(Object.hasOwn(g,n)&&Object.hasOwn(e.properties,n)){const t=e.properties[n],r=g[n];(null===r||r.includes(e.tagName))&&(e.properties[n]=l(String(t||""),n,e))}}if("element"===e.type){let s=t?!t.includes(e.tagName):!!i&&i.includes(e.tagName);if(!s&&r&&"number"==typeof n&&(s=!r(e,n,o)),s&&o&&"number"==typeof n)return a&&e.children?o.children.splice(n,1,...e.children):o.children.splice(n,1),n}}}(n.runSync(n.parse(t),t),e)}function W(e){const n=e.indexOf(":"),t=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===n||-1!==o&&n>o||-1!==t&&n>t||-1!==r&&n>r||$.test(e.slice(0,n))?e:""}const X=function(e){return function(e){return function(e){return n;function n(n,...t){return Boolean(n&&"object"==typeof n&&"type"in n&&Boolean(e.call(this,n,...t)))}}(n);function n(n){return n&&n.type===e}}(e)};const Y=!0,Z=!1,_=function(e,n,t,r){const o=X(n);!function e(n,r,i){const s=n&&"object"==typeof n?n:{};if("string"==typeof s.type){const e="string"==typeof s.tagName?s.tagName:"string"==typeof s.name?s.name:void 0;Object.defineProperty(a,"name",{value:"node ("+n.type+(e?"<"+e+">":"")+")"})}return a;function a(){let s,a,l,c=[];if(o(n,r,i[i.length-1]||null)&&(c=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[Y,e];return[e]}(t(n,i)),c[0]===Z))return c;if(n.children&&"skip"!==c[0])for(a=0,l=i.concat(n);a>-1&&a<n.children.length;){if(s=e(n.children[a],a,l)(),s[0]===Z)return s;a="number"==typeof s[1]?s[1]:a+1}return c}}(e,void 0,[])()};const ee={}.hasOwnProperty;function ne(e={}){const{aliases:n,languages:t,prefix:r,plainText:o,ignoreMissing:i,subset:a,detect:l}=e;let c="hljs";if(n&&y.registerAlias(n),t){let e;for(e in t)ee.call(t,e)&&y.registerLanguage(e,t[e])}if(r){const e=r.indexOf("-");c=e>-1?r.slice(0,e):r}return(e,n)=>{!function(e,n,t){_(e,n,function(e,n){const r=n[n.length-1];return t(e,r?r.children.indexOf(e):null,r)}
1)}(e,"element",(e,t,u)=>{const f=u;if(!f||!("tagName"in f)||"pre"!==f.tagName||"code"!==e.tagName||!e.properties)return;const p=function(e){const n=e.properties&&e.properties.className;let t=-1;if(!Array.isArray(n))return;for(;++t<n.length;){const e=String(n[t]);if("no-highlight"===e||"nohighlight"===e)return!1;if("lang-"===e.slice(0,5))return e.slice(5);if("language-"===e.slice(0,9))return e.slice(9)}}(e);if(!1===p||!p&&!l||p&&o&&o.includes(p))return;let d;Array.isArray(e.properties.className)||(e.properties.className=[]),e.properties.className.includes(c)||e.properties.className.unshift(c);try{d=p?y.highlight(p,s(f),{prefix:r}):y.highlightAuto(s(f),{prefix:r,subset:a})}catch(m){const t=m;return void(i&&/Unknown language/.test(t.message)||n.fail(t,e,"rehype-highlight:missing-language"))}!p&&d.data.language&&e.properties.className.push("language-"+d.data.language),Array.isArray(d.children)&&d.children.length>0&&(e.children=d.children)})}}function te(){const e=this.data(),n=e.micromarkExtensions||(e.micromarkExtensions=[]),t=e.fromMarkdownExtensions||(e.fromMarkdownExtensions=[]),r=e.toMarkdownExtensions||(e.toMarkdownExtensions=[]);n.push(x()),t.push(w()),r.push(k())}export{V as M,v as a,B as b,te as c,j as d,ne as r,R as s};

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