import{s as X,n as Z,o as ee}from"../chunks/scheduler.d6170356.js";import{S as te,i as ae,g as l,s as i,r as I,A as se,h as o,f as a,c as n,j as K,u as O,x as _,k as Q,y as ie,a as s,v as U,d as j,t as N,w as q}from"../chunks/index.fcd4cc08.js";import{H as W,E as ne}from"../chunks/EditOnGithub.da2b595c.js";function le(z){let c,H,$,S,r,L,p,G="Spaces also accommodate custom HTML for your app instead of using Streamlit or Gradio. Set <code>sdk: static</code> inside the <code>YAML</code> block at the top of your Spaces <strong>README.md</strong> file. Then you can place your HTML code within an <strong>index.html</strong> file.",x,u,R="Here are some examples of Spaces using custom HTML:",M,m,F='<li><a href="https://huggingface.co/spaces/mishig/smarter_npc" rel="nofollow">Smarter NPC</a>: Display a PlayCanvas project with an iframe in Spaces.</li> <li><a href="https://huggingface.co/spaces/pierreant-p/huggingfab" rel="nofollow">Huggingfab</a>: Display a Sketchfab model in Spaces.</li>',y,f,w,h,J='Custom <a href="./spaces-overview#managing-secrets">environment variables</a> can be passed to your Space. OAuth information such as the client ID and scope are also available as environment variables, if you have <a href="./spaces-oauth">enabled OAuth</a> for your Space.',C,d,V="To use these variables in JavaScript, you can use the <code>window.huggingface.variables</code> object. For example, to access the <code>OAUTH_CLIENT_ID</code> variable, you can use <code>window.huggingface.variables.OAUTH_CLIENT_ID</code>.",P,v,Y="Here is an example of a Space using custom environment variables and oauth enabled and displaying the variables in the HTML:",E,g,B='<li><a href="https://huggingface.co/spaces/huggingfacejs/static-variables" rel="nofollow">Static Variables</a></li>',A,b,k,T,D;return r=new W({props:{title:"Static HTML Spaces",local:"static-html-spaces",headingTag:"h1"}}),f=new W({props:{title:"Space variables",local:"space-variables",headingTag:"h2"}}),b=new ne({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/spaces-sdks-static.md"}}),{c(){c=l("meta"),H=i(),$=l("p"),S=i(),I(r.$$.fragment),L=i(),p=l("p"),p.innerHTML=G,x=i(),u=l("p"),u.textContent=R,M=i(),m=l("ul"),m.innerHTML=F,y=i(),I(f.$$.fragment),w=i(),h=l("p"),h.innerHTML=J,C=i(),d=l("p"),d.innerHTML=V,P=i(),v=l("p"),v.textContent=Y,E=i(),g=l("ul"),g.innerHTML=B,A=i(),I(b.$$.fragment),k=i(),T=l("p"),this.h()},l(e){const t=se("svelte-u9bgzb",document.head);c=o(t,"META",{name:!0,content:!0}),t.forEach(a),H=n(e),$=o(e,"P",{}),K($).forEach(a),S=n(e),O(r.$$.fragment,e),L=n(e),p=o(e,"P",{"data-svelte-h":!0}),_(p)!=="svelte-1qcbiku"&&(p.innerHTML=G),x=n(e),u=o(e,"P",{"data-svelte-h":!0}),_(u)!=="svelte-eya07n"&&(u.textContent=R),M=n(e),m=o(e,"UL",{"data-svelte-h":!0}),_(m)!=="svelte-1mc4va3"&&(m.innerHTML=F),y=n(e),O(f.$$.fragment,e),w=n(e),h=o(e,"P",{"data-svelte-h":!0}),_(h)!=="svelte-g74v4h"&&(h.innerHTML=J),C=n(e),d=o(e,"P",{"data-svelte-h":!0}),_(d)!=="svelte-z1bh12"&&(d.innerHTML=V),P=n(e),v=o(e,"P",{"data-svelte-h":!0}),_(v)!=="svelte-1xu7v31"&&(v.textContent=Y),E=n(e),g=o(e,"UL",{"data-svelte-h":!0}),_(g)!=="svelte-y7kl17"&&(g.innerHTML=B),A=n(e),O(b.$$.fragment,e),k=n(e),T=o(e,"P",{}),K(T).forEach(a),this.h()},h(){Q(c,"name","hf:doc:metadata"),Q(c,"content",oe)},m(e,t){ie(document.head,c),s(e,H,t),s(e,$,t),s(e,S,t),U(r,e,t),s(e,L,t),s(e,p,t),s(e,x,t),s(e,u,t),s(e,M,t),s(e,m,t),s(e,y,t),U(f,e,t),s(e,w,t),s(e,h,t),s(e,C,t),s(e,d,t),s(e,P,t),s(e,v,t),s(e,E,t),s(e,g,t),s(e,A,t),U(b,e,t),s(e,k,t),s(e,T,t),D=!0},p:Z,i(e){D||(j(r.$$.fragment,e),j(f.$$.fragment,e),j(b.$$.fragment,e),D=!0)},o(e){N(r.$$.fragment,e),N(f.$$.fragment,e),N(b.$$.fragment,e),D=!1},d(e){e&&(a(H),a($),a(S),a(L),a(p),a(x),a(u),a(M),a(m),a(y),a(w),a(h),a(C),a(d),a(P),a(v),a(E),a(g),a(A),a(k),a(T)),a(c),q(r,e),q(f,e),q(b,e)}}}const oe='{"title":"Static HTML Spaces","local":"static-html-spaces","sections":[{"title":"Space variables","local":"space-variables","sections":[],"depth":2}],"depth":1}';function ce(z){return ee(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class me extends te{constructor(c){super(),ae(this,c,ce,le,X,{})}}export{me as component};
