PageSourceSearch

https://icaas.org/assets/CopyButton-DPvaIZu6.js

js icaas.org collected 2026-10-05 19:50:04 UTC 3,010 bytes, 1 lines download raw bytes

1import{n as e,s as t,t as n}from"./jsx-runtime-CKh-7KOC.js";import{p as r}from"./chunk-BV7QT456-CDyPqCoy.js";import{t as i}from"./proxy-DEfmac81.js";import{t as a}from"./AnimatePresence-8T3LVYT7.js";import{A as o}from"./md-zfI0h3Iq.js";var s=t(e()),c=n(),l=({size:e=16})=>(0,c.jsxs)(i.svg,{viewBox:`0 0 16 16`,style:{width:e,height:e},initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1},transition:{type:`spring`,stiffness:400,damping:15},children:[(0,c.jsx)(i.circle,{cx:`8`,cy:`8`,r:`7`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.3,ease:`easeOut`}}),(0,c.jsx)(i.path,{d:`M4.5 8.2 L7 10.7 L11.5 5.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,initial:{pathLength:0},animate:{pathLength:1},transition:{duration:.25,delay:.2,ease:`easeOut`}})]});function u(e){return navigator.clipboard?.writeText?navigator.clipboard.writeText(e):new Promise((t,n)=>{let r=document.createElement(`textarea`);r.value=e,r.style.cssText=`position:fixed;opacity:0`,document.body.appendChild(r),r.select();let i=document.execCommand(`copy`);document.body.removeChild(r),i?t():n(Error(`execCommand failed`))})}function d({text:e,className:t=``,iconSize:n=16,label:d,copiedLabel:f,title:p,onCopy:m,variant:h=`icon`}){let{t:g}=r(),[_,v]=(0,s.useState)(!1),y=f??g(`components.copyButton.copied`),b=p??g(`components.copyButton.copy`),x=(0,s.useCallback)(()=>{_||!e||u(e).then(()=>{v(!0),m?.(),setTimeout(()=>v(!1),2e3)}).catch(()=>{})},[e,_,m]);return h===`chip`?(0,c.jsxs)(i.button,{onClick:x,whileTap:{scale:.97},className:`inline-flex items-center gap-1.5 rounded-lg px-2.5 py-1 text-xs font-mono transition-colors duration-300 ${_?`bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400`:`bg-gray-100 text-gray-600 hover:bg-gray-200 active:bg-gray-300 dark:bg-white/10 dark:text-gray-300 dark:hover:bg-white/15`} ${t}`,title:b,children:[d&&(0,c.jsx)(`span`,{className:`truncate`,children:_?y:d}),(0,c.jsx)(a,{mode:`wait`,children:_?(0,c.jsx)(i.span,{className:`text-green-600 dark:text-green-400`,initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},children:(0,c.jsx)(l,{size:n})},`check`):(0,c.jsx)(i.span,{initial:{opacity:0}
1,animate:{opacity:.5},exit:{opacity:0},children:(0,c.jsx)(o,{style:{width:n-2,height:n-2},className:`flex-shrink-0`})},`copy`)})]}):(0,c.jsx)(i.button,{onClick:x,whileTap:{scale:.9},className:`relative rounded-xl p-2 transition-colors ${_?`text-green-600 dark:text-green-400`:`text-gray-400 hover:bg-gray-100 hover:text-gray-600 dark:hover:bg-white/10 dark:hover:text-white`} ${t}`,title:b,children:(0,c.jsx)(a,{mode:`wait`,children:_?(0,c.jsx)(i.span,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},children:(0,c.jsx)(l,{size:n})},`check`):(0,c.jsx)(i.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:(0,c.jsx)(o,{style:{width:n,height:n}})},`copy`)})})}export{d as t};

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.