Buckets:

hf-doc-build/doc / optimum-neuron /main /en /_app /immutable /chunks /CopyLLMTxtMenu.4e39978e.js
rtrm's picture
download
raw
17.8 kB
import{s as oe,n as G,r as $e,h as Me,t as we,d as be}from"./scheduler.56725da7.js";import{S as ie,i as ce,F as O,G as S,f,d as u,k as r,m as H,l as o,q as Q,r as X,e as E,c as Z,s as P,a as C,g as ee,b as R,n as te,u as F,w as pe,t as U,z as Ne,o as q,y as Ee,p as re,j as De,v as Le,B as Ve}from"./index.18a26576.js";import{g as Ae}from"./globals.7f7f1b26.js";import{e as _e}from"./each.e59479a4.js";import{aH as Ce,aI as ze}from"./MermaidChart.svelte_svelte_type_style_lang.d1b38350.js";function Te(s){let e,a;return{c(){e=O("svg"),a=O("path"),this.h()},l(t){e=S(t,"svg",{class:!0,width:!0,height:!0,viewBox:!0,fill:!0,xmlns:!0});var n=f(e);a=S(n,"path",{d:!0,stroke:!0}),f(a).forEach(u),n.forEach(u),this.h()},h(){r(a,"d","M1 1L6 6L11 1"),r(a,"stroke","currentColor"),r(e,"class",s[0]),r(e,"width","1em"),r(e,"height","1em"),r(e,"viewBox","0 0 12 7"),r(e,"fill","none"),r(e,"xmlns","http://www.w3.org/2000/svg")},m(t,n){H(t,e,n),o(e,a)},p(t,[n]){n&1&&r(e,"class",t[0])},i:G,o:G,d(t){t&&u(e)}}}function Be(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Ue extends ie{constructor(e){super(),ce(this,e,Be,Te,oe,{classNames:0})}}function Oe(s){let e,a,t,n;return{c(){e=O("svg"),a=O("path"),t=O("path"),n=O("path"),this.h()},l(l){e=S(l,"svg",{class:!0,xmlns:!0,"aria-hidden":!0,fill:!0,focusable:!0,role:!0,width:!0,height:!0,preserveAspectRatio:!0,viewBox:!0});var i=f(e);a=S(i,"path",{d:!0}),f(a).forEach(u),t=S(i,"path",{d:!0}),f(t).forEach(u),n=S(i,"path",{d:!0}),f(n).forEach(u),i.forEach(u),this.h()},h(){r(a,"d","M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"),r(t,"d","M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"),r(n,"d","M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"),r(e,"class",s[0]),r(e,"xmlns","http://www.w3.org/2000/svg"),r(e,"aria-hidden","true"),r(e,"fill","currentColor"),r(e,"focusable","false"),r(e,"role","img"),r(e,"width","1em"),r(e,"height","1em"),r(e,"preserveAspectRatio","xMidYMid meet"),r(e,"viewBox","0 0 32 32")},m(l,i){H(l,e,i),o(e,a),o(e,t),o(e,n)},p(l,[i]){i&1&&r(e,"class",l[0])},i:G,o:G,d(l){l&&u(e)}}}function Se(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Pe extends ie{constructor(e){super(),ce(this,e,Se,Oe,oe,{classNames:0})}}function Re(s){let e,a,t;return{c(){e=O("svg"),a=O("path"),t=O("path"),this.h()},l(n){e=S(n,"svg",{class:!0,xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0});var l=f(e);a=S(l,"path",{d:!0}),f(a).forEach(u),t=S(l,"path",{d:!0}),f(t).forEach(u),l.forEach(u),this.h()},h(){r(a,"d","M7 7h10v10"),r(t,"d","M7 17 17 7"),r(e,"class",s[0]),r(e,"xmlns","http://www.w3.org/2000/svg"),r(e,"width","24"),r(e,"height","24"),r(e,"viewBox","0 0 24 24"),r(e,"fill","none"),r(e,"stroke","currentColor"),r(e,"stroke-width","1.75"),r(e,"stroke-linecap","round"),r(e,"stroke-linejoin","round")},m(n,l){H(n,e,l),o(e,a),o(e,t)},p(n,[l]){l&1&&r(e,"class",n[0])},i:G,o:G,d(n){n&&u(e)}}}function je(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Ie extends ie{constructor(e){super(),ce(this,e,je,Re,oe,{classNames:0})}}function qe(s){let e,a,t,n;return{c(){e=O("svg"),a=O("title"),t=Q("OpenAI"),n=O("path"),this.h()},l(l){e=S(l,"svg",{class:!0,fill:!0,"fill-rule":!0,height:!0,viewBox:!0,width:!0,xmlns:!0});var i=f(e);a=S(i,"title",{});var g=f(a);t=X(g,"OpenAI"),g.forEach(u),n=S(i,"path",{d:!0}),f(n).forEach(u),i.forEach(u),this.h()},h(){r(n,"d","M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z"),r(e,"class",s[0]),r(e,"fill","currentColor"),r(e,"fill-rule","evenodd"),r(e,"height","1em"),r(e,"viewBox","0 0 24 24"),r(e,"width","1em"),r(e,"xmlns","http://www.w3.org/2000/svg")},m(l,i){H(l,e,i),o(e,a),o(a,t),o(e,n)},p(l,[i]){i&1&&r(e,"class",l[0])},i:G,o:G,d(l){l&&u(e)}}}function We(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Fe extends ie{constructor(e){super(),ce(this,e,We,qe,oe,{classNames:0})}}function He(s){let e,a,t,n;return{c(){e=O("svg"),a=O("title"),t=Q("Anthropic"),n=O("path"),this.h()},l(l){e=S(l,"svg",{class:!0,fill:!0,height:!0,viewBox:!0,width:!0,xmlns:!0});var i=f(e);a=S(i,"title",{});var g=f(a);t=X(g,"Anthropic"),g.forEach(u),n=S(i,"path",{d:!0}),f(n).forEach(u),i.forEach(u),this.h()},h(){r(n,"d","M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"),r(e,"class",s[0]),r(e,"fill","currentColor"),r(e,"height","1em"),r(e,"viewBox","0 0 24 24"),r(e,"width","1em"),r(e,"xmlns","http://www.w3.org/2000/svg")},m(l,i){H(l,e,i),o(e,a),o(a,t),o(e,n)},p(l,[i]){i&1&&r(e,"class",l[0])},i:G,o:G,d(l){l&&u(e)}}}function Ge(s,e,a){let{classNames:t=""}=e;return s.$$set=n=>{"classNames"in n&&a(0,t=n.classNames)},[t]}class Ke extends ie{constructor(e){super(),ce(this,e,Ge,He,oe,{classNames:0})}}const{window:fe}=Ae;function ke(s,e,a){const t=s.slice();return t[35]=e[a],t}function ye(s){let e,a,t,n,l,i,g,D,V,A,p,w,z,M,v,N,I,T,h,m,k,L,j,y,b="View this page as plain text",W,B,K,ae;i=new Ce({props:{classNames:"w-4 h-4 shrink-0"}}),I=new Pe({props:{classNames:"w-4 h-4 shrink-0"}}),L=new Ie({props:{classNames:"w-4 h-4 text-gray-500 dark:text-gray-300 shrink-0"}});let Y=_e(s[9]),x=[];for(let d=0;d<Y.length;d+=1)x[d]=xe(ke(s,Y,d));const he=d=>q(x[d],1,1,()=>{x[d]=null});return{c(){e=E("div"),a=P(),t=E("div"),n=E("button"),l=E("div"),Z(i.$$.fragment),g=P(),D=E("div"),V=E("div"),A=Q(s[0]),p=P(),w=E("div"),z=Q(s[1]),M=P(),v=E("button"),N=E("div"),Z(I.$$.fragment),T=P(),h=E("div"),m=E("div"),k=Q(`View as Markdown
`),Z(L.$$.fragment),j=P(),y=E("div"),y.textContent=b,W=P();for(let d=0;d<x.length;d+=1)x[d].c();this.h()},l(d){e=C(d,"DIV",{class:!0,"aria-hidden":!0,style:!0}),f(e).forEach(u),a=R(d),t=C(d,"DIV",{role:!0,class:!0,style:!0,"aria-label":!0});var $=f(t);n=C($,"BUTTON",{role:!0,class:!0});var _=f(n);l=C(_,"DIV",{class:!0});var ne=f(l);ee(i.$$.fragment,ne),ne.forEach(u),g=R(_),D=C(_,"DIV",{class:!0});var se=f(D);V=C(se,"DIV",{class:!0});var c=f(V);A=X(c,s[0]),c.forEach(u),p=R(se),w=C(se,"DIV",{class:!0});var J=f(w);z=X(J,s[1]),J.forEach(u),se.forEach(u),_.forEach(u),M=R($),v=C($,"BUTTON",{role:!0,class:!0});var le=f(v);N=C(le,"DIV",{class:!0});var ue=f(N);ee(I.$$.fragment,ue),ue.forEach(u),T=R(le),h=C(le,"DIV",{class:!0});var de=f(h);m=C(de,"DIV",{class:!0});var me=f(m);k=X(me,`View as Markdown
`),ee(L.$$.fragment,me),me.forEach(u),j=R(de),y=C(de,"DIV",{class:!0,"data-svelte-h":!0}),De(y)!=="svelte-8wg9lb"&&(y.textContent=b),de.forEach(u),le.forEach(u),W=R($);for(let ge=0;ge<x.length;ge+=1)x[ge].l($);$.forEach(u),this.h()},h(){r(e,"class","fixed inset-0 z-40"),r(e,"aria-hidden","true"),Le(e,"background","transparent"),r(l,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),r(V,"class","text-sm font-medium text-gray-800 dark:text-gray-300 flex items-center gap-1"),r(w,"class","text-xs text-gray-600 dark:text-gray-400"),r(D,"class","flex flex-col px-1"),r(n,"role","menuitem"),r(n,"class",ve),r(N,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),r(m,"class","text-sm font-medium text-gray-800 dark:text-gray-300 flex items-center gap-1"),r(y,"class","text-xs text-gray-600 dark:text-gray-400"),r(h,"class","flex flex-col px-1"),r(v,"role","menuitem"),r(v,"class",ve),r(t,"role","menu"),r(t,"class","fixed z-50 backdrop-blur-xl rounded-xl max-h-[420px] overflow-y-auto p-1 border flex flex-col border-gray-200 bg-white dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200"),r(t,"style",s[8]),r(t,"aria-label","Copy menu")},m(d,$){H(d,e,$),H(d,a,$),H(d,t,$),o(t,n),o(n,l),te(i,l,null),o(n,g),o(n,D),o(D,V),o(V,A),o(D,p),o(D,w),o(w,z),o(t,M),o(t,v),o(v,N),te(I,N,null),o(v,T),o(v,h),o(h,m),o(m,k),te(L,m,null),o(h,j),o(h,y),o(t,W);for(let _=0;_<x.length;_+=1)x[_]&&x[_].m(t,null);s[23](t),B=!0,K||(ae=[F(e,"click",s[11]),F(n,"click",s[20]),F(v,"click",s[21])],K=!0)},p(d,$){if((!B||$[0]&1)&&pe(A,d[0]),(!B||$[0]&2)&&pe(z,d[1]),$[0]&16896){Y=_e(d[9]);let _;for(_=0;_<Y.length;_+=1){const ne=ke(d,Y,_);x[_]?(x[_].p(ne,$),U(x[_],1)):(x[_]=xe(ne),x[_].c(),U(x[_],1),x[_].m(t,null))}for(Ne(),_=Y.length;_<x.length;_+=1)he(_);Ee()}(!B||$[0]&256)&&r(t,"style",d[8])},i(d){if(!B){U(i.$$.fragment,d),U(I.$$.fragment,d),U(L.$$.fragment,d);for(let $=0;$<Y.length;$+=1)U(x[$]);B=!0}},o(d){q(i.$$.fragment,d),q(I.$$.fragment,d),q(L.$$.fragment,d),x=x.filter(Boolean);for(let $=0;$<x.length;$+=1)q(x[$]);B=!1},d(d){d&&(u(e),u(a),u(t)),re(i),re(I),re(L),Ve(x,d),s[23](null),K=!1,$e(ae)}}}function Ye(s){let e,a;return e=new Ke({props:{classNames:"w-4 h-4 shrink-0"}}),{c(){Z(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,n){te(e,t,n),a=!0},i(t){a||(U(e.$$.fragment,t),a=!0)},o(t){q(e.$$.fragment,t),a=!1},d(t){re(e,t)}}}function Je(s){let e,a;return e=new Fe({props:{classNames:"w-4 h-4 shrink-0"}}),{c(){Z(e.$$.fragment)},l(t){ee(e.$$.fragment,t)},m(t,n){te(e,t,n),a=!0},i(t){a||(U(e.$$.fragment,t),a=!0)},o(t){q(e.$$.fragment,t),a=!1},d(t){re(e,t)}}}function xe(s){let e,a,t,n,l,i,g,D=s[35].label+"",V,A,p,w=s[35].description+"",z,M,v,N,I,T,h;const m=[Je,Ye],k=[];function L(y,b){return y[35].icon==="chatgpt"?0:1}t=L(s),n=k[t]=m[t](s),v=new Ie({props:{classNames:"w-4 h-4 text-gray-500 dark:text-gray-300"}});function j(){return s[22](s[35])}return{c(){e=E("button"),a=E("div"),n.c(),l=P(),i=E("div"),g=E("div"),V=Q(D),A=P(),p=E("div"),z=Q(w),M=P(),Z(v.$$.fragment),N=P(),this.h()},l(y){e=C(y,"BUTTON",{role:!0,class:!0});var b=f(e);a=C(b,"DIV",{class:!0});var W=f(a);n.l(W),W.forEach(u),l=R(b),i=C(b,"DIV",{class:!0});var B=f(i);g=C(B,"DIV",{class:!0});var K=f(g);V=X(K,D),K.forEach(u),A=R(B),p=C(B,"DIV",{class:!0});var ae=f(p);z=X(ae,w),ae.forEach(u),B.forEach(u),M=R(b),ee(v.$$.fragment,b),N=R(b),b.forEach(u),this.h()},h(){r(a,"class","border border-gray-200 dark:border-gray-850 rounded-lg p-1.5"),r(g,"class","text-sm font-medium text-gray-800 dark:text-gray-200 flex items-center gap-1"),r(p,"class","text-xs text-gray-600 dark:text-gray-400"),r(i,"class","flex flex-col px-1"),r(e,"role","menuitem"),r(e,"class",ve)},m(y,b){H(y,e,b),o(e,a),k[t].m(a,null),o(e,l),o(e,i),o(i,g),o(g,V),o(i,A),o(i,p),o(p,z),o(e,M),te(v,e,null),o(e,N),I=!0,T||(h=F(e,"click",j),T=!0)},p(y,b){s=y},i(y){I||(U(n),U(v.$$.fragment,y),I=!0)},o(y){q(n),q(v.$$.fragment,y),I=!1},d(y){y&&u(e),k[t].d(),re(v),T=!1,h()}}}function Qe(s){let e,a,t,n,l,i,g,D=(s[5]?"Copied":s[0])+"",V,A,p,w,z,M,v,N,I,T;l=new Ce({props:{classNames:"w-4 h-4"}}),w=new Ue({props:{classNames:`transition-transform text-gray-400 overflow-visible ${s[4]?"rotate-180":"rotate-0"}`}});let h=s[4]&&ye(s);return{c(){e=E("div"),a=E("div"),t=E("button"),n=E("span"),Z(l.$$.fragment),i=P(),g=E("span"),V=Q(D),A=P(),p=E("button"),Z(w.$$.fragment),M=P(),h&&h.c(),this.h()},l(m){e=C(m,"DIV",{class:!0,style:!0});var k=f(e);a=C(k,"DIV",{class:!0});var L=f(a);t=C(L,"BUTTON",{class:!0,"aria-live":!0});var j=f(t);n=C(j,"SPAN",{class:!0});var y=f(n);ee(l.$$.fragment,y),y.forEach(u),i=R(j),g=C(j,"SPAN",{});var b=f(g);V=X(b,D),b.forEach(u),j.forEach(u),A=R(L),p=C(L,"BUTTON",{class:!0,"aria-haspopup":!0,"aria-expanded":!0,"aria-label":!0});var W=f(p);ee(w.$$.fragment,W),W.forEach(u),L.forEach(u),M=R(k),h&&h.l(k),k.forEach(u),this.h()},h(){r(n,"class","inline-flex items-center justify-center rounded-md p-1"),r(t,"class","inline-flex items-center gap-1.5 h-9 px-3.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-xl border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800"),r(t,"aria-live","polite"),r(p,"class","inline-flex items-center justify-center w-9 h-9 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-xl border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800"),r(p,"aria-haspopup","menu"),r(p,"aria-expanded",s[4]),r(p,"aria-label",z=s[4]?"Close copy menu":"Open copy menu"),r(a,"class","inline-flex rounded-xl"),r(e,"class",v=`items-center shrink-0 min-w-[156px] justify-end ml-auto flex${s[2]?` ${s[2]}`:""}`),r(e,"style",s[3])},m(m,k){H(m,e,k),o(e,a),o(a,t),o(t,n),te(l,n,null),o(t,i),o(t,g),o(g,V),o(a,A),o(a,p),te(w,p,null),s[19](a),o(e,M),h&&h.m(e,null),N=!0,I||(T=[F(fe,"mousedown",s[15]),F(fe,"keydown",s[16]),F(fe,"resize",s[17]),F(fe,"scroll",s[18]),F(t,"click",s[10]),F(p,"click",s[12])],I=!0)},p(m,k){(!N||k[0]&33)&&D!==(D=(m[5]?"Copied":m[0])+"")&&pe(V,D);const L={};k[0]&16&&(L.classNames=`transition-transform text-gray-400 overflow-visible ${m[4]?"rotate-180":"rotate-0"}`),w.$set(L),(!N||k[0]&16)&&r(p,"aria-expanded",m[4]),(!N||k[0]&16&&z!==(z=m[4]?"Close copy menu":"Open copy menu"))&&r(p,"aria-label",z),m[4]?h?(h.p(m,k),k[0]&16&&U(h,1)):(h=ye(m),h.c(),U(h,1),h.m(e,null)):h&&(Ne(),q(h,1,1,()=>{h=null}),Ee()),(!N||k[0]&4&&v!==(v=`items-center shrink-0 min-w-[156px] justify-end ml-auto flex${m[2]?` ${m[2]}`:""}`))&&r(e,"class",v),(!N||k[0]&8)&&r(e,"style",m[3])},i(m){N||(U(l.$$.fragment,m),U(w.$$.fragment,m),U(h),N=!0)},o(m){q(l.$$.fragment,m),q(w.$$.fragment,m),q(h),N=!1},d(m){m&&u(e),re(l),re(w),s[19](null),h&&h.d(),I=!1,$e(T)}}}const ve="cursor-pointer text-sm group relative w-full select-none outline-none flex items-center gap-1 px-1.5 py-1.5 rounded-xl text-left transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800";function Xe(s,e,a){let{label:t="Copy page"}=e,{markdownDescription:n="Copy page as Markdown for LLMs"}=e,{containerClass:l=""}=e,{containerStyle:i=""}=e;const g=typeof window<"u",D=typeof document<"u";function V(){if(!g||!window.location)return;const c=window.location.href.replace(/#.*$/,"");return c.endsWith(".md")?c:`${c}.md`}const A=V();let p=null,w=!1,z=!1,M=null,v=null,N="",I=null,T=null,h=null;const m=[{label:"Open in ChatGPT",description:"Ask questions about this page",icon:"chatgpt",buildUrl:()=>p?`https://chatgpt.com/?hints=search&q=${p}`:"https://chatgpt.com"},{label:"Open in Claude",description:"Ask questions about this page",icon:"claude",buildUrl:()=>p?`https://claude.ai/new?q=${p}`:"https://claude.ai/new"}];function k(){p||!g||(p=encodeURIComponent(`Read from ${A} so I can ask questions about it.`))}async function L(){return!g||typeof fetch!="function"||!A?"":(k(),T||(h||(h=fetch(A,{headers:{Accept:"text/plain"}}).then(c=>{if(!c.ok)throw new Error(`Failed to fetch source content: ${c.status}`);return c.text()}).then(c=>(T=c,c)).catch(c=>(console.error("Unable to fetch remote markdown",c),T="",""))),h))}async function j(){if(!g){console.warn("Clipboard API unavailable");return}try{const c=await L();if(!c){console.warn("Nothing to copy");return}if(typeof navigator<"u"&&!!navigator.clipboard&&typeof navigator.clipboard.writeText=="function")await navigator.clipboard.writeText(c);else if(D)ze(c);else{console.warn("Clipboard API unavailable");return}a(5,z=!0),await we(),I&&clearTimeout(I),I=setTimeout(()=>{a(5,z=!1)},2e3)}catch(c){console.error("Failed to write to clipboard",c)}}function y(){a(4,w=!0),g&&M&&we().then(()=>{if(!M)return;const c=M.getBoundingClientRect(),J=10,le=Math.max(c.width+80,220),ue=Math.max(window.innerWidth-c.right,J);a(8,N=`top:${c.bottom+J}px;right:${ue}px;min-width:${le}px;`)})}function b(){a(4,w=!1)}function W(){w?b():y()}function B(){g&&(window.open(A,"_blank","noopener,noreferrer"),b())}function K(c){k(),g&&window.open(c.buildUrl(),"_blank","noopener,noreferrer"),b()}function ae(c){if(!w||!g)return;const J=c.target;v!=null&&v.contains(J)||M!=null&&M.contains(J)||b()}function Y(c){c.key==="Escape"&&w&&b()}function x(){w&&b()}function he(){w&&b()}Me(()=>{I&&clearTimeout(I)});function d(c){be[c?"unshift":"push"](()=>{M=c,a(6,M)})}const $=()=>{j(),b()},_=()=>{B()},ne=c=>K(c);function se(c){be[c?"unshift":"push"](()=>{v=c,a(7,v)})}return s.$$set=c=>{"label"in c&&a(0,t=c.label),"markdownDescription"in c&&a(1,n=c.markdownDescription),"containerClass"in c&&a(2,l=c.containerClass),"containerStyle"in c&&a(3,i=c.containerStyle)},[t,n,l,i,w,z,M,v,N,m,j,b,W,B,K,ae,Y,x,he,d,$,_,ne,se]}class nt extends ie{constructor(e){super(),ce(this,e,Xe,Qe,oe,{label:0,markdownDescription:1,containerClass:2,containerStyle:3},null,[-1,-1])}}export{nt as C};

Xet Storage Details

Size:
17.8 kB
·
Xet hash:
286edf589cd79cc2ac00a0e947014131a843608596b14592e3b0d7db001bcdd2

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.