1import{q as h,l as m,aq as y,c as i,f as o,a2 as _,t as v,r as g,o as l,p as r}from"./DH58S5hj.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="51da79f0-b45e-4c99-9ea9-bbe6daf9ba97",s._sentryDebugIdIdentifier="sentry-dbid-51da79f0-b45e-4c99-9ea9-bbe6daf9ba97")}catch{}})();const w={class:"not-prose my-6"},$=["srcdoc","title"],k=["href"],D=h({__name:"Gist",props:{id:{},user:{}},setup(s){const e=s,a=r(()=>/^[0-9a-f]+$/i.test(e.id)?e.id:null),c=r(()=>e.user&&/^[\w.-]+$/.test(e.user)?e.user:null),b=r(()=>c.value?`${c.value}/${a.value}`:a.value),n=r(()=>`https://gist.github.com/${b.value}`),d=g(180),u=g(null),f=r(()=>{if(!a.value)return null;const t="<\/script>";return`<!DOCTYPE html><html><head><meta charset="utf-8"><base target="_blank"><style>html,body{margin:0;background:transparent}.gist{margin:0}</style></head><body><script src="${n.value}.js">${t}<noscript><a href="${n.value}">${n.value}</a></noscript><script>var o=new ResizeObserver(function(){parent.postMessage({type:'gist-height',h:document.body.scrollHeight},'*')});o.observe(document.body);${t}</body></html>`});function p(t){t.data?.type==="gist-height"&&t.source===u.value?.contentWindow&&(d.value=t.data.h)}return m(()=>window.addEventListener("message",p)),y(()=>window.removeEventListener("message",p)),(t,E)=>(l(),i("div",w,[o(f)?(l(),i("iframe",{key:0,ref_key:"iframeRef",ref:u,srcdoc:o(f),style:_({height:`${o(d)}px`}),title:t.$t("mdc.gist.title",{id:o(a)}),class:"w-full border-0",loading:"lazy",scrolling:"no",sandbox:"allow-scripts allow-popups allow-popups-to-escape-sandbox"},null,12,$)):(l(),i("a",{key:1,href:o(n),target:"_blank",rel:"noopener noreferrer",class:"underline",style:{color:"var(--ui-primary)"}},v(o(n)),9,k))]))}}),x=Object.assign(D,{__name:"Gist"});export{x 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.