PageSourceSearch

https://hotelvilainglesa.com.br/assets/ExpandableText-BFhcpnt3.js

js hotelvilainglesa.com.br collected 2026-09-26 10:27:25 UTC 1,315 bytes, 1 lines download raw bytes

1import{j as o}from"./vendor-query-CO_QYTkO.js";import{r as m}from"./vendor-react-DJfEFaqw.js";import{C as b,K as k}from"./vendor-icons-BmcpZVdY.js";const B=({paragraphs:e,visibleCount:l=2,truncateMode:d="paragraphs",visibleWords:p=50,buttonText:h="Leia mais",buttonCollapseText:u="Ler menos",style:x={},className:f=""})=>{const[t,g]=m.useState(!1),{displayParagraphs:j,hasMore:y}=m.useMemo(()=>{if(t)return{displayParagraphs:e,hasMore:!0};if(d==="words"){let r=0;const s=[];let c=!1;for(const n of e){const a=n.split(/\s+/).filter(Boolean),i=p-r;if(i<=0){c=!0;break}if(a.length<=i)s.push(n),r+=a.length;else{s.push(a.slice(0,i).join(" ")+"..."),r+=i,c=!0;break}}const w=e.reduce((n,a)=>n+a.split(/\s+/).filter(Boolean).length,0);return{displayParagraphs:s,hasMore:c||w>p}}return{displayParagraphs:e.slice(0,l),hasMore:e.length>l}},[t,e,l,d,p]);return o.jsxs("div",{className:f,"data-element":"expandable-text",children:[j.map((r,s)=>o.jsx("p",{style:{...x,marginBottom:"1.5rem"},children:r},s)),y&&o.jsxs("button",{onClick:()=>g(!t),className:"inline-flex items-center gap-2 font-semibold tracking-wide uppercase text-sm hover:opacity-80 transition-opacity mt-2 cursor-pointer border-0 bg-transparent p-0",style:{color:"inherit"},children:[t?u:h,t?o.jsx(b,{size:16}):o.jsx(k,{size:16})]})]})};export{B as default};

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.