PageSourceSearch

https://hcmussh.edu.vn/assets/Render-CU35UAWV-hATujfSJ.js

js hcmussh.edu.vn collected 2026-09-24 21:51:04 UTC 1,705 bytes, 1 lines download raw bytes

1import{P as u}from"./chunk-2CNEFIQP-C8LUkirF.js";import{r as i,j as m,M as p,K as f,O as l}from"./main-CO50IC4j.js";import{g as d,D as w,N as h,a as y}from"./index-CK33sJda.js";function g(e,t,r){if(typeof window>"u")throw new Error("getHTMLFromFragment can only be used in a browser environment\nIf you want to use this in a Node environment, use the `@tiptap/html/server` import instead.");const n=window.document.createElement("div");return y.fromSchema(t).serializeFragment(e.content,{document:window.document},n),n.innerHTML}function x(e,t){if(typeof window>"u")throw new Error("generateHTML can only be used in a browser environment\nIf you want to use this in a Node environment, use the `@tiptap/html/server` import instead.");const r=d(t),n=h.fromJSON(r,e);return g(n,r)}function v(e,t,r){if(typeof window>"u")throw new Error("generateJSON can only be used in a browser environment\nIf you want to use this in a Node environment, use the `@tiptap/html/server` import instead.");const n=d(t),o=new window.DOMParser().parseFromString(e,"text/html");if(!o)throw new Error("Failed to parse HTML string");return w.fromSchema(n).parse(o.body,r).toJSON()}f();var M=p("RichTextEditor",l);function E({content:e,field:t}){const{tiptap:r={},options:n}=t,{extensions:o=[]}=r,s=i.useMemo(()=>[u.configure(n),...o],[t,o]),a=i.useMemo(()=>typeof e=="object"&&e?.type==="doc"?e:typeof e=="string"?/<\/?[a-z][\s\S]*>/i.test(e)?v(e,s):{type:"doc",content:[{type:"paragraph",content:[{type:"text",text:e}]}]}:{type:"doc",content:[]},[e,s]),c=i.useMemo(()=>x(a,s),[a,s]);return m.jsx("div",{className:M(),children:m.jsx("div",{className:"rich-text",dangerouslySetInnerHTML:{__html:c}})})}export{E as RichTextRender};

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.