mfuntowicz's picture
mfuntowicz HF Staff
Upload folder using huggingface_hub
3bb8d79 verified
import{b as te,m as Ee,o as S,d as ce,c as v,f as T}from"../chunks/XY1_JITN.js";import{a7 as B,b as M,f as re,c as Me,aQ as Ce,h as F,C as ue,O as V,X as Te,P as xe,z as j,M as E,k as Ae,d as ze,aR as Ie,Q as ne,a1 as g,Z as Pe,u as le,av as x,g as d,ak as _,aj as N,ax as L,aS as Q,V as J,a6 as O,Y as X,aa as de}from"../chunks/BYqqIqIr.js";import{b as Y,s as Be}from"../chunks/CAoFXryQ.js";import{c as R}from"../chunks/CEU4_UFD.js";import{o as Ne}from"../chunks/DFAjaGLR.js";import{i as Z,p as m}from"../chunks/CYFw2Bla.js";function Le(t,e,r=!1,n=!1,i=!1){var o=t,s="";B(()=>{var a=Me;if(s===(s=e()??"")){M&&re();return}if(a.nodes_start!==null&&(Ce(a.nodes_start,a.nodes_end),a.nodes_start=a.nodes_end=null),s!==""){if(M){F.data;for(var c=re(),l=c;c!==null&&(c.nodeType!==ue||c.data!=="");)l=c,c=V(c);if(c===null)throw Te(),xe;te(F,l),o=j(c);return}var f=s+"";r?f=`<svg>${f}</svg>`:n&&(f=`<math>${f}</math>`);var h=Ee(f);if((r||n)&&(h=E(h)),te(E(h),h.lastChild),r||n)for(;E(h);)o.before(E(h));else o.before(h)}})}function fe(t,e){let r=null,n=M;var i;if(M){r=F;for(var o=E(document.head);o!==null&&(o.nodeType!==ue||o.data!==t);)o=V(o);if(o===null)ne(!1);else{var s=V(o);o.remove(),j(s)}}M||(i=document.head.appendChild(Ae()));try{ze(()=>e(i),Ie)}finally{n&&(ne(!0),j(r))}}const Oe=!0,Re=!1,Ot=Object.freeze(Object.defineProperty({__proto__:null,prerender:Oe,ssr:Re},Symbol.toStringTag,{value:"Module"})),he=typeof window<"u"?window:void 0;function Fe(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class Ve{#t;#e;constructor(e,r){this.#t=e,this.#e=R(r)}get current(){return this.#e(),this.#t()}}const je=/\(.+\)/,We=new Set(["all","print","screen","and","or","not","only"]);class qe extends Ve{constructor(e,r){let n=je.test(e)||e.split(/[\s,]+/).some(o=>We.has(o.trim()))?e:`(${e})`;const i=window.matchMedia(n);super(()=>i.matches,o=>S(i,"change",o))}}let De=class{#t;#e;constructor(e={}){const{window:r=he,document:n=r?.document}=e;r!==void 0&&(this.#t=n,this.#e=R(i=>{const o=S(r,"focusin",i),s=S(r,"focusout",i);return()=>{o(),s()}}))}get current(){return this.#e?.(),this.#t?Fe(this.#t):null}};new De;function Ke(t,e){switch(t){case"post":Pe(e);break;case"pre":g(e);break}}function me(t,e,r,n={}){const{lazy:i=!1}=n;let o=!i,s=Array.isArray(t)?[]:void 0;Ke(e,()=>{const a=Array.isArray(t)?t.map(l=>l()):t();if(!o){o=!0,s=a;return}const c=le(()=>r(a,s));return s=a,c})}function U(t,e,r){me(t,"post",e,r)}function He(t,e,r){me(t,"pre",e,r)}U.pre=He;function Qe(t,e){switch(t){case"local":return e.localStorage;case"session":return e.sessionStorage}}class ge{#t;#e;#n;#r;#i;#o=x(0);constructor(e,r,n={}){const{storage:i="local",serializer:o={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs:s=!0,window:a=he}=n;if(this.#t=r,this.#e=e,this.#n=o,a===void 0)return;const c=Qe(i,a);this.#r=c;const l=c.getItem(e);l!==null?this.#t=this.#s(l):this.#a(r),s&&i==="local"&&(this.#i=R(()=>S(a,"storage",this.#c)))}get current(){this.#i?.(),d(this.#o);const e=this.#s(this.#r?.getItem(this.#e))??this.#t,r=new WeakMap,n=i=>{if(i===null||i?.constructor.name==="Date"||typeof i!="object")return i;let o=r.get(i);return o||(o=new Proxy(i,{get:(s,a)=>(d(this.#o),n(Reflect.get(s,a))),set:(s,a,c)=>(_(this.#o,d(this.#o)+1),Reflect.set(s,a,c),this.#a(e),!0)}),r.set(i,o)),o};return n(e)}set current(e){this.#a(e),_(this.#o,d(this.#o)+1)}#c=e=>{e.key!==this.#e||e.newValue===null||(this.#t=this.#s(e.newValue),_(this.#o,d(this.#o)+1))};#s(e){try{return this.#n.deserialize(e)}catch(r){console.error(`Error when parsing "${e}" from persisted store "${this.#e}"`,r);return}}#a(e){try{e!=null&&this.#r?.setItem(this.#e,this.#n.serialize(e))}catch(r){console.error(`Error when writing value from persisted store "${this.#e}" to ${this.#r}`,r)}}}function oe(t){return t.filter(e=>e.length>0)}const we={getItem:t=>null,setItem:(t,e)=>{}},A=typeof document<"u";function Je(t){return typeof t=="function"}function Xe(t){return t!==null&&typeof t=="object"}const C=Symbol("box"),G=Symbol("is-writable");function Ye(t){return Xe(t)&&C in t}function Ze(t){return u.isBox(t)&&G in t}function u(t){let e=x(N(t));return{[C]:!0,[G]:!0,get current(){return d(e)},set current(r){_(e,r,!0)}}}function Ue(t,e){const r=L(t);return e?{[C]:!0,[G]:!0,get current(){return d(r)},set current(n){e(n)}}:{[C]:!0,get current(){return t()}}}function Ge(t){return u.isBox(t)?t:Je(t)?u.with(t):u(t)}function $e(t){return Object.entries(t).reduce((e,[r,n])=>u.isBox(n)?(u.isWritableBox(n)?Object.defineProperty(e,r,{get(){return n.current},set(i){n.current=i}}):Object.defineProperty(e,r,{get(){return n.current}}),e):Object.assign(e,{[r]:n}),{})}function et(t){return u.isWritableBox(t)?{[C]:!0,get current(){return t.current}}:t}u.from=Ge;u.with=Ue;u.flatten=$e;u.readonly=et;u.isBox=Ye;u.isWritableBox=Ze;function tt(t,e){const r=RegExp(t,"g");return n=>{if(typeof n!="string")throw new TypeError(`expected an argument of type string, but got ${typeof n}`);return n.match(r)?n.replace(r,e):n}}const rt=tt(/[A-Z]/,t=>`-${t.toLowerCase()}`);function nt(t){if(!t||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected an argument of type object, but got ${typeof t}`);return Object.keys(t).map(e=>`${rt(e)}: ${t[e]};`).join(`
`)}function ot(t={}){return nt(t).replace(`
`," ")}const it={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};ot(it);const st=typeof window<"u"?window:void 0;function at(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(r===e)break;e=r}return e}class ct{#t;#e;constructor(e={}){const{window:r=st,document:n=r?.document}=e;r!==void 0&&(this.#t=n,this.#e=R(i=>{const o=S(r,"focusin",i),s=S(r,"focusout",i);return()=>{o(),s()}}))}get current(){return this.#e?.(),this.#t?at(this.#t):null}}new ct;const p=u("mode-watcher-mode"),b=u("mode-watcher-theme"),ut=["dark","light","system"];function W(t){return typeof t!="string"?!1:ut.includes(t)}class lt{#t="system";#e=A?localStorage:we;#n=this.#e.getItem(p.current);#r=W(this.#n)?this.#n:this.#t;#i=x(N(this.#o()));#o(e=this.#r){return new ge(p.current,e,{serializer:{serialize:r=>r,deserialize:r=>W(r)?r:this.#t}})}constructor(){Q(()=>U.pre(()=>p.current,(e,r)=>{const n=d(this.#i).current;_(this.#i,this.#o(n),!0),r&&localStorage.removeItem(r)}))}get current(){return d(this.#i).current}set current(e){d(this.#i).current=e}}class dt{#t=void 0;#e=!0;#n=x(N(this.#t));#r=typeof window<"u"&&typeof window.matchMedia=="function"?new qe("prefers-color-scheme: light"):{current:!1};query(){A&&_(this.#n,this.#r.current?"light":"dark",!0)}tracking(e){this.#e=e}constructor(){Q(()=>{g(()=>{this.#e&&this.query()})}),this.query=this.query.bind(this),this.tracking=this.tracking.bind(this)}get current(){return d(this.#n)}}const q=new lt,D=new dt;class ft{#t=A?localStorage:we;#e=this.#t.getItem(b.current);#n=this.#e===null||this.#e===void 0?"":this.#e;#r=x(N(this.#i()));#i(e=this.#n){return new ge(b.current,e,{serializer:{serialize:r=>typeof r!="string"?"":r,deserialize:r=>r}})}constructor(){Q(()=>U.pre(()=>b.current,(e,r)=>{const n=d(this.#r).current;_(this.#r,this.#i(n),!0),r&&localStorage.removeItem(r)}))}get current(){return d(this.#r).current}set current(e){d(this.#r).current=e}}const z=new ft;let ie,se,ae=!1,k=null;function ht(){return k||(k=document.createElement("style"),k.appendChild(document.createTextNode(`* {
-webkit-transition: none !important;
-moz-transition: none !important;
-o-transition: none !important;
-ms-transition: none !important;
transition: none !important;
}`)),k)}function ye(t,e=!1){if(typeof document>"u")return;if(!ae){ae=!0,t();return}if(typeof window<"u"&&window.__vitest_worker__){t();return}clearTimeout(ie),clearTimeout(se);const n=ht(),i=()=>document.head.appendChild(n),o=()=>{n.parentNode&&document.head.removeChild(n)};function s(){t(),window.requestAnimationFrame(o)}if(typeof window.requestAnimationFrame<"u"){i(),e?s():window.requestAnimationFrame(()=>{s()});return}i(),ie=window.setTimeout(()=>{t(),se=window.setTimeout(o,16)},16)}const y=u(void 0),I=u(!0),P=u(!1),K=u([]),H=u([]);function mt(){const t=L(()=>{if(!A)return;const e=q.current==="system"?D.current:q.current,r=oe(K.current),n=oe(H.current);function i(){const o=document.documentElement,s=document.querySelector('meta[name="theme-color"]');e==="light"?(r.length&&o.classList.remove(...r),n.length&&o.classList.add(...n),o.style.colorScheme="light",s&&y.current&&s.setAttribute("content",y.current.light)):(n.length&&o.classList.remove(...n),r.length&&o.classList.add(...r),o.style.colorScheme="dark",s&&y.current&&s.setAttribute("content",y.current.dark))}return I.current?ye(i,P.current):i(),e});return{get current(){return d(t)}}}function gt(){const t=L(()=>{if(z.current,!A)return;function e(){document.documentElement.setAttribute("data-theme",z.current)}return I.current?ye(e,le(()=>P.current)):e(),z.current});return{get current(){return d(t)}}}const wt=mt(),yt=gt();function pt(t){q.current=t}function bt(t){z.current=t}function _t({defaultMode:t="system",themeColors:e,darkClassNames:r=["dark"],lightClassNames:n=[],defaultTheme:i="",modeStorageKey:o="mode-watcher-mode",themeStorageKey:s="mode-watcher-theme"}){const a=document.documentElement,c=localStorage.getItem(o)??t,l=localStorage.getItem(s)??i,f=c==="light"||c==="system"&&window.matchMedia("(prefers-color-scheme: light)").matches;if(f?(r.length&&a.classList.remove(...r.filter(Boolean)),n.length&&a.classList.add(...n.filter(Boolean))):(n.length&&a.classList.remove(...n.filter(Boolean)),r.length&&a.classList.add(...r.filter(Boolean))),a.style.colorScheme=f?"light":"dark",e){const h=document.querySelector('meta[name="theme-color"]');h&&h.setAttribute("content",c==="light"?e.light:e.dark)}l&&(a.setAttribute("data-theme",l),localStorage.setItem(s,l)),localStorage.setItem(o,c)}var vt=T('<meta name="theme-color"/>');function St(t,e){J(e,!0);var r=ce(),n=O(r);{var i=o=>{var s=vt();B(()=>Y(s,"content",e.themeColors.dark)),v(o,s)};Z(n,o=>{e.themeColors&&o(i)})}v(t,r),X()}var kt=T('<meta name="theme-color"/>'),Et=T("<!> <!>",1);function Mt(t,e){J(e,!0);let r=m(e,"trueNonce",3,"");fe("1funsus",n=>{var i=Et(),o=O(i);{var s=c=>{var l=kt();B(()=>Y(l,"content",e.themeColors.dark)),v(c,l)};Z(o,c=>{e.themeColors&&c(s)})}var a=de(o,2);Le(a,()=>`<script${r()?` nonce=${r()}`:""}>(`+_t.toString()+")("+JSON.stringify(e.initConfig)+");<\/script>"),v(n,i)}),X()}function Ct(t,e){J(e,!0);let r=m(e,"track",3,!0),n=m(e,"defaultMode",3,"system"),i=m(e,"disableTransitions",3,!0),o=m(e,"darkClassNames",19,()=>["dark"]),s=m(e,"lightClassNames",19,()=>[]),a=m(e,"defaultTheme",3,""),c=m(e,"nonce",3,""),l=m(e,"themeStorageKey",3,"mode-watcher-theme"),f=m(e,"modeStorageKey",3,"mode-watcher-mode"),h=m(e,"disableHeadScriptInjection",3,!1),$=m(e,"synchronousModeChanges",3,!1);p.current=f(),b.current=l(),K.current=o(),H.current=s(),I.current=i(),y.current=e.themeColors,P.current=$(),g(()=>{P.current=$()}),g(()=>{I.current=i()}),g(()=>{y.current=e.themeColors}),g(()=>{K.current=o()}),g(()=>{H.current=s()}),g(()=>{p.current=f()}),g(()=>{b.current=l()}),g(()=>{wt.current,p.current,b.current,yt.current}),Ne(()=>{D.tracking(r()),D.query();const w=localStorage.getItem(p.current);pt(W(w)?w:n());const ke=localStorage.getItem(b.current);bt(ke||a())});const pe={defaultMode:n(),themeColors:e.themeColors,darkClassNames:o(),lightClassNames:s(),defaultTheme:a(),modeStorageKey:f(),themeStorageKey:l()},be=L(()=>typeof window>"u"?c():"");var ee=ce(),_e=O(ee);{var ve=w=>{St(w,{get themeColors(){return y.current}})},Se=w=>{Mt(w,{get trueNonce(){return d(be)},get initConfig(){return pe},get themeColors(){return y.current}})};Z(_e,w=>{h()?w(ve):w(Se,!1)})}v(t,ee),X()}const Tt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='107'%20height='128'%20viewBox='0%200%20107%20128'%3e%3ctitle%3esvelte-logo%3c/title%3e%3cpath%20d='M94.157%2022.819c-10.4-14.885-30.94-19.297-45.792-9.835L22.282%2029.608A29.92%2029.92%200%200%200%208.764%2049.65a31.5%2031.5%200%200%200%203.108%2020.231%2030%2030%200%200%200-4.477%2011.183%2031.9%2031.9%200%200%200%205.448%2024.116c10.402%2014.887%2030.942%2019.297%2045.791%209.835l26.083-16.624A29.92%2029.92%200%200%200%2098.235%2078.35a31.53%2031.53%200%200%200-3.105-20.232%2030%2030%200%200%200%204.474-11.182%2031.88%2031.88%200%200%200-5.447-24.116'%20style='fill:%23ff3e00'/%3e%3cpath%20d='M45.817%20106.582a20.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.503%2018%2018%200%200%201%20.624-2.435l.49-1.498%201.337.981a33.6%2033.6%200%200%200%2010.203%205.098l.97.294-.09.968a5.85%205.85%200%200%200%201.052%203.878%206.24%206.24%200%200%200%206.695%202.485%205.8%205.8%200%200%200%201.603-.704L69.27%2076.28a5.43%205.43%200%200%200%202.45-3.631%205.8%205.8%200%200%200-.987-4.371%206.24%206.24%200%200%200-6.698-2.487%205.7%205.7%200%200%200-1.6.704l-9.953%206.345a19%2019%200%200%201-5.296%202.326%2020.72%2020.72%200%200%201-22.237-8.243%2019.17%2019.17%200%200%201-3.277-14.502%2017.99%2017.99%200%200%201%208.13-12.052l26.081-16.623a19%2019%200%200%201%205.3-2.329%2020.72%2020.72%200%200%201%2022.237%208.243%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-.624%202.435l-.49%201.498-1.337-.98a33.6%2033.6%200%200%200-10.203-5.1l-.97-.294.09-.968a5.86%205.86%200%200%200-1.052-3.878%206.24%206.24%200%200%200-6.696-2.485%205.8%205.8%200%200%200-1.602.704L37.73%2051.72a5.42%205.42%200%200%200-2.449%203.63%205.79%205.79%200%200%200%20.986%204.372%206.24%206.24%200%200%200%206.698%202.486%205.8%205.8%200%200%200%201.602-.704l9.952-6.342a19%2019%200%200%201%205.295-2.328%2020.72%2020.72%200%200%201%2022.237%208.242%2019.17%2019.17%200%200%201%203.277%2014.503%2018%2018%200%200%201-8.13%2012.053l-26.081%2016.622a19%2019%200%200%201-5.3%202.328'%20style='fill:%23fff'/%3e%3c/svg%3e";var xt=T('<link rel="icon"/>'),At=T("<!> <!>",1);function Ft(t,e){var r=At();fe("12qhfyh",o=>{var s=xt();B(()=>Y(s,"href",Tt)),v(o,s)});var n=O(r);Ct(n,{});var i=de(n,2);Be(i,()=>e.children),v(t,r)}export{Ft as component,Ot as universal};