Merak-7B-v2
/
FINAL_LOGO
/IllusionDiffusion - a Hugging Face Space by AP123_6_files
/a_data
/index-59874607.js
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))o(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function r(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(n){if(n.ep)return;n.ep=!0;const i=r(n);fetch(n.href,i)}})();var Ac=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function so(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Et={},et={},sr={exports:{}},F=String,lo=function(){return{isColorSupported:!1,reset:F,bold:F,dim:F,italic:F,underline:F,inverse:F,hidden:F,strikethrough:F,black:F,red:F,green:F,yellow:F,blue:F,magenta:F,cyan:F,white:F,gray:F,bgBlack:F,bgRed:F,bgGreen:F,bgYellow:F,bgBlue:F,bgMagenta:F,bgCyan:F,bgWhite:F}};sr.exports=lo();sr.exports.createColors=lo;var Hi=sr.exports;Object.defineProperty(et,"__esModule",{value:!0});et.dim=Ni;et.default=void 0;var ve=Ci(Hi);function Ci(e){return e&&e.__esModule?e:{default:e}}let gr=new Set;function Ht(e,t,r){typeof process<"u"&&{}.JEST_WORKER_ID||r&&gr.has(r)||(r&&gr.add(r),console.warn(""),t.forEach(o=>console.warn(e,"-",o)))}function Ni(e){return ve.default.dim(e)}var Oi={info(e,t){Ht(ve.default.bold(ve.default.cyan("info")),...Array.isArray(e)?[e]:[t,e])},warn(e,t){Ht(ve.default.bold(ve.default.yellow("warn")),...Array.isArray(e)?[e]:[t,e])},risk(e,t){Ht(ve.default.bold(ve.default.magenta("risk")),...Array.isArray(e)?[e]:[t,e])}};et.default=Oi;Object.defineProperty(Et,"__esModule",{value:!0});Et.default=void 0;var Mi=Ii(et);function Ii(e){return e&&e.__esModule?e:{default:e}}function qe({version:e,from:t,to:r}){Mi.default.warn(`${t}-color-renamed`,[`As of Tailwind CSS ${e}, \`${t}\` has been renamed to \`${r}\`.`,"Update your configuration file to silence this warning."])}var Li={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},get lightBlue(){return qe({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return qe({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return qe({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return qe({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return qe({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}};Et.default=Li;let Ct=Et;var Ri=(Ct.__esModule?Ct:{default:Ct}).default;const mr=so(Ri),Tc=["red","green","blue","yellow","purple","teal","orange","cyan","lime","pink"],zi=[{color:"red",primary:600,secondary:100},{color:"green",primary:600,secondary:100},{color:"blue",primary:600,secondary:100},{color:"yellow",primary:500,secondary:100},{color:"purple",primary:600,secondary:100},{color:"teal",primary:600,secondary:100},{color:"orange",primary:600,secondary:100},{color:"cyan",primary:600,secondary:100},{color:"lime",primary:500,secondary:100},{color:"pink",primary:600,secondary:100}],Bc=zi.reduce((e,{color:t,primary:r,secondary:o})=>({...e,[t]:{primary:mr[t][r],secondary:mr[t][o]}}),{}),Di="modulepreload",ji=function(e,t){return new URL(e,t).href},br={},pt=function(t,r,o){if(!r||r.length===0)return t();const n=document.getElementsByTagName("link");return Promise.all(r.map(i=>{if(i=ji(i,o),i in br)return;br[i]=!0;const a=i.endsWith(".css"),l=a?'[rel="stylesheet"]':"";if(!!o)for(let c=n.length-1;c>=0;c--){const f=n[c];if(f.href===i&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${l}`))return;const s=document.createElement("link");if(s.rel=a?"stylesheet":Di,a||(s.as="script",s.crossOrigin=""),s.href=i,document.head.appendChild(s),a)return new Promise((c,f)=>{s.addEventListener("load",c),s.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())};var Nt=new Intl.Collator(0,{numeric:1}).compare;function yr(e,t,r){return e=e.split("."),t=t.split("."),Nt(e[0],t[0])||Nt(e[1],t[1])||(t[2]=t.slice(2).join("."),r=/[.-]/.test(e[2]=e.slice(2).join(".")),r==/[.-]/.test(t[2])?Nt(e[2],t[2]):r?-1:1)}function Ot(e){if(e.startsWith("http")){const{protocol:t,host:r}=new URL(e);return r.endsWith("hf.space")?{ws_protocol:"wss",host:r,http_protocol:t}:{ws_protocol:t==="https:"?"wss":"ws",http_protocol:t,host:r}}return{ws_protocol:"wss",http_protocol:"https:",host:e}}const co=/^[^\/]*\/[^\/]*$/,Ui=/.*hf\.space\/{0,1}$/;async function Gi(e,t){const r={};t&&(r.Authorization=`Bearer ${t}`);const o=e.trim();if(co.test(o))try{const n=await fetch(`https://huggingface.co/api/spaces/${o}/host`,{headers:r});if(n.status!==200)throw new Error("Space metadata could not be loaded.");const i=(await n.json()).host;return{space_id:e,...Ot(i)}}catch(n){throw new Error("Space metadata could not be loaded."+n.message)}if(Ui.test(o)){const{ws_protocol:n,http_protocol:i,host:a}=Ot(o);return{space_id:a.replace(".hf.space",""),ws_protocol:n,http_protocol:i,host:a}}return{space_id:!1,...Ot(o)}}function Fi(e){let t={};return e.forEach(({api_name:r},o)=>{r&&(t[r]=o)}),t}const qi=/^(?=[^]*\b[dD]iscussions{0,1}\b)(?=[^]*\b[dD]isabled\b)[^]*$/;async function vr(e){try{const r=(await fetch(`https://huggingface.co/api/spaces/${e}/discussions`,{method:"HEAD"})).headers.get("x-error-message");return!(r&&qi.test(r))}catch{return!1}}const Vi="This application is too busy. Keep trying!",it="Connection errored out.";let uo;function Xi(e){return{post_data:t,upload_files:r,client:o,handle_blob:n};async function t(i,a,l){const u={"Content-Type":"application/json"};l&&(u.Authorization=`Bearer ${l}`);try{var s=await e(i,{method:"POST",body:JSON.stringify(a),headers:u})}catch{return[{error:it},500]}return[await s.json(),s.status]}async function r(i,a,l){const u={};l&&(u.Authorization=`Bearer ${l}`);const s=1e3,c=[];for(let d=0;d<a.length;d+=s){const _=a.slice(d,d+s),p=new FormData;_.forEach(y=>{p.append("files",y)});try{var f=await e(`${i}/upload`,{method:"POST",body:p,headers:u})}catch{return{error:it}}const g=await f.json();c.push(...g)}return{files:c}}async function o(i,a={normalise_files:!0}){return new Promise(async l=>{const{status_callback:u,hf_token:s,normalise_files:c}=a,f={predict:j,submit:X,view_api:U},d=c??!0;if(typeof window>"u"||!("WebSocket"in window)){const C=await pt(()=>import("./wrapper-6f348d45-38be7a64.js"),["./wrapper-6f348d45-38be7a64.js","./__vite-browser-external-b25bb000.js"],import.meta.url);uo=(await pt(()=>import("./__vite-browser-external-b25bb000.js"),[],import.meta.url)).Blob,global.WebSocket=C.WebSocket}const{ws_protocol:_,http_protocol:p,host:g,space_id:y}=await Gi(i,s),w=Math.random().toString(36).substring(2),E={};let h,v={},A=!1;s&&y&&(A=await Zi(y,s));async function I(C){if(h=C,v=Fi(C?.dependencies||[]),h.auth_required)return{config:h,...f};try{S=await U(h)}catch(R){console.error(`Could not get api details: ${R.message}`)}return{config:h,...f}}let S;async function H(C){if(u&&u(C),C.status==="running")try{h=await Ar(e,`${p}//${g}`,s);const R=await I(h);l(R)}catch(R){console.error(R),u&&u({status:"error",message:"Could not load this space.",load_status:"error",detail:"NOT_FOUND"})}}try{h=await Ar(e,`${p}//${g}`,s);const C=await I(h);l(C)}catch(C){console.error(C),y?qt(y,co.test(y)?"space_name":"subdomain",H):u&&u({status:"error",message:"Could not load this space.",load_status:"error",detail:"NOT_FOUND"})}function j(C,R,oe){let P=!1,ue=!1,W;if(typeof C=="number")W=h.dependencies[C];else{const L=C.replace(/^\//,"");W=h.dependencies[v[L]]}if(W.types.continuous)throw new Error("Cannot call predict on this function as it may run forever. Use submit instead");return new Promise((L,ee)=>{const le=X(C,R,oe);let fe;le.on("data",G=>{ue&&(le.destroy(),L(G)),P=!0,fe=G}).on("status",G=>{G.stage==="error"&&ee(G),G.stage==="complete"&&(ue=!0,le.destroy(),P&&L(fe))})})}function X(C,R,oe){let P,ue;if(typeof C=="number")P=C,ue=S.unnamed_endpoints[P];else{const J=C.replace(/^\//,"");P=v[J],ue=S.named_endpoints[C.trim()]}if(typeof P!="number")throw new Error("There is no endpoint matching that name of fn_index matching that number.");let W;const L=typeof C=="number"?"/predict":C;let ee,le=!1;const fe={};n(`${p}//${g+h.path}`,R,ue,s).then(J=>{if(ee={data:J||[],event_data:oe,fn_index:P},Yi(P,h))G({type:"status",endpoint:L,stage:"pending",queue:!1,fn_index:P,time:new Date}),t(`${p}//${g+h.path}/run${L.startsWith("/")?L:`/${L}`}`,{...ee,session_hash:w},s).then(([Q,ne])=>{const ie=d?Er(Q.data,ue,h.root,h.root_url):Q.data;ne==200?(G({type:"data",endpoint:L,fn_index:P,data:ie,time:new Date}),G({type:"status",endpoint:L,fn_index:P,stage:"complete",eta:Q.average_duration,queue:!1,time:new Date})):G({type:"status",stage:"error",endpoint:L,fn_index:P,message:Q.error,queue:!1,time:new Date})}).catch(Q=>{G({type:"status",stage:"error",message:Q.message,endpoint:L,fn_index:P,queue:!1,time:new Date})});else{G({type:"status",stage:"pending",queue:!0,endpoint:L,fn_index:P,time:new Date});let Q=new URL(`${_}://${g}${h.path} | |
/queue/join`);A&&Q.searchParams.set("__sign",A),W=new WebSocket(Q),W.onclose=ne=>{ne.wasClean||G({type:"status",stage:"error",broken:!0,message:it,queue:!0,endpoint:L,fn_index:P,time:new Date})},W.onmessage=function(ne){const ie=JSON.parse(ne.data),{type:m,status:Z,data:V}=Qi(ie,E[P]);if(m==="update"&&Z&&!le)G({type:"status",endpoint:L,fn_index:P,time:new Date,...Z}),Z.stage==="error"&&W.close();else if(m==="hash"){W.send(JSON.stringify({fn_index:P,session_hash:w}));return}else m==="data"?W.send(JSON.stringify({...ee,session_hash:w})):m==="complete"?le=Z:m==="log"?G({type:"log",log:V.log,level:V.level,endpoint:L,fn_index:P}):m==="generating"&&G({type:"status",time:new Date,...Z,stage:Z?.stage,queue:!0,endpoint:L,fn_index:P});V&&(G({type:"data",time:new Date,data:d?Er(V.data,ue,h.root,h.root_url):V.data,endpoint:L,fn_index:P}),le&&(G({type:"status",time:new Date,...le,stage:Z?.stage,queue:!0,endpoint:L,fn_index:P}),W.close()))},yr(h.version||"2.0.0","3.6")<0&&addEventListener("open",()=>W.send(JSON.stringify({hash:w})))}});function G(J){const ne=fe[J.type]||[];ne?.forEach(ie=>ie(J))}function x(J,Q){const ne=fe,ie=ne[J]||[];return ne[J]=ie,ie?.push(Q),{on:x,off:Ae,cancel:Ge,destroy:Fe}}function Ae(J,Q){const ne=fe;let ie=ne[J]||[];return ie=ie?.filter(m=>m!==Q),ne[J]=ie,{on:x,off:Ae,cancel:Ge,destroy:Fe}}async function Ge(){const J={stage:"complete",queue:!1,time:new Date};le=J,G({...J,type:"status",endpoint:L,fn_index:P}),W&&W.readyState===0?W.addEventListener("open",()=>{W.close()}):W.close();try{await e(`${p}//${g+h.path}/reset`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({fn_index:P,session_hash:w})})}catch{console.warn("The `/reset` endpoint could not be called. Subsequent endpoint results may be unreliable.")}}function Fe(){for(const J in fe)fe[J].forEach(Q=>{Ae(J,Q)})}return{on:x,off:Ae,cancel:Ge,destroy:Fe}}async function U(C){if(S)return S;const R={"Content-Type":"application/json"};s&&(R.Authorization=`Bearer ${s}`);let oe;if(yr(C.version||"2.0.0","3.30")<0?oe=await e("https://gradio-space-api-fetcher-v2.hf.space/api",{method:"POST",body:JSON.stringify({serialize:!1,config:JSON.stringify(C)}),headers:R}):oe=await e(`${C.root}/info`,{headers:R}),!oe.ok)throw new Error(it);let P=await oe.json();return"api"in P&&(P=P.api),P.named_endpoints["/predict"]&&!P.unnamed_endpoints[0]&&(P.unnamed_endpoints[0]=P.named_endpoints["/predict"]),Wi(P,C,v)}})}async function n(i,a,l,u){const s=await Ft(a,void 0,[],!0,l);return Promise.all(s.map(async({path:c,blob:f,data:d,type:_})=>{if(f){const p=(await r(i,[f],u)).files[0];return{path:c,file_url:p,type:_}}return{path:c,base64:d,type:_}})).then(c=>(c.forEach(({path:f,file_url:d,base64:_,type:p})=>{if(_)Mt(a,_,f);else if(p==="Gallery")Mt(a,d,f);else if(d){const g={is_file:!0,name:`${d}`,data:null};Mt(a,g,f)}}),a))}}const{post_data:Pc,upload_files:wr,client:xr,handle_blob:Hc}=Xi(fetch);function Er(e,t,r,o){return e.map((n,i)=>{var a,l,u,s;return((l=(a=t?.returns)==null?void 0:a[i])==null?void 0:l.component)==="File"?We(n,r,o):((s=(u=t?.returns)==null?void 0:u[i])==null?void 0:s.component)==="Gallery"?n.map(c=>Array.isArray(c)?[We(c[0],r,o),c[1]]:[We(c,r,o),null]):typeof n=="object"&&n?.is_file?We(n,r,o):n})}function We(e,t,r){if(e==null)return null;if(typeof e=="string")return{name:"file_data",data:e};if(Array.isArray(e)){const o=[];for(const n of e)n===null?o.push(null):o.push(We(n,t,r));return o}else e.is_file&&(r?e.data="/proxy="+r+"file="+e.name:e.data=t+"/file="+e.name);return e}function Sr(e,t,r,o){switch(e.type){case"string":return"string";case"boolean":return"boolean";case"number":return"number"}if(r==="JSONSerializable"||r==="StringSerializable")return"any";if(r==="ListStringSerializable")return"string[]";if(t==="Image")return o==="parameter"?"Blob | File | Buffer":"string";if(r==="FileSerializable")return e?.type==="array"?o==="parameter"?"(Blob | File | Buffer)[]":"{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}[]":o==="parameter"?"Blob | File | Buffer":"{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}";if(r==="GallerySerializable")return o==="parameter"?"[(Blob | File | Buffer), (string | null)][]":"[{ name: string; data: string; size?: number; is_file?: boolean; orig_name?: string}, (string | null))][]"}function kr(e,t){return t==="GallerySerializable"?"array of [file, label] tuples":t==="ListStringSerializable"?"array of strings":t==="FileSerializable"?"array of files or single file":e.description}function Wi(e,t,r){const o={named_endpoints:{},unnamed_endpoints:{}};for(const n in e){const i=e[n];for(const a in i){const l=t.dependencies[a]?a:r[a.replace("/","")],u=i[a];o[n][a]={},o[n][a].parameters={},o[n][a].returns={},o[n][a].type=t.dependencies[l].types,o[n][a].parameters=u.parameters.map(({label:s,component:c,type:f,serializer:d})=>({label:s,component:c,type:Sr(f,c,d,"parameter"),description:kr(f,d)})),o[n][a].returns=u.returns.map(({label:s,component:c,type:f,serializer:d})=>({label:s,component:c,type:Sr(f,c,d,"return"),description:kr(f,d)}))}}return o}async function Zi(e,t){try{return(await(await fetch(`https://huggingface.co/api/spaces/${e}/jwt`,{headers:{Authorization:`Bearer ${t}`}})).json()).token||!1}catch(r){return console.error(r),!1}}function Mt(e,t,r){for(;r.length>1;)e=e[r.shift()];e[r.shift()]=t}async function Ft(e,t=void 0,r=[],o=!1,n=void 0){if(Array.isArray(e)){let i=[];return await Promise.all(e.map(async(a,l)=>{var u;let s=r.slice();s.push(l);const c=await Ft(e[l],o?((u=n?.parameters[l])==null?void 0:u.component)||void 0:t,s,!1,n);i=i.concat(c)})),i}else if(globalThis.Buffer&&e instanceof globalThis.Buffer){const i=t==="Image";return[{path:r,blob:i?!1:new uo([e]),data:i?`${e.toString("base64")}`:!1,type:t}]}else if(e instanceof Blob||typeof window<"u"&&e instanceof File){if(t==="Image"){let i;if(typeof window<"u")i=await Ji(e);else{const a=await e.arrayBuffer();i=Buffer.from(a).toString("base64")}return[{path:r,data:i,type:t,blob:!1}]}return[{path:r,blob:e,type:t,data:!1}]}else if(typeof e=="object"){let i=[];for(let a in e)if(e.hasOwnProperty(a)){let l=r.slice();l.push(a),i=i.concat(await Ft(e[a],void 0,l,!1,n))}return i}return[]}function Ji(e){return new Promise((t,r)=>{const o=new FileReader;o.onloadend=()=>t(o.result),o.readAsDataURL(e)})}function Yi(e,t){var r,o,n,i;return!(((o=(r=t?.dependencies)==null?void 0:r[e])==null?void 0:o.queue)===null?t.enable_queue:(i=(n=t?.dependencies)==null?void 0:n[e])!=null&&i.queue)||!1}async function Ar(e,t,r){const o={};if(r&&(o.Authorization=`Bearer ${r}`),typeof window<"u"&&window.gradio_config&&location.origin!=="http://localhost:9876"&&!window.gradio_config.dev_mode){const n=window.gradio_config.root,i=window.gradio_config;return i.root=t+i.root,{...i,path:n}}else if(t){let n=await e(`${t}/config`,{headers:o});if(n.status===200){const i=await n.json();return i.path=i.path??"",i.root=t,i}throw new Error("Could not get config.")}throw new Error("No config or app endpoint found")}async function qt(e,t,r){let o=t==="subdomain"?`https://huggingface.co/api/spaces/by-subdomain/${e}`:`https://huggingface.co/api/spaces/${e}`,n,i;try{if(n=await fetch(o),i=n.status,i!==200)throw new Error;n=await n.json()}catch{r({status:"error",load_status:"error",message:"Could not get space status",detail:"NOT_FOUND"});return}if(!n||i!==200)return;const{runtime:{stage:a},id:l}=n;switch(a){case"STOPPED":case"SLEEPING":r({status:"sleeping",load_status:"pending",message:"Space is asleep. Waking it up...",detail:a}),setTimeout(()=>{qt(e,t,r)},1e3);break;case"PAUSED":r({status:"paused",load_status:"error",message:"This space has been paused by the author. If you would like to try this demo, consider duplicating the space.",detail:a,discussions_enabled:await vr(l)});break;case"RUNNING":case"RUNNING_BUILDING":r({status:"running",load_status:"complete",message:"",detail:a});break;case"BUILDING":r({status:"building",load_status:"pending",message:"Space is building...",detail:a}),setTimeout(()=>{qt(e,t,r)},1e3);break;default:r({status:"space_error",load_status:"error",message:"This space is experiencing an issue.",detail:a,discussions_enabled:await vr(l)});break}}function Qi(e,t){switch(e.msg){case"send_data":return{type:"data"};case"send_hash":return{type:"hash"};case"queue_full":return{type:"update",status:{queue:!0,message:Vi,stage:"error",code:e.code,success:e.success}};case"estimation":return{type:"update",status:{queue:!0,stage:t||"pending",code:e.code,size:e.queue_size,position:e.rank,eta:e.rank_eta,success:e.success}};case"progress":return{type:"update",status:{queue:!0,stage:"pending",code:e.code,progress_data:e.progress_data,success:e.success}};case"log":return{type:"log",data:e};case"process_generating":return{type:"generating",status:{queue:!0,message:e.success?null:e.output.error,stage:e.success?"generating":"error",code:e.code,progress_data:e.progress_data,eta:e.average_duration},data:e.success?e.output:null};case"process_completed":return"error"in e.output?{type:"update",status:{queue:!0,message:e.output.error,stage:"error",code:e.code,success:e.success}}:{type:"complete",status:{queue:!0,message:e.success?void 0:e.output.error,stage:e.success?"complete":"error",code:e.code,progress_data:e.progress_data,eta:e.output.average_duration},data:e.success?e.output:null};case"process_starts":return{type:"update",status:{queue:!0,stage:"pending",code:e.code,size:e.rank,position:0,success:e.success}}}return{type:"none",status:{stage:"error",queue:!0}}}function Vt(e,t){if(document.querySelector(`link[href='${e}']`))return Promise.resolve();const o=document.createElement("link");return o.rel="stylesheet",o.href=e,new Promise((n,i)=>{o.addEventListener("load",()=>n()),o.addEventListener("error",()=>{console.error(`Unable to preload CSS for ${e}`),n()}),t.appendChild(o)})}function K(){}const lr=e=>e;function fo(e,t){for(const r in t)e[r]=t[r];return e}function ho(e){return e()}function Tr(){return Object.create(null)}function pe(e){e.forEach(ho)}function Ee(e){return typeof e=="function"}function tt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let at;function Ki(e,t){return at||(at=document.createElement("a")),at.href=t,e===at.href}function $i(e){return Object.keys(e).length===0}function po(e,...t){if(e==null){for(const o of t)o(void 0);return K}const r=e.subscribe(...t);return r.unsubscribe?()=>r.unsubscribe():r}function xe(e,t,r){e.$$.on_destroy.push(po(t,r))}function _o(e,t,r,o){if(e){const n=go(e,t,r,o);return e[0](n)}}function go(e,t,r,o){return e[1]&&o?fo(r.ctx.slice(),e[1](o(t))):r.ctx}function mo(e,t,r,o){if(e[2]&&o){const n=e[2](o(r));if(t.dirty===void 0)return n;if(typeof n=="object"){const i=[],a=Math.max(t.dirty.length,n.length);for(let l=0;l<a;l+=1)i[l]=t.dirty[l]|n[l];return i}return t.dirty|n}return t.dirty}function bo(e,t,r,o,n,i){if(n){const a=go(t,r,o,i);e.p(a,n)}}function yo(e){if(e.ctx.length>32){const t=[],r=e.ctx.length/32;for(let o=0;o<r;o++)t[o]=-1;return t}return-1}function Cc(e){return e??""}function Nc(e,t,r){return e.set(r),t}function Oc(e){return e&&Ee(e.destroy)?e.destroy:K}function Mc(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}const vo=typeof window<"u";let Ye=vo?()=>window.performance.now():()=>Date.now(),cr=vo?e=>requestAnimationFrame(e):K;const Ce=new Set;function wo(e){Ce.forEach(t=>{t.c(e)||(Ce.delete(t),t.f())}),Ce.size!==0&&cr(wo)}function St(e){let t;return Ce.size===0&&cr(wo),{promise:new Promise(r=>{Ce.add(t={c:e,f:r})}),abort(){Ce.delete(t)}}}const ea=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;"WeakMap"in ea;function B(e,t){e.appendChild(t)}function xo(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function ta(e){const t=D("style");return t.textContent="/* empty */",ra(xo(e),t),t.sheet}function ra(e,t){return B(e.head||e,t),t.sheet}function T(e,t,r){e.insertBefore(t,r||null)}function k(e){e.parentNode&&e.parentNode.removeChild(e)}function Eo(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}function D(e){return document.createElement(e)}function de(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function O(e){return document.createTextNode(e)}function te(){return O(" ")}function Se(){return O("")}function Br(e,t,r,o){return e.addEventListener(t,r,o),()=>e.removeEventListener(t,r,o)}function Ic(e){return function(t){return t.preventDefault(),e.call(this,t)}}function Lc(e){return function(t){return t.stopPropagation(),e.call(this,t)}}function b(e,t,r){r==null?e.removeAttribute(t):e.getAttribute(t)!==r&&e.setAttribute(t,r)}const oa=["width","height"];function na(e,t){const r=Object.getOwnPropertyDescriptors(e.__proto__);for(const o in t)t[o]==null?e.removeAttribute(o):o==="style"?e.style.cssText=t[o]:o==="__value"?e.value=e[o]=t[o]:r[o]&&r[o].set&&oa.indexOf(o)===-1?e[o]=t[o]:b(e,o,t[o])}function ia(e,t){Object.keys(t).forEach(r=>{aa(e,r,t[r])})}function aa(e,t,r){t in e?e[t]=typeof e[t]=="boolean"&&r===""?!0:r:b(e,t,r)}function Rc(e){return/-/.test(e)?ia:na}function zc(e){let t;return{p(...r){t=r,t.forEach(o=>e.push(o))},r(){t.forEach(r=>e.splice(e.indexOf(r),1))}}}function Dc(e){return e===""?null:+e}function sa(e){return Array.from(e.childNodes)}function re(e,t){t=""+t,e.data!==t&&(e.data=t)}function jc(e,t){e.value=t??""}function ae(e,t,r,o){r==null?e.style.removeProperty(t):e.style.setProperty(t,r,o?"important":"")}let st;function la(){if(st===void 0){st=!1;try{typeof window<"u"&&window.parent&&window.parent.document}catch{st=!0}}return st}function Uc(e,t){getComputedStyle(e).position==="static"&&(e.style.position="relative");const o=D("iframe");o.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),o.setAttribute("aria-hidden","true"),o.tabIndex=-1;const n=la();let i;return n?(o.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",i=Br(window,"message",a=>{a.source===o.contentWindow&&t()})):(o.src="about:blank",o.onload=()=>{i=Br(o.contentWindow,"resize",t),t()}),B(e,o),()=>{(n||i&&o.contentWindow)&&i(),k(o)}}function Y(e,t,r){e.classList.toggle(t,!!r)}function So(e,t,{bubbles:r=!1,cancelable:o=!1}={}){return new CustomEvent(e,{detail:t,bubbles:r,cancelable:o})}class Gc{is_svg=!1;e=void 0;n=void 0;t=void 0;a=void 0;constructor(t=!1){this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,r,o=null){this.e||(this.is_svg?this.e=de(r.nodeName):this.e=D(r.nodeType===11?"TEMPLATE":r.nodeName),this.t=r.tagName!=="TEMPLATE"?r:r.content,this.c(t)),this.i(o)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(t){for(let r=0;r<this.n.length;r+=1)T(this.t,this.n[r],t)}p(t){this.d(),this.h(t),this.i(this.a)}d(){this.n.forEach(k)}}function Fc(e,t){return new e(t)}const _t=new Map;let gt=0;function ca(e){let t=5381,r=e.length;for(;r--;)t=(t<<5)-t^e.charCodeAt(r);return t>>>0}function ua(e,t){const r={stylesheet:ta(t),rules:{}};return _t.set(e,r),r}function mt(e,t,r,o,n,i,a,l=0){const u=16.666/o;let s=`{ | |
`;for(let y=0;y<=1;y+=u){const w=t+(r-t)*i(y);s+=y*100+`%{${a(w,1-w)}} | |
`}const c=s+`100% {${a(r,1-r)}} | |
}`,f=`__svelte_${ca(c)}_${l}`,d=xo(e),{stylesheet:_,rules:p}=_t.get(d)||ua(d,e);p[f]||(p[f]=!0,_.insertRule(`@keyframes ${f} ${c}`,_.cssRules.length));const g=e.style.animation||"";return e.style.animation=`${g?`${g}, `:""}${f} ${o}ms linear ${n}ms 1 both`,gt+=1,f}function bt(e,t){const r=(e.style.animation||"").split(", "),o=r.filter(t?i=>i.indexOf(t)<0:i=>i.indexOf("__svelte")===-1),n=r.length-o.length;n&&(e.style.animation=o.join(", "),gt-=n,gt||fa())}function fa(){cr(()=>{gt||(_t.forEach(e=>{const{ownerNode:t}=e.stylesheet;t&&k(t)}),_t.clear())})}let Qe;function Je(e){Qe=e}function ke(){if(!Qe)throw new Error("Function called outside component initialization");return Qe}function qc(e){ke().$$.before_update.push(e)}function Xt(e){ke().$$.on_mount.push(e)}function Vc(e){ke().$$.after_update.push(e)}function da(e){ke().$$.on_destroy.push(e)}function Xc(){const e=ke();return(t,r,{cancelable:o=!1}={})=>{const n=e.$$.callbacks[t];if(n){const i=So(t,r,{cancelable:o});return n.slice().forEach(a=>{a.call(e,i)}),!i.defaultPrevented}return!0}}function ha(e,t){return ke().$$.context.set(e,t),t}function Wc(e){return ke().$$.context.get(e)}function Zc(e,t){const r=e.$$.callbacks[t.type];r&&r.slice().forEach(o=>o.call(this,t))}const Pe=[],me=[];let Ne=[];const Wt=[],ko=Promise.resolve();let Zt=!1;function Ao(){Zt||(Zt=!0,ko.then(To))}function pa(){return Ao(),ko}function Oe(e){Ne.push(e)}function Jt(e){Wt.push(e)}const It=new Set;let Te=0;function To(){if(Te!==0)return;const e=Qe;do{try{for(;Te<Pe.length;){const t=Pe[Te];Te++,Je(t),_a(t.$$)}}catch(t){throw Pe.length=0,Te=0,t}for(Je(null),Pe.length=0,Te=0;me.length;)me.pop()();for(let t=0;t<Ne.length;t+=1){const r=Ne[t];It.has(r)||(It.add(r),r())}Ne.length=0}while(Pe.length);for(;Wt.length;)Wt.pop()();Zt=!1,It.clear(),Je(e)}function _a(e){if(e.fragment!==null){e.update(),pe(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Oe)}}function ga(e){const t=[],r=[];Ne.forEach(o=>e.indexOf(o)===-1?t.push(o):r.push(o)),r.forEach(o=>o()),Ne=t}let Ve;function ur(){return Ve||(Ve=Promise.resolve(),Ve.then(()=>{Ve=null})),Ve}function we(e,t,r){e.dispatchEvent(So(`${t?"intro":"outro"}${r}`))}const ut=new Set;let he;function yt(){he={r:0,c:[],p:he}}function vt(){he.r||pe(he.c),he=he.p}function $(e,t){e&&e.i&&(ut.delete(e),e.i(t))}function se(e,t,r,o){if(e&&e.o){if(ut.has(e))return;ut.add(e),he.c.push(()=>{ut.delete(e),o&&(r&&e.d(1),o())}),e.o(t)}else o&&o()}const fr={duration:0};function Jc(e,t,r){const o={direction:"in"};let n=t(e,r,o),i=!1,a,l,u=0;function s(){a&&bt(e,a)}function c(){const{delay:d=0,duration:_=300,easing:p=lr,tick:g=K,css:y}=n||fr;y&&(a=mt(e,0,1,_,d,p,y,u++)),g(0,1);const w=Ye()+d,E=w+_;l&&l.abort(),i=!0,Oe(()=>we(e,!0,"start")),l=St(h=>{if(i){if(h>=E)return g(1,0),we(e,!0,"end"),s(),i=!1;if(h>=w){const v=p((h-w)/_);g(v,1-v)}}return i})}let f=!1;return{start(){f||(f=!0,bt(e),Ee(n)?(n=n(o),ur().then(c)):c())},invalidate(){f=!1},end(){i&&(s(),i=!1)}}}function Yc(e,t,r){const o={direction:"out"};let n=t(e,r,o),i=!0,a;const l=he;l.r+=1;let u;function s(){const{delay:c=0,duration:f=300,easing:d=lr,tick:_=K,css:p}=n||fr;p&&(a=mt(e,1,0,f,c,d,p));const g=Ye()+c,y=g+f;Oe(()=>we(e,!1,"start")),"inert"in e&&(u=e.inert,e.inert=!0),St(w=>{if(i){if(w>=y)return _(0,1),we(e,!1,"end"),--l.r||pe(l.c),!1;if(w>=g){const E=d((w-g)/f);_(1-E,E)}}return i})}return Ee(n)?ur().then(()=>{n=n(o),s()}):s(),{end(c){c&&"inert"in e&&(e.inert=u),c&&n.tick&&n.tick(1,0),i&&(a&&bt(e,a),i=!1)}}}function Qc(e,t,r,o){let i=t(e,r,{direction:"both"}),a=o?0:1,l=null,u=null,s=null,c;function f(){s&&bt(e,s)}function d(p,g){const y=p.b-a;return g*=Math.abs(y),{a,b:p.b,d:y,duration:g,start:p.start,end:p.start+g,group:p.group}}function _(p){const{delay:g=0,duration:y=300,easing:w=lr,tick:E=K,css:h}=i||fr,v={start:Ye()+g,b:p};p||(v.group=he,he.r+=1),"inert"in e&&(p?c!==void 0&&(e.inert=c):(c=e.inert,e.inert=!0)),l||u?u=v:(h&&(f(),s=mt(e,a,p,y,g,w,h)),p&&E(0,1),l=d(v,y),Oe(()=>we(e,p,"start")),St(A=>{if(u&&A>u.start&&(l=d(u,y),u=null,we(e,l.b,"start"),h&&(f(),s=mt(e,a,l.b,l.duration,0,w,i.css))),l){if(A>=l.end)E(a=l.b,1-a),we(e,l.b,"end"),u||(l.b?f():--l.group.r||pe(l.group.c)),l=null;else if(A>=l.start){const I=A-l.start;a=l.a+l.d*w(I/l.duration),E(a,1-a)}}return!!(l||u)}))}return{run(p){Ee(i)?ur().then(()=>{i=i({direction:p?"in":"out"}),_(p)}):_(p)},end(){f(),l=u=null}}}function wt(e){return e?.length!==void 0?e:Array.from(e)}function Kc(e,t){e.d(1),t.delete(e.key)}function ma(e,t){se(e,1,1,()=>{t.delete(e.key)})}function $c(e,t){e.f(),ma(e,t)}function eu(e,t,r,o,n,i,a,l,u,s,c,f){let d=e.length,_=i.length,p=d;const g={};for(;p--;)g[e[p].key]=p;const y=[],w=new Map,E=new Map,h=[];for(p=_;p--;){const S=f(n,i,p),H=r(S);let j=a.get(H);j?o&&h.push(()=>j.p(S,t)):(j=s(H,S),j.c()),w.set(H,y[p]=j),H in g&&E.set(H,Math.abs(p-g[H]))}const v=new Set,A=new Set;function I(S){$(S,1),S.m(l,c),a.set(S.key,S),c=S.first,_--}for(;d&&_;){const S=y[_-1],H=e[d-1],j=S.key,X=H.key;S===H?(c=S.first,d--,_--):w.has(X)?!a.has(j)||v.has(j)?I(S):A.has(X)?d--:E.get(j)>E.get(X)?(A.add(j),I(S)):(v.add(X),d--):(u(H,a),d--)}for(;d--;){const S=e[d];w.has(S.key)||u(S,a)}for(;_;)I(y[_-1]);return pe(h),y}function ba(e,t){const r={},o={},n={$$scope:1};let i=e.length;for(;i--;){const a=e[i],l=t[i];if(l){for(const u in a)u in l||(o[u]=1);for(const u in l)n[u]||(r[u]=l[u],n[u]=1);e[i]=l}else for(const u in a)n[u]=1}for(const a in o)a in r||(r[a]=void 0);return r}function ya(e){return typeof e=="object"&&e!==null?e:{}}const va=["allowfullscreen","allowpaymentrequest","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","hidden","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"];[...va];function Yt(e,t,r){const o=e.$$.props[t];o!==void 0&&(e.$$.bound[o]=r,r(e.$$.ctx[o]))}function rt(e){e&&e.c()}function ze(e,t,r){const{fragment:o,after_update:n}=e.$$;o&&o.m(t,r),Oe(()=>{const i=e.$$.on_mount.map(ho).filter(Ee);e.$$.on_destroy?e.$$.on_destroy.push(...i):pe(i),e.$$.on_mount=[]}),n.forEach(Oe)}function De(e,t){const r=e.$$;r.fragment!==null&&(ga(r.after_update),pe(r.on_destroy),r.fragment&&r.fragment.d(t),r.on_destroy=r.fragment=null,r.ctx=[])}function wa(e,t){e.$$.dirty[0]===-1&&(Pe.push(e),Ao(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function kt(e,t,r,o,n,i,a,l=[-1]){const u=Qe;Je(e);const s=e.$$={fragment:null,ctx:[],props:i,update:K,not_equal:n,bound:Tr(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:Tr(),dirty:l,skip_bound:!1,root:t.target||u.$$.root};a&&a(s.root);let c=!1;if(s.ctx=r?r(e,t.props||{},(f,d,..._)=>{const p=_.length?_[0]:d;return s.ctx&&n(s.ctx[f],s.ctx[f]=p)&&(!s.skip_bound&&s.bound[f]&&s.bound[f](p),c&&wa(e,f)),d}):[],s.update(),c=!0,pe(s.before_update),s.fragment=o?o(s.ctx):!1,t.target){if(t.hydrate){const f=sa(t.target);s.fragment&&s.fragment.l(f),f.forEach(k)}else s.fragment&&s.fragment.c();t.intro&&$(e.$$.fragment),ze(e,t.target,t.anchor),To()}Je(u)}class At{$$=void 0;$$set=void 0;$destroy(){De(this,1),this.$destroy=K}$on(t,r){if(!Ee(r))return K;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(r),()=>{const n=o.indexOf(r);n!==-1&&o.splice(n,1)}}$set(t){this.$$set&&!$i(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const xa="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(xa);const Be=[];function Ea(e,t){return{subscribe:be(e,t).subscribe}}function be(e,t=K){let r;const o=new Set;function n(l){if(tt(e,l)&&(e=l,r)){const u=!Be.length;for(const s of o)s[1](),Be.push(s,e);if(u){for(let s=0;s<Be.length;s+=2)Be[s][0](Be[s+1]);Be.length=0}}}function i(l){n(l(e))}function a(l,u=K){const s=[l,u];return o.add(s),o.size===1&&(r=t(n,i)||K),l(e),()=>{o.delete(s),o.size===0&&r&&(r(),r=null)}}return{set:n,update:i,subscribe:a}}function je(e,t,r){const o=!Array.isArray(e),n=o?[e]:e;if(!n.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const i=t.length<2;return Ea(r,(a,l)=>{let u=!1;const s=[];let c=0,f=K;const d=()=>{if(c)return;f();const p=t(o?s[0]:s,a,l);i?a(p):f=Ee(p)?p:K},_=n.map((p,g)=>po(p,y=>{s[g]=y,c&=~(1<<g),u&&d()},()=>{c|=1<<g}));return u=!0,d(),function(){pe(_),f(),u=!1}})}const Sa=""+new URL("spaces-a79177ad.svg",import.meta.url).href;var ka=function(t){return Aa(t)&&!Ta(t)};function Aa(e){return!!e&&typeof e=="object"}function Ta(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Ha(e)}var Ba=typeof Symbol=="function"&&Symbol.for,Pa=Ba?Symbol.for("react.element"):60103;function Ha(e){return e.$$typeof===Pa}function Ca(e){return Array.isArray(e)?[]:{}}function Ke(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Me(Ca(e),e,t):e}function Na(e,t,r){return e.concat(t).map(function(o){return Ke(o,r)})}function Oa(e,t){if(!t.customMerge)return Me;var r=t.customMerge(e);return typeof r=="function"?r:Me}function Ma(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function Pr(e){return Object.keys(e).concat(Ma(e))}function Bo(e,t){try{return t in e}catch{return!1}}function Ia(e,t){return Bo(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function La(e,t,r){var o={};return r.isMergeableObject(e)&&Pr(e).forEach(function(n){o[n]=Ke(e[n],r)}),Pr(t).forEach(function(n){Ia(e,n)||(Bo(e,n)&&r.isMergeableObject(t[n])?o[n]=Oa(n,r)(e[n],t[n],r):o[n]=Ke(t[n],r))}),o}function Me(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||Na,r.isMergeableObject=r.isMergeableObject||ka,r.cloneUnlessOtherwiseSpecified=Ke;var o=Array.isArray(t),n=Array.isArray(e),i=o===n;return i?o?r.arrayMerge(e,t,r):La(e,t,r):Ke(t,r)}Me.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(o,n){return Me(o,n,r)},{})};var Ra=Me,za=Ra;const Da=so(za);var Qt=function(e,t){return Qt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r[n]=o[n])},Qt(e,t)};function Tt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qt(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var z=function(){return z=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},z.apply(this,arguments)};function Lt(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,i;o<n;o++)(i||!(o in t))&&(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}var N;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(N||(N={}));var q;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(q||(q={}));var Ie;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ie||(Ie={}));function Hr(e){return e.type===q.literal}function ja(e){return e.type===q.argument}function Po(e){return e.type===q.number}function Ho(e){return e.type===q.date}function Co(e){return e.type===q.time}function No(e){return e.type===q.select}function Oo(e){return e.type===q.plural}function Ua(e){return e.type===q.pound}function Mo(e){return e.type===q.tag}function Io(e){return!!(e&&typeof e=="object"&&e.type===Ie.number)}function Kt(e){return!!(e&&typeof e=="object"&&e.type===Ie.dateTime)}var Lo=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ga=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Fa(e){var t={};return e.replace(Ga,function(r){var o=r.length;switch(r[0]){case"G":t.era=o===4?"long":o===5?"narrow":"short";break;case"y":t.year=o===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][o-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][o-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=o===4?"short":o===5?"narrow":"short";break;case"e":if(o<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][o-4];break;case"c":if(o<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][o-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][o-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][o-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][o-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][o-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][o-1];break;case"s":t.second=["numeric","2-digit"][o-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=o<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}var qa=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Va(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");for(var t=e.split(qa).filter(function(d){return d.length>0}),r=[],o=0,n=t;o<n.length;o++){var i=n[o],a=i.split("/");if(a.length===0)throw new Error("Invalid number skeleton");for(var l=a[0],u=a.slice(1),s=0,c=u;s<c.length;s++){var f=c[s];if(f.length===0)throw new Error("Invalid number skeleton")}r.push({stem:l,options:u})}return r}function Xa(e){return e.replace(/^(.*?)-/,"")}var Cr=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Ro=/^(@+)?(\+|#+)?[rs]?$/g,Wa=/(\*)(0+)|(#+)(0+)|(0+)/g,zo=/^(0+)$/;function Nr(e){var t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(Ro,function(r,o,n){return typeof n!="string"?(t.minimumSignificantDigits=o.length,t.maximumSignificantDigits=o.length):n==="+"?t.minimumSignificantDigits=o.length:o[0]==="#"?t.maximumSignificantDigits=o.length:(t.minimumSignificantDigits=o.length,t.maximumSignificantDigits=o.length+(typeof n=="string"?n.length:0)),""}),t}function Do(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Za(e){var t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){var r=e.slice(0,2);if(r==="+!"?(t.signDisplay="always",e=e.slice(2)):r==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!zo.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Or(e){var t={},r=Do(e);return r||t}function Ja(e){for(var t={},r=0,o=e;r<o.length;r++){var n=o[r];switch(n.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=n.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Xa(n.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=z(z(z({},t),{notation:"scientific"}),n.options.reduce(function(u,s){return z(z({},u),Or(s))},{}));continue;case"engineering":t=z(z(z({},t),{notation:"engineering"}),n.options.reduce(function(u,s){return z(z({},u),Or(s))},{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(n.options[0]);continue;case"integer-width":if(n.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");n.options[0].replace(Wa,function(u,s,c,f,d,_){if(s)t.minimumIntegerDigits=c.length;else{if(f&&d)throw new Error("We currently do not support maximum integer digits");if(_)throw new Error("We currently do not support exact integer digits")}return""});continue}if(zo.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(Cr.test(n.stem)){if(n.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(Cr,function(u,s,c,f,d,_){return c==="*"?t.minimumFractionDigits=s.length:f&&f[0]==="#"?t.maximumFractionDigits=f.length:d&&_?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+_.length):(t.minimumFractionDigits=s.length,t.maximumFractionDigits=s.length),""});var i=n.options[0];i==="w"?t=z(z({},t),{trailingZeroDisplay:"stripIfInteger"}):i&&(t=z(z({},t),Nr(i)));continue}if(Ro.test(n.stem)){t=z(z({},t),Nr(n.stem));continue}var a=Do(n.stem);a&&(t=z(z({},t),a));var l=Za(n.stem);l&&(t=z(z({},t),l))}return t}var lt={AX:["H"],BQ:["H"],CP:["H"],CZ:["H"],DK:["H"],FI:["H"],ID:["H"],IS:["H"],ML:["H"],NE:["H"],RU:["H"],SE:["H"],SJ:["H"],SK:["H"],AS:["h","H"],BT:["h","H"],DJ:["h","H"],ER:["h","H"],GH:["h","H"],IN:["h","H"],LS:["h","H"],PG:["h","H"],PW:["h","H"],SO:["h","H"],TO:["h","H"],VU:["h","H"],WS:["h","H"],"001":["H","h"],AL:["h","H","hB"],TD:["h","H","hB"],"ca-ES":["H","h","hB"],CF:["H","h","hB"],CM:["H","h","hB"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],LU:["H","h","hB"],NP:["H","h","hB"],PF:["H","h","hB"],SC:["H","h","hB"],SM:["H","h","hB"],SN:["H","h","hB"],TF:["H","h","hB"],VA:["H","h","hB"],CY:["h","H","hb","hB"],GR:["h","H","hb","hB"],CO:["h","H","hB","hb"],DO:["h","H","hB","hb"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],NA:["h","H","hB","hb"],PA:["h","H","hB","hb"],PR:["h","H","hB","hb"],VE:["h","H","hB","hb"],AC:["H","h","hb","hB"],AI:["H","h","hb","hB"],BW:["H","h","hb","hB"],BZ:["H","h","hb","hB"],CC:["H","h","hb","hB"],CK:["H","h","hb","hB"],CX:["H","h","hb","hB"],DG:["H","h","hb","hB"],FK:["H","h","hb","hB"],GB:["H","h","hb","hB"],GG:["H","h","hb","hB"],GI:["H","h","hb","hB"],IE:["H","h","hb","hB"],IM:["H","h","hb","hB"],IO:["H","h","hb","hB"],JE:["H","h","hb","hB"],LT:["H","h","hb","hB"],MK:["H","h","hb","hB"],MN:["H","h","hb","hB"],MS:["H","h","hb","hB"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],PN:["H","h","hb","hB"],SH:["H","h","hb","hB"],SX:["H","h","hb","hB"],TA:["H","h","hb","hB"],ZA:["H","h","hb","hB"],"af-ZA":["H","h","hB","hb"],AR:["H","h","hB","hb"],CL:["H","h","hB","hb"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],EA:["H","h","hB","hb"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],GT:["H","h","hB","hb"],HN:["H","h","hB","hb"],IC:["H","h","hB","hb"],KG:["H","h","hB","hb"],KM:["H","h","hB","hb"],LK:["H","h","hB","hb"],MA:["H","h","hB","hb"],MX:["H","h","hB","hb"],NI:["H","h","hB","hb"],PY:["H","h","hB","hb"],SV:["H","h","hB","hb"],UY:["H","h","hB","hb"],JP:["H","h","K"],AD:["H","hB"],AM:["H","hB"],AO:["H","hB"],AT:["H","hB"],AW:["H","hB"],BE:["H","hB"],BF:["H","hB"],BJ:["H","hB"],BL:["H","hB"],BR:["H","hB"],CG:["H","hB"],CI:["H","hB"],CV:["H","hB"],DE:["H","hB"],EE:["H","hB"],FR:["H","hB"],GA:["H","hB"],GF:["H","hB"],GN:["H","hB"],GP:["H","hB"],GW:["H","hB"],HR:["H","hB"],IL:["H","hB"],IT:["H","hB"],KZ:["H","hB"],MC:["H","hB"],MD:["H","hB"],MF:["H","hB"],MQ:["H","hB"],MZ:["H","hB"],NC:["H","hB"],NL:["H","hB"],PM:["H","hB"],PT:["H","hB"],RE:["H","hB"],RO:["H","hB"],SI:["H","hB"],SR:["H","hB"],ST:["H","hB"],TG:["H","hB"],TR:["H","hB"],WF:["H","hB"],YT:["H","hB"],BD:["h","hB","H"],PK:["h","hB","H"],AZ:["H","hB","h"],BA:["H","hB","h"],BG:["H","hB","h"],CH:["H","hB","h"],GE:["H","hB","h"],LI:["H","hB","h"],ME:["H","hB","h"],RS:["H","hB","h"],UA:["H","hB","h"],UZ:["H","hB","h"],XK:["H","hB","h"],AG:["h","hb","H","hB"],AU:["h","hb","H","hB"],BB:["h","hb","H","hB"],BM:["h","hb","H","hB"],BS:["h","hb","H","hB"],CA:["h","hb","H","hB"],DM:["h","hb","H","hB"],"en-001":["h","hb","H","hB"],FJ:["h","hb","H","hB"],FM:["h","hb","H","hB"],GD:["h","hb","H","hB"],GM:["h","hb","H","hB"],GU:["h","hb","H","hB"],GY:["h","hb","H","hB"],JM:["h","hb","H","hB"],KI:["h","hb","H","hB"],KN:["h","hb","H","hB"],KY:["h","hb","H","hB"],LC:["h","hb","H","hB"],LR:["h","hb","H","hB"],MH:["h","hb","H","hB"],MP:["h","hb","H","hB"],MW:["h","hb","H","hB"],NZ:["h","hb","H","hB"],SB:["h","hb","H","hB"],SG:["h","hb","H","hB"],SL:["h","hb","H","hB"],SS:["h","hb","H","hB"],SZ:["h","hb","H","hB"],TC:["h","hb","H","hB"],TT:["h","hb","H","hB"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],VC:["h","hb","H","hB"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],ZM:["h","hb","H","hB"],BO:["H","hB","h","hb"],EC:["H","hB","h","hb"],ES:["H","hB","h","hb"],GQ:["H","hB","h","hb"],PE:["H","hB","h","hb"],AE:["h","hB","hb","H"],"ar-001":["h","hB","hb","H"],BH:["h","hB","hb","H"],DZ:["h","hB","hb","H"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],HK:["h","hB","hb","H"],IQ:["h","hB","hb","H"],JO:["h","hB","hb","H"],KW:["h","hB","hb","H"],LB:["h","hB","hb","H"],LY:["h","hB","hb","H"],MO:["h","hB","hb","H"],MR:["h","hB","hb","H"],OM:["h","hB","hb","H"],PH:["h","hB","hb","H"],PS:["h","hB","hb","H"],QA:["h","hB","hb","H"],SA:["h","hB","hb","H"],SD:["h","hB","hb","H"],SY:["h","hB","hb","H"],TN:["h","hB","hb","H"],YE:["h","hB","hb","H"],AF:["H","hb","hB","h"],LA:["H","hb","hB","h"],CN:["H","hB","hb","h"],LV:["H","hB","hb","h"],TL:["H","hB","hb","h"],"zu-ZA":["H","hB","hb","h"],CD:["hB","H"],IR:["hB","H"],"hi-IN":["hB","h","H"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"te-IN":["hB","h","H"],KH:["hB","h","H","hb"],"ta-IN":["hB","h","hb","H"],BN:["hb","hB","h","H"],MY:["hb","hB","h","H"],ET:["hB","hb","h","H"],"gu-IN":["hB","hb","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],TW:["hB","hb","h","H"],KE:["hB","hb","H","h"],MM:["hB","hb","H","h"],TZ:["hB","hb","H","h"],UG:["hB","hb","H","h"]};function Ya(e,t){for(var r="",o=0;o<e.length;o++){var n=e.charAt(o);if(n==="j"){for(var i=0;o+1<e.length&&e.charAt(o+1)===n;)i++,o++;var a=1+(i&1),l=i<2?1:3+(i>>1),u="a",s=Qa(t);for((s=="H"||s=="k")&&(l=0);l-- >0;)r+=u;for(;a-- >0;)r=s+r}else n==="J"?r+="H":r+=n}return r}function Qa(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var r=e.language,o;r!=="root"&&(o=e.maximize().region);var n=lt[o||""]||lt[r||""]||lt["".concat(r,"-001")]||lt["001"];return n[0]}var Rt,Ka=new RegExp("^".concat(Lo.source,"*")),$a=new RegExp("".concat(Lo.source,"*$"));function M(e,t){return{start:e,end:t}}var es=!!String.prototype.startsWith,ts=!!String.fromCodePoint,rs=!!Object.fromEntries,os=!!String.prototype.codePointAt,ns=!!String.prototype.trimStart,is=!!String.prototype.trimEnd,as=!!Number.isSafeInteger,ss=as?Number.isSafeInteger:function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},$t=!0;try{var ls=Uo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");$t=((Rt=ls.exec("a"))===null||Rt===void 0?void 0:Rt[0])==="a"}catch{$t=!1}var Mr=es?function(t,r,o){return t.startsWith(r,o)}:function(t,r,o){return t.slice(o,o+r.length)===r},er=ts?String.fromCodePoint:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var o="",n=t.length,i=0,a;n>i;){if(a=t[i++],a>1114111)throw RangeError(a+" is not a valid code point");o+=a<65536?String.fromCharCode(a):String.fromCharCode(((a-=65536)>>10)+55296,a%1024+56320)}return o},Ir=rs?Object.fromEntries:function(t){for(var r={},o=0,n=t;o<n.length;o++){var i=n[o],a=i[0],l=i[1];r[a]=l}return r},jo=os?function(t,r){return t.codePointAt(r)}:function(t,r){var o=t.length;if(!(r<0||r>=o)){var n=t.charCodeAt(r),i;return n<55296||n>56319||r+1===o||(i=t.charCodeAt(r+1))<56320||i>57343?n:(n-55296<<10)+(i-56320)+65536}},cs=ns?function(t){return t.trimStart()}:function(t){return t.replace(Ka,"")},us=is?function(t){return t.trimEnd()}:function(t){return t.replace($a,"")};function Uo(e,t){return new RegExp(e,t)}var tr;if($t){var Lr=Uo("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");tr=function(t,r){var o;Lr.lastIndex=r;var n=Lr.exec(t);return(o=n[1])!==null&&o!==void 0?o:""}}else tr=function(t,r){for(var o=[];;){var n=jo(t,r);if(n===void 0||Go(n)||ps(n))break;o.push(n),r+=n>=65536?2:1}return er.apply(void 0,o)};var fs=function(){function e(t,r){r===void 0&&(r={}),this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!r.ignoreTag,this.locale=r.locale,this.requiresOtherClause=!!r.requiresOtherClause,this.shouldParseSkeletons=!!r.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(t,r,o){for(var n=[];!this.isEOF();){var i=this.char();if(i===123){var a=this.parseArgument(t,o);if(a.err)return a;n.push(a.val)}else{if(i===125&&t>0)break;if(i===35&&(r==="plural"||r==="selectordinal")){var l=this.clonePosition();this.bump(),n.push({type:q.pound,location:M(l,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(o)break;return this.error(N.UNMATCHED_CLOSING_TAG,M(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&rr(this.peek()||0)){var a=this.parseTag(t,r);if(a.err)return a;n.push(a.val)}else{var a=this.parseLiteral(t,r);if(a.err)return a;n.push(a.val)}}}return{val:n,err:null}},e.prototype.parseTag=function(t,r){var o=this.clonePosition();this.bump();var n=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:q.literal,value:"<".concat(n,"/>"),location:M(o,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(t+1,r,!0);if(i.err)return i;var a=i.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!rr(this.char()))return this.error(N.INVALID_TAG,M(l,this.clonePosition()));var u=this.clonePosition(),s=this.parseTagName();return n!==s?this.error(N.UNMATCHED_CLOSING_TAG,M(u,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:q.tag,value:n,children:a,location:M(o,this.clonePosition())},err:null}:this.error(N.INVALID_TAG,M(l,this.clonePosition())))}else return this.error(N.UNCLOSED_TAG,M(o,this.clonePosition()))}else return this.error(N.INVALID_TAG,M(o,this.clonePosition()))},e.prototype.parseTagName=function(){var t=this.offset();for(this.bump();!this.isEOF()&&hs(this.char());)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(t,r){for(var o=this.clonePosition(),n="";;){var i=this.tryParseQuote(r);if(i){n+=i;continue}var a=this.tryParseUnquoted(t,r);if(a){n+=a;continue}var l=this.tryParseLeftAngleBracket();if(l){n+=l;continue}break}var u=M(o,this.clonePosition());return{val:{type:q.literal,value:n,location:u},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!ds(this.peek()||0))?(this.bump(),"<"):null},e.prototype.tryParseQuote=function(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();var r=[this.char()];for(this.bump();!this.isEOF();){var o=this.char();if(o===39)if(this.peek()===39)r.push(39),this.bump();else{this.bump();break}else r.push(o);this.bump()}return er.apply(void 0,r)},e.prototype.tryParseUnquoted=function(t,r){if(this.isEOF())return null;var o=this.char();return o===60||o===123||o===35&&(r==="plural"||r==="selectordinal")||o===125&&t>0?null:(this.bump(),er(o))},e.prototype.parseArgument=function(t,r){var o=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(N.EXPECT_ARGUMENT_CLOSING_BRACE,M(o,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(N.EMPTY_ARGUMENT,M(o,this.clonePosition()));var n=this.parseIdentifierIfPossible().value;if(!n)return this.error(N.MALFORMED_ARGUMENT,M(o,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(N.EXPECT_ARGUMENT_CLOSING_BRACE,M(o,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:q.argument,value:n,location:M(o,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(N.EXPECT_ARGUMENT_CLOSING_BRACE,M(o,this.clonePosition())):this.parseArgumentOptions(t,r,n,o);default:return this.error(N.MALFORMED_ARGUMENT,M(o,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var t=this.clonePosition(),r=this.offset(),o=tr(this.message,r),n=r+o.length;this.bumpTo(n);var i=this.clonePosition(),a=M(t,i);return{value:o,location:a}},e.prototype.parseArgumentOptions=function(t,r,o,n){var i,a=this.clonePosition(),l=this.parseIdentifierIfPossible().value,u=this.clonePosition();switch(l){case"":return this.error(N.EXPECT_ARGUMENT_TYPE,M(a,u));case"number":case"date":case"time":{this.bumpSpace();var s=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;var d=us(f.val);if(d.length===0)return this.error(N.EXPECT_ARGUMENT_STYLE,M(this.clonePosition(),this.clonePosition()));var _=M(c,this.clonePosition());s={style:d,styleLocation:_}}var p=this.tryParseArgumentClose(n);if(p.err)return p;var g=M(n,this.clonePosition());if(s&&Mr(s?.style,"::",0)){var y=cs(s.style.slice(2));if(l==="number"){var f=this.parseNumberSkeletonFromString(y,s.styleLocation);return f.err?f:{val:{type:q.number,value:o,location:g,style:f.val},err:null}}else{if(y.length===0)return this.error(N.EXPECT_DATE_TIME_SKELETON,g);var w=y;this.locale&&(w=Ya(y,this.locale));var d={type:Ie.dateTime,pattern:w,location:s.styleLocation,parsedOptions:this.shouldParseSkeletons?Fa(w):{}},E=l==="date"?q.date:q.time;return{val:{type:E,value:o,location:g,style:d},err:null}}}return{val:{type:l==="number"?q.number:l==="date"?q.date:q.time,value:o,location:g,style:(i=s?.style)!==null&&i!==void 0?i:null},err:null}}case"plural":case"selectordinal":case"select":{var h=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(N.EXPECT_SELECT_ARGUMENT_OPTIONS,M(h,z({},h)));this.bumpSpace();var v=this.parseIdentifierIfPossible(),A=0;if(l!=="select"&&v.value==="offset"){if(!this.bumpIf(":"))return this.error(N.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,M(this.clonePosition(),this.clonePosition()));this.bumpSpace();var f=this.tryParseDecimalInteger(N.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,N.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(f.err)return f;this.bumpSpace(),v=this.parseIdentifierIfPossible(),A=f.val}var I=this.tryParsePluralOrSelectOptions(t,l,r,v);if(I.err)return I;var p=this.tryParseArgumentClose(n);if(p.err)return p;var S=M(n,this.clonePosition());return l==="select"?{val:{type:q.select,value:o,options:Ir(I.val),location:S},err:null}:{val:{type:q.plural,value:o,options:Ir(I.val),offset:A,pluralType:l==="plural"?"cardinal":"ordinal",location:S},err:null}}default:return this.error(N.INVALID_ARGUMENT_TYPE,M(a,u))}},e.prototype.tryParseArgumentClose=function(t){return this.isEOF()||this.char()!==125?this.error(N.EXPECT_ARGUMENT_CLOSING_BRACE,M(t,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var t=0,r=this.clonePosition();!this.isEOF();){var o=this.char();switch(o){case 39:{this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(N.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,M(n,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(r.offset,this.offset()),err:null};break}default:this.bump();break}}return{val:this.message.slice(r.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(t,r){var o=[];try{o=Va(t)}catch{return this.error(N.INVALID_NUMBER_SKELETON,r)}return{val:{type:Ie.number,tokens:o,location:r,parsedOptions:this.shouldParseSkeletons?Ja(o):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(t,r,o,n){for(var i,a=!1,l=[],u=new Set,s=n.value,c=n.location;;){if(s.length===0){var f=this.clonePosition();if(r!=="select"&&this.bumpIf("=")){var d=this.tryParseDecimalInteger(N.EXPECT_PLURAL_ARGUMENT_SELECTOR,N.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;c=M(f,this.clonePosition()),s=this.message.slice(f.offset,this.offset())}else break}if(u.has(s))return this.error(r==="select"?N.DUPLICATE_SELECT_ARGUMENT_SELECTOR:N.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);s==="other"&&(a=!0),this.bumpSpace();var _=this.clonePosition();if(!this.bumpIf("{"))return this.error(r==="select"?N.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:N.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,M(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(t+1,r,o);if(p.err)return p;var g=this.tryParseArgumentClose(_);if(g.err)return g;l.push([s,{value:p.val,location:M(_,this.clonePosition())}]),u.add(s),this.bumpSpace(),i=this.parseIdentifierIfPossible(),s=i.value,c=i.location}return l.length===0?this.error(r==="select"?N.EXPECT_SELECT_ARGUMENT_SELECTOR:N.EXPECT_PLURAL_ARGUMENT_SELECTOR,M(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(N.MISSING_OTHER_CLAUSE,M(this.clonePosition(),this.clonePosition())):{val:l,err:null}},e.prototype.tryParseDecimalInteger=function(t,r){var o=1,n=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(o=-1);for(var i=!1,a=0;!this.isEOF();){var l=this.char();if(l>=48&&l<=57)i=!0,a=a*10+(l-48),this.bump();else break}var u=M(n,this.clonePosition());return i?(a*=o,ss(a)?{val:a,err:null}:this.error(r,u)):this.error(t,u)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");var r=jo(this.message,t);if(r===void 0)throw Error("Offset ".concat(t," is at invalid UTF-16 code unit boundary"));return r},e.prototype.error=function(t,r){return{val:null,err:{kind:t,message:this.message,location:r}}},e.prototype.bump=function(){if(!this.isEOF()){var t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}},e.prototype.bumpIf=function(t){if(Mr(this.message,t,this.offset())){for(var r=0;r<t.length;r++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(t){var r=this.offset(),o=this.message.indexOf(t,r);return o>=0?(this.bumpTo(o),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(t){if(this.offset()>t)throw Error("targetOffset ".concat(t," must be greater than or equal to the current offset ").concat(this.offset()));for(t=Math.min(t,this.message.length);;){var r=this.offset();if(r===t)break;if(r>t)throw Error("targetOffset ".concat(t," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&Go(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var t=this.char(),r=this.offset(),o=this.message.charCodeAt(r+(t>=65536?2:1));return o??null},e}();function rr(e){return e>=97&&e<=122||e>=65&&e<=90}function ds(e){return rr(e)||e===47}function hs(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Go(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ps(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function or(e){e.forEach(function(t){if(delete t.location,No(t)||Oo(t))for(var r in t.options)delete t.options[r].location,or(t.options[r].value);else Po(t)&&Io(t.style)||(Ho(t)||Co(t))&&Kt(t.style)?delete t.style.location:Mo(t)&&or(t.children)})}function _s(e,t){t===void 0&&(t={}),t=z({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var r=new fs(e,t).parse();if(r.err){var o=SyntaxError(N[r.err.kind]);throw o.location=r.err.location,o.originalMessage=r.err.message,o}return t?.captureLocation||or(r.val),r.val}function zt(e,t){var r=t&&t.cache?t.cache:ws,o=t&&t.serializer?t.serializer:vs,n=t&&t.strategy?t.strategy:ms;return n(e,{cache:r,serializer:o})}function gs(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Fo(e,t,r,o){var n=gs(o)?o:r(o),i=t.get(n);return typeof i>"u"&&(i=e.call(this,o),t.set(n,i)),i}function qo(e,t,r){var o=Array.prototype.slice.call(arguments,3),n=r(o),i=t.get(n);return typeof i>"u"&&(i=e.apply(this,o),t.set(n,i)),i}function dr(e,t,r,o,n){return r.bind(t,e,o,n)}function ms(e,t){var r=e.length===1?Fo:qo;return dr(e,this,r,t.cache.create(),t.serializer)}function bs(e,t){return dr(e,this,qo,t.cache.create(),t.serializer)}function ys(e,t){return dr(e,this,Fo,t.cache.create(),t.serializer)}var vs=function(){return JSON.stringify(arguments)};function hr(){this.cache=Object.create(null)}hr.prototype.get=function(e){return this.cache[e]};hr.prototype.set=function(e,t){this.cache[e]=t};var ws={create:function(){return new hr}},Dt={variadic:bs,monadic:ys},Le;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Le||(Le={}));var Bt=function(e){Tt(t,e);function t(r,o,n){var i=e.call(this,r)||this;return i.code=o,i.originalMessage=n,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Rr=function(e){Tt(t,e);function t(r,o,n,i){return e.call(this,'Invalid values for "'.concat(r,'": "').concat(o,'". Options are "').concat(Object.keys(n).join('", "'),'"'),Le.INVALID_VALUE,i)||this}return t}(Bt),xs=function(e){Tt(t,e);function t(r,o,n){return e.call(this,'Value for "'.concat(r,'" must be of type ').concat(o),Le.INVALID_VALUE,n)||this}return t}(Bt),Es=function(e){Tt(t,e);function t(r,o){return e.call(this,'The intl string context variable "'.concat(r,'" was not provided to the string "').concat(o,'"'),Le.MISSING_VALUE,o)||this}return t}(Bt),ce;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ce||(ce={}));function Ss(e){return e.length<2?e:e.reduce(function(t,r){var o=t[t.length-1];return!o||o.type!==ce.literal||r.type!==ce.literal?t.push(r):o.value+=r.value,t},[])}function ks(e){return typeof e=="function"}function ft(e,t,r,o,n,i,a){if(e.length===1&&Hr(e[0]))return[{type:ce.literal,value:e[0].value}];for(var l=[],u=0,s=e;u<s.length;u++){var c=s[u];if(Hr(c)){l.push({type:ce.literal,value:c.value});continue}if(Ua(c)){typeof i=="number"&&l.push({type:ce.literal,value:r.getNumberFormat(t).format(i)});continue}var f=c.value;if(!(n&&f in n))throw new Es(f,a);var d=n[f];if(ja(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),l.push({type:typeof d=="string"?ce.literal:ce.object,value:d});continue}if(Ho(c)){var _=typeof c.style=="string"?o.date[c.style]:Kt(c.style)?c.style.parsedOptions:void 0;l.push({type:ce.literal,value:r.getDateTimeFormat(t,_).format(d)});continue}if(Co(c)){var _=typeof c.style=="string"?o.time[c.style]:Kt(c.style)?c.style.parsedOptions:o.time.medium;l.push({type:ce.literal,value:r.getDateTimeFormat(t,_).format(d)});continue}if(Po(c)){var _=typeof c.style=="string"?o.number[c.style]:Io(c.style)?c.style.parsedOptions:void 0;_&&_.scale&&(d=d*(_.scale||1)),l.push({type:ce.literal,value:r.getNumberFormat(t,_).format(d)});continue}if(Mo(c)){var p=c.children,g=c.value,y=n[g];if(!ks(y))throw new xs(g,"function",a);var w=ft(p,t,r,o,n,i),E=y(w.map(function(A){return A.value}));Array.isArray(E)||(E=[E]),l.push.apply(l,E.map(function(A){return{type:typeof A=="string"?ce.literal:ce.object,value:A}}))}if(No(c)){var h=c.options[d]||c.options.other;if(!h)throw new Rr(c.value,d,Object.keys(c.options),a);l.push.apply(l,ft(h.value,t,r,o,n));continue}if(Oo(c)){var h=c.options["=".concat(d)];if(!h){if(!Intl.PluralRules)throw new Bt(`Intl.PluralRules is not available in this environment. | |
Try polyfilling it using "@formatjs/intl-pluralrules" | |
`,Le.MISSING_INTL_API,a);var v=r.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));h=c.options[v]||c.options.other}if(!h)throw new Rr(c.value,d,Object.keys(c.options),a);l.push.apply(l,ft(h.value,t,r,o,n,d-(c.offset||0)));continue}}return Ss(l)}function As(e,t){return t?z(z(z({},e||{}),t||{}),Object.keys(e).reduce(function(r,o){return r[o]=z(z({},e[o]),t[o]||{}),r},{})):e}function Ts(e,t){return t?Object.keys(e).reduce(function(r,o){return r[o]=As(e[o],t[o]),r},z({},e)):e}function jt(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,r){e[t]=r}}}}}function Bs(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:zt(function(){for(var t,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return new((t=Intl.NumberFormat).bind.apply(t,Lt([void 0],r,!1)))},{cache:jt(e.number),strategy:Dt.variadic}),getDateTimeFormat:zt(function(){for(var t,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return new((t=Intl.DateTimeFormat).bind.apply(t,Lt([void 0],r,!1)))},{cache:jt(e.dateTime),strategy:Dt.variadic}),getPluralRules:zt(function(){for(var t,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return new((t=Intl.PluralRules).bind.apply(t,Lt([void 0],r,!1)))},{cache:jt(e.pluralRules),strategy:Dt.variadic})}}var Ps=function(){function e(t,r,o,n){var i=this;if(r===void 0&&(r=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(a){var l=i.formatToParts(a);if(l.length===1)return l[0].value;var u=l.reduce(function(s,c){return!s.length||c.type!==ce.literal||typeof s[s.length-1]!="string"?s.push(c.value):s[s.length-1]+=c.value,s},[]);return u.length<=1?u[0]||"":u},this.formatToParts=function(a){return ft(i.ast,i.locales,i.formatters,i.formats,a,void 0,i.message)},this.resolvedOptions=function(){return{locale:i.resolvedLocale.toString()}},this.getAst=function(){return i.ast},this.locales=r,this.resolvedLocale=e.resolveLocale(r),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");this.ast=e.__parse(t,{ignoreTag:n?.ignoreTag,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=Ts(e.formats,o),this.formatters=n&&n.formatters||Bs(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){var r=Intl.NumberFormat.supportedLocalesOf(t);return r.length>0?new Intl.Locale(r[0]):new Intl.Locale(typeof t=="string"?t:t[0])},e.__parse=_s,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const ge={},Hs=(e,t,r)=>r&&(t in ge||(ge[t]={}),e in ge[t]||(ge[t][e]=r),r),Vo=(e,t)=>{if(t==null)return;if(t in ge&&e in ge[t])return ge[t][e];const r=nt(t);for(let o=0;o<r.length;o++){const n=Cs(r[o],e);if(n)return Hs(e,t,n)}};let pr;const ot=be({});function Xo(e){return e in pr}function Cs(e,t){if(!Xo(e))return null;const r=function(o){return pr[o]||null}(e);return function(o,n){if(n==null)return;if(n in o)return o[n];const i=n.split(".");let a=o;for(let l=0;l<i.length;l++)if(typeof a=="object"){if(l>0){const u=i.slice(l,i.length).join(".");if(u in a){a=a[u];break}}a=a[i[l]]}else a=void 0;return a}(r,t)}function Wo(e,...t){delete ge[e],ot.update(r=>(r[e]=Da.all([r[e]||{},...t]),r))}je([ot],([e])=>Object.keys(e));ot.subscribe(e=>pr=e);const dt={};function Zo(e){return dt[e]}function xt(e){return e!=null&&nt(e).some(t=>{var r;return(r=Zo(t))===null||r===void 0?void 0:r.size})}function Ns(e,t){return Promise.all(t.map(o=>(function(n,i){dt[n].delete(i),dt[n].size===0&&delete dt[n]}(e,o),o().then(n=>n.default||n)))).then(o=>Wo(e,...o))}const Xe={};function Jo(e){if(!xt(e))return e in Xe?Xe[e]:Promise.resolve();const t=function(r){return nt(r).map(o=>{const n=Zo(o);return[o,n?[...n]:[]]}).filter(([,o])=>o.length>0)}(e);return Xe[e]=Promise.all(t.map(([r,o])=>Ns(r,o))).then(()=>{if(xt(e))return Jo(e);delete Xe[e]}),Xe[e]}function Os({locale:e,id:t}){console.warn(`[svelte-i18n] The message "${t}" was not found in "${nt(e).join('", "')}".${xt(ye())?` | |
Note: there are at least one loader still registered to this locale that wasn't executed.`:""}`)}const Ze={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Re(){return Ze}function Ms(e){const{formats:t,...r}=e,o=e.initialLocale||e.fallbackLocale;return r.warnOnMissingMessages&&(delete r.warnOnMissingMessages,r.handleMissingMessage==null?r.handleMissingMessage=Os:console.warn('[svelte-i18n] The "warnOnMissingMessages" option is deprecated. Please use the "handleMissingMessage" option instead.')),Object.assign(Ze,r,{initialLocale:o}),t&&("number"in t&&Object.assign(Ze.formats.number,t.number),"date"in t&&Object.assign(Ze.formats.date,t.date),"time"in t&&Object.assign(Ze.formats.time,t.time)),Ue.set(o)}const Ut=be(!1);let nr;const ht=be(null);function zr(e){return e.split("-").map((t,r,o)=>o.slice(0,r+1).join("-")).reverse()}function nt(e,t=Re().fallbackLocale){const r=zr(e);return t?[...new Set([...r,...zr(t)])]:r}function ye(){return nr??void 0}ht.subscribe(e=>{nr=e??void 0,typeof window<"u"&&e!=null&&document.documentElement.setAttribute("lang",e)});const Ue={...ht,set:e=>{if(e&&function(t){if(t==null)return;const r=nt(t);for(let o=0;o<r.length;o++){const n=r[o];if(Xo(n))return n}}(e)&&xt(e)){const{loadingDelay:t}=Re();let r;return typeof window<"u"&&ye()!=null&&t?r=window.setTimeout(()=>Ut.set(!0),t):Ut.set(!0),Jo(e).then(()=>{ht.set(e)}).finally(()=>{clearTimeout(r),Ut.set(!1)})}return ht.set(e)}},Is=()=>typeof window>"u"?null:window.navigator.language||window.navigator.languages[0],Pt=e=>{const t=Object.create(null);return r=>{const o=JSON.stringify(r);return o in t?t[o]:t[o]=e(r)}},$e=(e,t)=>{const{formats:r}=Re();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},Ls=Pt(({locale:e,format:t,...r})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return t&&(r=$e("number",t)),new Intl.NumberFormat(e,r)}),Rs=Pt(({locale:e,format:t,...r})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return t?r=$e("date",t):Object.keys(r).length===0&&(r=$e("date","short")),new Intl.DateTimeFormat(e,r)}),zs=Pt(({locale:e,format:t,...r})=>{if(e==null)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return t?r=$e("time",t):Object.keys(r).length===0&&(r=$e("time","short")),new Intl.DateTimeFormat(e,r)}),Ds=({locale:e=ye(),...t}={})=>Ls({locale:e,...t}),js=({locale:e=ye(),...t}={})=>Rs({locale:e,...t}),Us=({locale:e=ye(),...t}={})=>zs({locale:e,...t}),Gs=Pt((e,t=ye())=>new Ps(e,t,Re().formats,{ignoreTag:Re().ignoreTag})),Fs=(e,t={})=>{var r,o,n,i;let a=t;typeof e=="object"&&(a=e,e=a.id);const{values:l,locale:u=ye(),default:s}=a;if(u==null)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=Vo(e,u);if(c){if(typeof c!="string")return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=(i=(n=(o=(r=Re()).handleMissingMessage)===null||o===void 0?void 0:o.call(r,{locale:u,id:e,defaultValue:s}))!==null&&n!==void 0?n:s)!==null&&i!==void 0?i:e;if(!l)return c;let f=c;try{f=Gs(c,u).format(l)}catch(d){d instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,d.message)}return f},qs=(e,t)=>Us(t).format(e),Vs=(e,t)=>js(t).format(e),Xs=(e,t)=>Ds(t).format(e),Ws=(e,t=ye())=>Vo(e,t),_r=je([Ue,ot],()=>Fs);je([Ue],()=>qs);je([Ue],()=>Vs);je([Ue],()=>Xs);je([Ue,ot],()=>Ws);function Dr(e){let t,r,o,n,i,a,l,u=e[8]("common.built_with")+"",s,c,f,d,_,p,g=e[8]("common.hosted_on")+"",y,w,E,h,v,A,I;return{c(){t=D("div"),r=D("span"),o=D("a"),n=O(e[4]),a=te(),l=D("span"),s=O(u),c=te(),f=D("a"),f.textContent="Gradio",d=O("."),_=te(),p=D("span"),y=O(g),w=te(),E=D("a"),h=D("span"),v=D("img"),I=O(" Spaces"),b(o,"href",i="https://huggingface.co/spaces/"+e[4]),b(o,"class","title svelte-1kyws56"),b(r,"class","svelte-1kyws56"),b(f,"class","gradio svelte-1kyws56"),b(f,"href","https://gradio.app"),b(l,"class","svelte-1kyws56"),Ki(v.src,A=Sa)||b(v,"src",A),b(v,"alt","Hugging Face Space }"),b(v,"class","svelte-1kyws56"),b(h,"class","space-logo svelte-1kyws56"),b(E,"class","hf svelte-1kyws56"),b(E,"href","https://huggingface.co/spaces"),b(p,"class","svelte-1kyws56"),b(t,"class","info svelte-1kyws56")},m(S,H){T(S,t,H),B(t,r),B(r,o),B(o,n),B(t,a),B(t,l),B(l,s),B(l,c),B(l,f),B(l,d),B(t,_),B(t,p),B(p,y),B(p,w),B(p,E),B(E,h),B(h,v),B(E,I)},p(S,H){H&16&&re(n,S[4]),H&16&&i!==(i="https://huggingface.co/spaces/"+S[4])&&b(o,"href",i),H&256&&u!==(u=S[8]("common.built_with")+"")&&re(s,u),H&256&&g!==(g=S[8]("common.hosted_on")+"")&&re(y,g)},d(S){S&&k(t)}}}function Zs(e){let t,r,o,n,i;const a=e[10].default,l=_o(a,e,e[9],null);let u=e[5]&&e[4]&&e[6]&&Dr(e);return{c(){t=D("div"),r=D("div"),l&&l.c(),o=te(),u&&u.c(),b(r,"class","main svelte-1kyws56"),b(t,"class",n="gradio-container gradio-container-"+e[1]+" svelte-1kyws56"),b(t,"data-iframe-height",""),Y(t,"app",!e[5]&&!e[3]),Y(t,"embed-container",e[5]),Y(t,"with-info",e[6]),ae(t,"min-height",e[7]?"initial":e[2]),ae(t,"flex-grow",e[5]?"auto":"1")},m(s,c){T(s,t,c),B(t,r),l&&l.m(r,null),B(t,o),u&&u.m(t,null),e[11](t),i=!0},p(s,[c]){l&&l.p&&(!i||c&512)&&bo(l,a,s,s[9],i?mo(a,s[9],c,null):yo(s[9]),null),s[5]&&s[4]&&s[6]?u?u.p(s,c):(u=Dr(s),u.c(),u.m(t,null)):u&&(u.d(1),u=null),(!i||c&2&&n!==(n="gradio-container gradio-container-"+s[1]+" svelte-1kyws56"))&&b(t,"class",n),(!i||c&42)&&Y(t,"app",!s[5]&&!s[3]),(!i||c&34)&&Y(t,"embed-container",s[5]),(!i||c&66)&&Y(t,"with-info",s[6]),c&132&&ae(t,"min-height",s[7]?"initial":s[2]),c&32&&ae(t,"flex-grow",s[5]?"auto":"1")},i(s){i||($(l,s),i=!0)},o(s){se(l,s),i=!1},d(s){s&&k(t),l&&l.d(s),u&&u.d(),e[11](null)}}}function Js(e,t,r){let o;xe(e,_r,g=>r(8,o=g));let{$$slots:n={},$$scope:i}=t,{wrapper:a}=t,{version:l}=t,{initial_height:u}=t,{is_embed:s}=t,{space:c}=t,{display:f}=t,{info:d}=t,{loaded:_}=t;function p(g){me[g?"unshift":"push"](()=>{a=g,r(0,a)})}return e.$$set=g=>{"wrapper"in g&&r(0,a=g.wrapper),"version"in g&&r(1,l=g.version),"initial_height"in g&&r(2,u=g.initial_height),"is_embed"in g&&r(3,s=g.is_embed),"space"in g&&r(4,c=g.space),"display"in g&&r(5,f=g.display),"info"in g&&r(6,d=g.info),"loaded"in g&&r(7,_=g.loaded),"$$scope"in g&&r(9,i=g.$$scope)},[a,l,u,s,c,f,d,_,o,i,n,p]}class Ys extends At{constructor(t){super(),kt(this,t,Js,Zs,tt,{wrapper:0,version:1,initial_height:2,is_embed:3,space:4,display:5,info:6,loaded:7})}}function He(e){let t=["","k","M","G","T","P","E","Z"],r=0;for(;e>1e3&&r<t.length-1;)e/=1e3,r++;let o=t[r];return(Number.isInteger(e)?e:e.toFixed(1))+o}function tu(){const e=be({}),t=[],r=[],o=new Map,n=new Map,i=new Map,a=[];function l({fn_index:s,status:c,queue:f=!0,size:d,position:_=null,eta:p=null,message:g=null,progress:y}){const w=r[s],E=t[s],h=a[s],v=w.map(A=>{let I;const S=o.get(A)||0;if(h==="pending"&&c!=="pending"){let H=S-1;o.set(A,H<0?0:H),I=H>0?"pending":c}else h==="pending"&&c==="pending"?I="pending":h!=="pending"&&c==="pending"?(I="pending",o.set(A,S+1)):I=c;return{id:A,queue_position:_,queue_size:d,eta:p,status:I,message:g,progress:y}});E.forEach(A=>{const I=n.get(A)||0;if(h==="pending"&&c!=="pending"){let S=I-1;n.set(A,S<0?0:S),i.set(A,c)}else h!=="pending"&&c==="pending"?(n.set(A,I+1),i.set(A,c)):i.delete(A)}),e.update(A=>(v.forEach(({id:I,queue_position:S,queue_size:H,eta:j,status:X,message:U,progress:C})=>{A[I]={queue:f,queue_size:H,queue_position:S,eta:j,message:U,progress:C,status:X,fn_index:s}}),A)),a[s]=c}function u(s,c,f){t[s]=c,r[s]=f}return{update:l,register:u,subscribe:e.subscribe,get_status_for_fn(s){return a[s]},get_inputs_to_update(){return i}}}const Qs=be({autoscroll:!1});function jr(e){return Object.prototype.toString.call(e)==="[object Date]"}function ir(e,t,r,o){if(typeof r=="number"||jr(r)){const n=o-r,i=(r-t)/(e.dt||1/60),a=e.opts.stiffness*n,l=e.opts.damping*i,u=(a-l)*e.inv_mass,s=(i+u)*e.dt;return Math.abs(s)<e.opts.precision&&Math.abs(n)<e.opts.precision?o:(e.settled=!1,jr(r)?new Date(r.getTime()+s):r+s)}else{if(Array.isArray(r))return r.map((n,i)=>ir(e,t[i],r[i],o[i]));if(typeof r=="object"){const n={};for(const i in r)n[i]=ir(e,t[i],r[i],o[i]);return n}else throw new Error(`Cannot spring ${typeof r} values`)}}function Ur(e,t={}){const r=be(e),{stiffness:o=.15,damping:n=.8,precision:i=.01}=t;let a,l,u,s=e,c=e,f=1,d=0,_=!1;function p(y,w={}){c=y;const E=u={};return e==null||w.hard||g.stiffness>=1&&g.damping>=1?(_=!0,a=Ye(),s=y,r.set(e=c),Promise.resolve()):(w.soft&&(d=1/((w.soft===!0?.5:+w.soft)*60),f=0),l||(a=Ye(),_=!1,l=St(h=>{if(_)return _=!1,l=null,!1;f=Math.min(f+d,1);const v={inv_mass:f,opts:g,settled:!0,dt:(h-a)*60/1e3},A=ir(v,s,e,c);return a=h,s=e,r.set(e=A),v.settled&&(l=null),!v.settled})),new Promise(h=>{l.promise.then(()=>{E===u&&h()})}))}const g={set:p,update:(y,w)=>p(y(c,e),w),subscribe:r.subscribe,stiffness:o,damping:n,precision:i};return g}function Ks(e){let t,r,o,n,i,a,l,u,s,c,f,d;return{c(){t=D("div"),r=de("svg"),o=de("g"),n=de("path"),i=de("path"),a=de("path"),l=de("path"),u=de("g"),s=de("path"),c=de("path"),f=de("path"),d=de("path"),b(n,"d","M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"),b(n,"fill","#FF7C00"),b(n,"fill-opacity","0.4"),b(n,"class","svelte-zyxd38"),b(i,"d","M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"),b(i,"fill","#FF7C00"),b(i,"class","svelte-zyxd38"),b(a,"d","M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"),b(a,"fill","#FF7C00"),b(a,"fill-opacity","0.4"),b(a,"class","svelte-zyxd38"),b(l,"d","M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"),b(l,"fill","#FF7C00"),b(l,"class","svelte-zyxd38"),ae(o,"transform","translate("+e[1][0]+"px, "+e[1][1]+"px)"),b(s,"d","M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"),b(s,"fill","#FF7C00"),b(s,"fill-opacity","0.4"),b(s,"class","svelte-zyxd38"),b(c,"d","M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"),b(c,"fill","#FF7C00"),b(c,"class","svelte-zyxd38"),b(f,"d","M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"),b(f,"fill","#FF7C00"),b(f,"fill-opacity","0.4"),b(f,"class","svelte-zyxd38"),b(d,"d","M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"),b(d,"fill","#FF7C00"),b(d,"class","svelte-zyxd38"),ae(u,"transform","translate("+e[2][0]+"px, "+e[2][1]+"px)"),b(r,"viewBox","-1200 -1200 3000 3000"),b(r,"fill","none"),b(r,"xmlns","http://www.w3.org/2000/svg"),b(r,"class","svelte-zyxd38"),b(t,"class","svelte-zyxd38"),Y(t,"margin",e[0])},m(_,p){T(_,t,p),B(t,r),B(r,o),B(o,n),B(o,i),B(o,a),B(o,l),B(r,u),B(u,s),B(u,c),B(u,f),B(u,d)},p(_,[p]){p&2&&ae(o,"transform","translate("+_[1][0]+"px, "+_[1][1]+"px)"),p&4&&ae(u,"transform","translate("+_[2][0]+"px, "+_[2][1]+"px)"),p&1&&Y(t,"margin",_[0])},i:K,o:K,d(_){_&&k(t)}}}function $s(e,t,r){let o,n,{margin:i=!0}=t;const a=Ur([0,0]);xe(e,a,d=>r(1,o=d));const l=Ur([0,0]);xe(e,l,d=>r(2,n=d));let u;async function s(){await Promise.all([a.set([125,140]),l.set([-125,-140])]),await Promise.all([a.set([-125,140]),l.set([125,-140])]),await Promise.all([a.set([-125,0]),l.set([125,-0])]),await Promise.all([a.set([125,0]),l.set([-125,0])])}async function c(){await s(),u||c()}async function f(){await Promise.all([a.set([125,0]),l.set([-125,0])]),c()}return Xt(()=>(f(),()=>u=!0)),e.$$set=d=>{"margin"in d&&r(0,i=d.margin)},[i,o,n,a,l]}class el extends At{constructor(t){super(),kt(this,t,$s,Ks,tt,{margin:0})}}const tl=e=>({}),Gr=e=>({});function Fr(e,t,r){const o=e.slice();return o[38]=t[r],o[40]=r,o}function qr(e,t,r){const o=e.slice();return o[38]=t[r],o}function rl(e){let t,r=e[20]("common.error")+"",o,n,i;const a=e[29].error,l=_o(a,e,e[28],Gr);return{c(){t=D("span"),o=O(r),n=te(),l&&l.c(),b(t,"class","error svelte-119qaqt")},m(u,s){T(u,t,s),B(t,o),T(u,n,s),l&&l.m(u,s),i=!0},p(u,s){(!i||s[0]&1048576)&&r!==(r=u[20]("common.error")+"")&&re(o,r),l&&l.p&&(!i||s[0]&268435456)&&bo(l,a,u,u[28],i?mo(a,u[28],s,tl):yo(u[28]),Gr)},i(u){i||($(l,u),i=!0)},o(u){se(l,u),i=!1},d(u){u&&(k(t),k(n)),l&&l.d(u)}}}function ol(e){let t,r,o,n,i,a,l,u,s,c=e[7]==="default"&&e[17]&&e[5]==="full"&&Vr(e);function f(h,v){if(h[6])return al;if(h[1]!==null&&h[2]!==void 0&&h[1]>=0)return il;if(h[1]===0)return nl}let d=f(e),_=d&&d(e),p=e[4]&&Zr(e);const g=[ul,cl],y=[];function w(h,v){return h[14]!=null?0:h[5]==="full"?1:-1}~(i=w(e))&&(a=y[i]=g[i](e));let E=!e[4]&&to(e);return{c(){c&&c.c(),t=te(),r=D("div"),_&&_.c(),o=te(),p&&p.c(),n=te(),a&&a.c(),l=te(),E&&E.c(),u=Se(),b(r,"class","progress-text svelte-119qaqt"),Y(r,"meta-text-center",e[7]==="center"),Y(r,"meta-text",e[7]==="default")},m(h,v){c&&c.m(h,v),T(h,t,v),T(h,r,v),_&&_.m(r,null),B(r,o),p&&p.m(r,null),T(h,n,v),~i&&y[i].m(h,v),T(h,l,v),E&&E.m(h,v),T(h,u,v),s=!0},p(h,v){h[7]==="default"&&h[17]&&h[5]==="full"?c?c.p(h,v):(c=Vr(h),c.c(),c.m(t.parentNode,t)):c&&(c.d(1),c=null),d===(d=f(h))&&_?_.p(h,v):(_&&_.d(1),_=d&&d(h),_&&(_.c(),_.m(r,o))),h[4]?p?p.p(h,v):(p=Zr(h),p.c(),p.m(r,null)):p&&(p.d(1),p=null),(!s||v[0]&128)&&Y(r,"meta-text-center",h[7]==="center"),(!s||v[0]&128)&&Y(r,"meta-text",h[7]==="default");let A=i;i=w(h),i===A?~i&&y[i].p(h,v):(a&&(yt(),se(y[A],1,1,()=>{y[A]=null}),vt()),~i?(a=y[i],a?a.p(h,v):(a=y[i]=g[i](h),a.c()),$(a,1),a.m(l.parentNode,l)):a=null),h[4]?E&&(E.d(1),E=null):E?E.p(h,v):(E=to(h),E.c(),E.m(u.parentNode,u))},i(h){s||($(a),s=!0)},o(h){se(a),s=!1},d(h){h&&(k(t),k(r),k(n),k(l),k(u)),c&&c.d(h),_&&_.d(),p&&p.d(),~i&&y[i].d(h),E&&E.d(h)}}}function Vr(e){let t,r=`translateX(${(e[16]||0)*100-100}%)`;return{c(){t=D("div"),b(t,"class","eta-bar svelte-119qaqt"),ae(t,"transform",r)},m(o,n){T(o,t,n)},p(o,n){n[0]&65536&&r!==(r=`translateX(${(o[16]||0)*100-100}%)`)&&ae(t,"transform",r)},d(o){o&&k(t)}}}function nl(e){let t;return{c(){t=O("processing |")},m(r,o){T(r,t,o)},p:K,d(r){r&&k(t)}}}function il(e){let t,r=e[1]+1+"",o,n,i,a;return{c(){t=O("queue: "),o=O(r),n=O("/"),i=O(e[2]),a=O(" |")},m(l,u){T(l,t,u),T(l,o,u),T(l,n,u),T(l,i,u),T(l,a,u)},p(l,u){u[0]&2&&r!==(r=l[1]+1+"")&&re(o,r),u[0]&4&&re(i,l[2])},d(l){l&&(k(t),k(o),k(n),k(i),k(a))}}}function al(e){let t,r=wt(e[6]),o=[];for(let n=0;n<r.length;n+=1)o[n]=Wr(qr(e,r,n));return{c(){for(let n=0;n<o.length;n+=1)o[n].c();t=Se()},m(n,i){for(let a=0;a<o.length;a+=1)o[a]&&o[a].m(n,i);T(n,t,i)},p(n,i){if(i[0]&64){r=wt(n[6]);let a;for(a=0;a<r.length;a+=1){const l=qr(n,r,a);o[a]?o[a].p(l,i):(o[a]=Wr(l),o[a].c(),o[a].m(t.parentNode,t))}for(;a<o.length;a+=1)o[a].d(1);o.length=r.length}},d(n){n&&k(t),Eo(o,n)}}}function Xr(e){let t,r=e[38].unit+"",o,n,i=" ",a;function l(c,f){return c[38].length!=null?ll:sl}let u=l(e),s=u(e);return{c(){s.c(),t=te(),o=O(r),n=O(" | "),a=O(i)},m(c,f){s.m(c,f),T(c,t,f),T(c,o,f),T(c,n,f),T(c,a,f)},p(c,f){u===(u=l(c))&&s?s.p(c,f):(s.d(1),s=u(c),s&&(s.c(),s.m(t.parentNode,t))),f[0]&64&&r!==(r=c[38].unit+"")&&re(o,r)},d(c){c&&(k(t),k(o),k(n),k(a)),s.d(c)}}}function sl(e){let t=He(e[38].index||0)+"",r;return{c(){r=O(t)},m(o,n){T(o,r,n)},p(o,n){n[0]&64&&t!==(t=He(o[38].index||0)+"")&&re(r,t)},d(o){o&&k(r)}}}function ll(e){let t=He(e[38].index||0)+"",r,o,n=He(e[38].length)+"",i;return{c(){r=O(t),o=O("/"),i=O(n)},m(a,l){T(a,r,l),T(a,o,l),T(a,i,l)},p(a,l){l[0]&64&&t!==(t=He(a[38].index||0)+"")&&re(r,t),l[0]&64&&n!==(n=He(a[38].length)+"")&&re(i,n)},d(a){a&&(k(r),k(o),k(i))}}}function Wr(e){let t,r=e[38].index!=null&&Xr(e);return{c(){r&&r.c(),t=Se()},m(o,n){r&&r.m(o,n),T(o,t,n)},p(o,n){o[38].index!=null?r?r.p(o,n):(r=Xr(o),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(o){o&&k(t),r&&r.d(o)}}}function Zr(e){let t,r=e[0]?`/${e[18]}`:"",o,n;return{c(){t=O(e[19]),o=O(r),n=O("s")},m(i,a){T(i,t,a),T(i,o,a),T(i,n,a)},p(i,a){a[0]&524288&&re(t,i[19]),a[0]&262145&&r!==(r=i[0]?`/${i[18]}`:"")&&re(o,r)},d(i){i&&(k(t),k(o),k(n))}}}function cl(e){let t,r;return t=new el({props:{margin:e[7]==="default"}}),{c(){rt(t.$$.fragment)},m(o,n){ze(t,o,n),r=!0},p(o,n){const i={};n[0]&128&&(i.margin=o[7]==="default"),t.$set(i)},i(o){r||($(t.$$.fragment,o),r=!0)},o(o){se(t.$$.fragment,o),r=!1},d(o){De(t,o)}}}function ul(e){let t,r,o,n,i,a=`${e[14]*100}%`,l=e[6]!=null&&Jr(e);return{c(){t=D("div"),r=D("div"),l&&l.c(),o=te(),n=D("div"),i=D("div"),b(r,"class","progress-level-inner svelte-119qaqt"),b(i,"class","progress-bar svelte-119qaqt"),ae(i,"width",a),b(n,"class","progress-bar-wrap svelte-119qaqt"),b(t,"class","progress-level svelte-119qaqt")},m(u,s){T(u,t,s),B(t,r),l&&l.m(r,null),B(t,o),B(t,n),B(n,i),e[30](i)},p(u,s){u[6]!=null?l?l.p(u,s):(l=Jr(u),l.c(),l.m(r,null)):l&&(l.d(1),l=null),s[0]&16384&&a!==(a=`${u[14]*100}%`)&&ae(i,"width",a)},i:K,o:K,d(u){u&&k(t),l&&l.d(),e[30](null)}}}function Jr(e){let t,r=wt(e[6]),o=[];for(let n=0;n<r.length;n+=1)o[n]=eo(Fr(e,r,n));return{c(){for(let n=0;n<o.length;n+=1)o[n].c();t=Se()},m(n,i){for(let a=0;a<o.length;a+=1)o[a]&&o[a].m(n,i);T(n,t,i)},p(n,i){if(i[0]&8256){r=wt(n[6]);let a;for(a=0;a<r.length;a+=1){const l=Fr(n,r,a);o[a]?o[a].p(l,i):(o[a]=eo(l),o[a].c(),o[a].m(t.parentNode,t))}for(;a<o.length;a+=1)o[a].d(1);o.length=r.length}},d(n){n&&k(t),Eo(o,n)}}}function Yr(e){let t,r,o,n,i=e[40]!==0&&fl(),a=e[38].desc!=null&&Qr(e),l=e[38].desc!=null&&e[13]&&e[13][e[40]]!=null&&Kr(),u=e[13]!=null&&$r(e);return{c(){i&&i.c(),t=te(),a&&a.c(),r=te(),l&&l.c(),o=te(),u&&u.c(),n=Se()},m(s,c){i&&i.m(s,c),T(s,t,c),a&&a.m(s,c),T(s,r,c),l&&l.m(s,c),T(s,o,c),u&&u.m(s,c),T(s,n,c)},p(s,c){s[38].desc!=null?a?a.p(s,c):(a=Qr(s),a.c(),a.m(r.parentNode,r)):a&&(a.d(1),a=null),s[38].desc!=null&&s[13]&&s[13][s[40]]!=null?l||(l=Kr(),l.c(),l.m(o.parentNode,o)):l&&(l.d(1),l=null),s[13]!=null?u?u.p(s,c):(u=$r(s),u.c(),u.m(n.parentNode,n)):u&&(u.d(1),u=null)},d(s){s&&(k(t),k(r),k(o),k(n)),i&&i.d(s),a&&a.d(s),l&&l.d(s),u&&u.d(s)}}}function fl(e){let t;return{c(){t=O(" /")},m(r,o){T(r,t,o)},d(r){r&&k(t)}}}function Qr(e){let t=e[38].desc+"",r;return{c(){r=O(t)},m(o,n){T(o,r,n)},p(o,n){n[0]&64&&t!==(t=o[38].desc+"")&&re(r,t)},d(o){o&&k(r)}}}function Kr(e){let t;return{c(){t=O("-")},m(r,o){T(r,t,o)},d(r){r&&k(t)}}}function $r(e){let t=(100*(e[13][e[40]]||0)).toFixed(1)+"",r,o;return{c(){r=O(t),o=O("%")},m(n,i){T(n,r,i),T(n,o,i)},p(n,i){i[0]&8192&&t!==(t=(100*(n[13][n[40]]||0)).toFixed(1)+"")&&re(r,t)},d(n){n&&(k(r),k(o))}}}function eo(e){let t,r=(e[38].desc!=null||e[13]&&e[13][e[40]]!=null)&&Yr(e);return{c(){r&&r.c(),t=Se()},m(o,n){r&&r.m(o,n),T(o,t,n)},p(o,n){o[38].desc!=null||o[13]&&o[13][o[40]]!=null?r?r.p(o,n):(r=Yr(o),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(o){o&&k(t),r&&r.d(o)}}}function to(e){let t,r;return{c(){t=D("p"),r=O(e[8]),b(t,"class","loading svelte-119qaqt")},m(o,n){T(o,t,n),B(t,r)},p(o,n){n[0]&256&&re(r,o[8])},d(o){o&&k(t)}}}function dl(e){let t,r,o,n,i;const a=[ol,rl],l=[];function u(s,c){return s[3]==="pending"?0:s[3]==="error"?1:-1}return~(r=u(e))&&(o=l[r]=a[r](e)),{c(){t=D("div"),o&&o.c(),b(t,"class",n="wrap "+e[7]+" "+e[5]+" svelte-119qaqt"),Y(t,"hide",!e[3]||e[3]==="complete"||e[5]==="hidden"),Y(t,"translucent",e[7]==="center"&&(e[3]==="pending"||e[3]==="error")||e[10]||e[5]==="minimal"),Y(t,"generating",e[3]==="generating"),Y(t,"border",e[11]),ae(t,"position",e[9]?"absolute":"static"),ae(t,"padding",e[9]?"0":"var(--size-8) 0")},m(s,c){T(s,t,c),~r&&l[r].m(t,null),e[31](t),i=!0},p(s,c){let f=r;r=u(s),r===f?~r&&l[r].p(s,c):(o&&(yt(),se(l[f],1,1,()=>{l[f]=null}),vt()),~r?(o=l[r],o?o.p(s,c):(o=l[r]=a[r](s),o.c()),$(o,1),o.m(t,null)):o=null),(!i||c[0]&160&&n!==(n="wrap "+s[7]+" "+s[5]+" svelte-119qaqt"))&&b(t,"class",n),(!i||c[0]&168)&&Y(t,"hide",!s[3]||s[3]==="complete"||s[5]==="hidden"),(!i||c[0]&1192)&&Y(t,"translucent",s[7]==="center"&&(s[3]==="pending"||s[3]==="error")||s[10]||s[5]==="minimal"),(!i||c[0]&168)&&Y(t,"generating",s[3]==="generating"),(!i||c[0]&2208)&&Y(t,"border",s[11]),c[0]&512&&ae(t,"position",s[9]?"absolute":"static"),c[0]&512&&ae(t,"padding",s[9]?"0":"var(--size-8) 0")},i(s){i||($(o),i=!0)},o(s){se(o),i=!1},d(s){s&&k(t),~r&&l[r].d(),e[31](null)}}}let ct=[],Gt=!1;async function hl(e,t=!0){if(!(window.__gradio_mode__==="website"||window.__gradio_mode__!=="app"&&t!==!0)){if(ct.push(e),!Gt)Gt=!0;else return;await pa(),requestAnimationFrame(()=>{let r=[0,0];for(let o=0;o<ct.length;o++){const i=ct[o].getBoundingClientRect();(o===0||i.top+window.scrollY<=r[0])&&(r[0]=i.top+window.scrollY,r[1]=o)}window.scrollTo({top:r[0]-20,behavior:"smooth"}),Gt=!1,ct=[]})}}function pl(e,t,r){let o,n,i;xe(e,Qs,x=>r(27,n=x)),xe(e,_r,x=>r(20,i=x));let{$$slots:a={},$$scope:l}=t,{eta:u=null}=t,{queue:s=!1}=t,{queue_position:c}=t,{queue_size:f}=t,{status:d}=t,{scroll_to_output:_=!1}=t,{timer:p=!0}=t,{show_progress:g="full"}=t,{message:y=null}=t,{progress:w=null}=t,{variant:E="default"}=t,{loading_text:h="Loading..."}=t,{absolute:v=!0}=t,{translucent:A=!1}=t,{border:I=!1}=t,S,H=!1,j=0,X=0,U=null,C=0,R=null,oe,P=null,ue=!0;const W=()=>{r(24,j=performance.now()),r(25,X=0),H=!0,L()};function L(){requestAnimationFrame(()=>{r(25,X=(performance.now()-j)/1e3),H&&L()})}function ee(){r(25,X=0),H&&(H=!1)}da(()=>{H&&ee()});let le=null;function fe(x){me[x?"unshift":"push"](()=>{P=x,r(15,P),r(6,w),r(13,R),r(14,oe)})}function G(x){me[x?"unshift":"push"](()=>{S=x,r(12,S)})}return e.$$set=x=>{"eta"in x&&r(0,u=x.eta),"queue"in x&&r(21,s=x.queue),"queue_position"in x&&r(1,c=x.queue_position),"queue_size"in x&&r(2,f=x.queue_size),"status"in x&&r(3,d=x.status),"scroll_to_output"in x&&r(22,_=x.scroll_to_output),"timer"in x&&r(4,p=x.timer),"show_progress"in x&&r(5,g=x.show_progress),"message"in x&&r(23,y=x.message),"progress"in x&&r(6,w=x.progress),"variant"in x&&r(7,E=x.variant),"loading_text"in x&&r(8,h=x.loading_text),"absolute"in x&&r(9,v=x.absolute),"translucent"in x&&r(10,A=x.translucent),"border"in x&&r(11,I=x.border),"$$scope"in x&&r(28,l=x.$$scope)},e.$$.update=()=>{e.$$.dirty[0]&85983233&&(u===null?r(0,u=U):s&&r(0,u=(performance.now()-j)/1e3+u),u!=null&&(r(18,le=u.toFixed(1)),r(26,U=u))),e.$$.dirty[0]&33554433&&r(16,C=u===null||u<=0||!X?null:Math.min(X/u,1)),e.$$.dirty[0]&64&&w!=null&&r(17,ue=!1),e.$$.dirty[0]&57408&&(w!=null?r(13,R=w.map(x=>{if(x.index!=null&&x.length!=null)return x.index/x.length;if(x.progress!=null)return x.progress})):r(13,R=null),R?(r(14,oe=R[R.length-1]),P&&(oe===0?r(15,P.style.transition="0",P):r(15,P.style.transition="150ms",P))):r(14,oe=void 0)),e.$$.dirty[0]&8&&(d==="pending"?W():ee()),e.$$.dirty[0]&138416136&&S&&_&&(d==="pending"||d==="complete")&&hl(S,n.autoscroll),e.$$.dirty[0]&8388616,e.$$.dirty[0]&33554432&&r(19,o=X.toFixed(1))},[u,c,f,d,p,g,w,E,h,v,A,I,S,R,oe,P,C,ue,le,o,i,s,_,y,j,X,U,n,l,a,fe,G]}class _l extends At{constructor(t){super(),kt(this,t,pl,dl,tt,{eta:0,queue:21,queue_position:1,queue_size:2,status:3,scroll_to_output:22,timer:4,show_progress:5,message:23,progress:6,variant:7,loading_text:8,absolute:9,translucent:10,border:11},null,[-1,-1])}}const Yo={built_with_gradio:"تم الإنشاء بإستخدام Gradio",clear:"أمسح",or:"أو",submit:"أرسل"},Qo={click_to_upload:"إضغط للتحميل",drop_audio:"أسقط الملف الصوتي هنا",drop_csv:"أسقط ملف البيانات هنا",drop_file:"أسقط الملف هنا",drop_image:"أسقط الصورة هنا",drop_video:"أسقط الفيديو هنا"},gl={common:Yo,upload_text:Qo},ml=Object.freeze(Object.defineProperty({__proto__:null,common:Yo,default:gl,upload_text:Qo},Symbol.toStringTag,{value:"Module"})),Ko={built_with_gradio:"Construït amb gradio",clear:"Neteja",empty:"Buit",error:"Error",loading:"S'està carregant",or:"o",submit:"Envia"},$o={click_to_upload:"Feu clic per pujar",drop_audio:"Deixeu anar l'àudio aquí",drop_csv:"Deixeu anar el CSV aquí",drop_file:"Deixeu anar el fitxer aquí",drop_image:"Deixeu anar la imatge aquí",drop_video:"Deixeu anar el vídeo aquí"},bl={common:Ko,upload_text:$o},yl=Object.freeze(Object.defineProperty({__proto__:null,common:Ko,default:bl,upload_text:$o},Symbol.toStringTag,{value:"Module"})),en={annotated_image:"وێنەی نیشانە کراو"},tn={allow_recording_access:"تکایە ڕێگە بدە بە بەکارهێنانی مایکرۆفۆنەکە بۆ تۆمارکردن.",audio:"دەنگ",record_from_microphone:"تۆمارکردن لە مایکەوە",stop_recording:"تۆمارکردن بوەستێنە"},rn={connection_can_break:"لە مۆبایلدا، پەیوەندییەکە دەکرێت بپچڕێت ئەگەر ئەم تابە چالاک نەبێت یان ئامێرەکە بچێتە دۆخی پشوو، ئەمەش شوێنی خۆت لە ڕیزدا لەدەست دەدات.",long_requests_queue:"ڕیزێکی درێژی داواکاری هەیە. ئەم سپەیسە دووباد بکە بۆی چاوەڕوان نەبیت.",lost_connection:"پەیوەندی پچڕا بەهۆی جێهێشتنی پەیج. "},on={checkbox:"بۆکسی هەڵبژاردن",checkbox_group:"گروپی بۆکسی هەڵبژاردن"},nn={code:"کۆد"},an={color_picker:"ڕەنگ هەڵبژاردە"},sn={built_with:"دروستکراوە لەگەڵ...",built_with_gradio:"Gradio دروستکراوە بە",clear:"خاوێنکردنەوە",download:"دابەزاندن",edit:"بژارکردن",empty:"بەتاڵ",error:"هەڵە",hosted_on:"میوانداری کراوە لە",loading:"بارکردن",logo:"لۆگۆ",or:"یان",remove:"لابردن",share:"هاوبەشکردن",submit:"پێشکەشکردن",undo:"پووچکردنەوە"},ln={incorrect_format:"فۆرماتێکی هەڵە، تەنها فایلەکانی CSV و TSV پشتگیری دەکرێن",new_column:"ستوونی نوێ",new_row:"ڕیزێکی نوێ"},cn={dropdown:"فڕێدانە خوار"},un={build_error:"هەڵەی دروستکردن هەیە",config_error:"هەڵەی ڕێکخستن هەیە",contact_page_author:"تکایە پەیوەندی بە نووسەری پەیجەوە بکەن بۆ ئەوەی ئاگاداریان بکەنەوە.",no_app_file:"هیچ فایلێکی ئەپ نییە",runtime_error:"هەڵەیەکی runtime هەیە",space_not_working:'"سپەیسەکە کارناکات چونکە" {0}',space_paused:"فەزاکە وەستاوە",use_via_api:"لە ڕێگەی API بەکاری بهێنە"},fn={uploading:"بارکردن..."},dn={highlighted_text:"دەقی ڕۆشن کراو"},hn={allow_webcam_access:"تکایە ڕێگە بدە بە بەکارهێنانی وێبکامەکە بۆ تۆمارکردن.",brush_color:"ڕەنگی فڵچە",brush_radius:"تیژڕەوی فڵچە",image:"وێنە",remove_image:"لابردنی وێنە",select_brush_color:"ڕەنگی فڵچە هەڵبژێرە",start_drawing:"دەست بکە بە وێنەکێشان",use_brush:"فڵچە بەکاربهێنە"},pn={label:"لەیبڵ"},_n={enable_cookies:"ئەگەر تۆ سەردانی HuggingFace Space دەکەیت لە دۆخی نادیاردا، پێویستە کووکی لایەنی سێیەم چالاک بکەیت.",incorrect_credentials:"بڕوانامەی هەڵە",login:"چونه ژوورهوه"},gn={number:"ژمارە"},mn={plot:"هێڵکاری"},bn={radio:"ڕادیۆ"},yn={slider:"خلیسکە"},vn={click_to_upload:"کلیک بکە بۆ بارکردن",drop_audio:"دەنگ لێرە دابنێ",drop_csv:"لێرەدا CSV دابنێ",drop_file:"فایل لێرە دابنێ",drop_image:"وێنە لێرەدا دابنێ",drop_video:"ڤیدیۆ لێرە دابنێ"},vl={"3D_model":{"3d_model":"مۆدێلی سێ ڕەهەندی"},annotated_image:en,audio:tn,blocks:rn,checkbox:on,code:nn,color_picker:an,common:sn,dataframe:ln,dropdown:cn,errors:un,file:fn,highlighted_text:dn,image:hn,label:pn,login:_n,number:gn,plot:mn,radio:bn,slider:yn,upload_text:vn},wl=Object.freeze(Object.defineProperty({__proto__:null,annotated_image:en,audio:tn,blocks:rn,checkbox:on,code:nn,color_picker:an,common:sn,dataframe:ln,default:vl,dropdown:cn,errors:un,file:fn,highlighted_text:dn,image:hn,label:pn,login:_n,number:gn,plot:mn,radio:bn,slider:yn,upload_text:vn},Symbol.toStringTag,{value:"Module"})),wn={built_with_gradio:"Mit Gradio erstellt",clear:"Löschen",or:"oder",submit:"Absenden"},xn={click_to_upload:"Hochladen",drop_audio:"Audio hier ablegen",drop_csv:"CSV Datei hier ablegen",drop_file:"Datei hier ablegen",drop_image:"Bild hier ablegen",drop_video:"Video hier ablegen"},xl={common:wn,upload_text:xn},El=Object.freeze(Object.defineProperty({__proto__:null,common:wn,default:xl,upload_text:xn},Symbol.toStringTag,{value:"Module"})),En={annotated_image:"Annotated Image"},Sn={allow_recording_access:"Please allow access to the microphone for recording.",audio:"Audio",record_from_microphone:"Record from microphone",stop_recording:"Stop recording"},kn={connection_can_break:"On mobile, the connection can break if this tab is unfocused or the device sleeps, losing your position in queue.",long_requests_queue:"There is a long queue of requests pending. Duplicate this Space to skip.",lost_connection:"Lost connection due to leaving page. Rejoining queue..."},An={checkbox:"Checkbox",checkbox_group:"Checkbox Group"},Tn={code:"Code"},Bn={color_picker:"Color Picker"},Pn={built_with:"built with",built_with_gradio:"Built with Gradio",clear:"Clear",download:"Download",edit:"Edit",empty:"Empty",error:"Error",hosted_on:"Hosted on",loading:"Loading",logo:"logo",or:"or",remove:"Remove",share:"Share",submit:"Submit",undo:"Undo"},Hn={incorrect_format:"Incorrect format, only CSV and TSV files are supported",new_column:"New column",new_row:"New row"},Cn={dropdown:"Dropdown"},Nn={build_error:"there is a build error",config_error:"there is a config error",contact_page_author:"Please contact the author of the page to let them know.",no_app_file:"there is no app file",runtime_error:"there is a runtime error",space_not_working:`"Space isn't working because" {0}`,space_paused:"the space is paused",use_via_api:"Use via API"},On={uploading:"Uploading..."},Mn={highlighted_text:"Highlighted Text"},In={allow_webcam_access:"Please allow access to the webcam for recording.",brush_color:"Brush color",brush_radius:"Brush radius",image:"Image",remove_image:"Remove Image",select_brush_color:"Select brush color",start_drawing:"Start drawing",use_brush:"Use brush"},Ln={label:"Label"},Rn={enable_cookies:"If you are visiting a HuggingFace Space in Incognito mode, you must enable third party cookies.",incorrect_credentials:"Incorrect Credentials",login:"Login"},zn={number:"Number"},Dn={plot:"Plot"},jn={radio:"Radio"},Un={slider:"Slider"},Gn={click_to_upload:"Click to Upload",drop_audio:"Drop Audio Here",drop_csv:"Drop CSV Here",drop_file:"Drop File Here",drop_image:"Drop Image Here",drop_video:"Drop Video Here"},Sl={"3D_model":{"3d_model":"3D Model"},annotated_image:En,audio:Sn,blocks:kn,checkbox:An,code:Tn,color_picker:Bn,common:Pn,dataframe:Hn,dropdown:Cn,errors:Nn,file:On,highlighted_text:Mn,image:In,label:Ln,login:Rn,number:zn,plot:Dn,radio:jn,slider:Un,upload_text:Gn},kl=Object.freeze(Object.defineProperty({__proto__:null,annotated_image:En,audio:Sn,blocks:kn,checkbox:An,code:Tn,color_picker:Bn,common:Pn,dataframe:Hn,default:Sl,dropdown:Cn,errors:Nn,file:On,highlighted_text:Mn,image:In,label:Ln,login:Rn,number:zn,plot:Dn,radio:jn,slider:Un,upload_text:Gn},Symbol.toStringTag,{value:"Module"})),Fn={built_with_gradio:"Construido con Gradio",clear:"Limpiar",or:"o",submit:"Enviar"},qn={click_to_upload:"Haga click para cargar",drop_audio:"Coloque el audio aquí",drop_csv:"Coloque el CSV aquí",drop_file:"Coloque el archivo aquí",drop_image:"Coloque la imagen aquí",drop_video:"Coloque el video aquí"},Al={common:Fn,upload_text:qn},Tl=Object.freeze(Object.defineProperty({__proto__:null,common:Fn,default:Al,upload_text:qn},Symbol.toStringTag,{value:"Module"})),Vn={built_with_gradio:"Gradiorekin eraikia",clear:"Garbitu",or:"edo",submit:"Bidali"},Xn={click_to_upload:"Klik egin kargatzeko",drop_audio:"Jarri hemen audioa",drop_csv:"Jarri hemen CSVa",drop_file:"Jarri hemen fitxategia",drop_image:"Jarri hemen irudia",drop_video:"Jarri hemen bideoa"},Bl={common:Vn,upload_text:Xn},Pl=Object.freeze(Object.defineProperty({__proto__:null,common:Vn,default:Bl,upload_text:Xn},Symbol.toStringTag,{value:"Module"})),Wn={built_with_gradio:"ساخته شده با gradio",clear:"حذف",or:"یا",submit:"ارسال"},Zn={click_to_upload:"برای آپلود کلیک کنید",drop_audio:"صوت را اینجا رها کنید",drop_csv:"فایل csv را اینجا رها کنید",drop_file:"فایل را اینجا رها کنید",drop_image:"تصویر را اینجا رها کنید",drop_video:"ویدیو را اینجا رها کنید"},Hl={common:Wn,upload_text:Zn},Cl=Object.freeze(Object.defineProperty({__proto__:null,common:Wn,default:Hl,upload_text:Zn},Symbol.toStringTag,{value:"Module"})),Jn={allow_recording_access:"Veuillez autoriser l'accès à l'enregistrement",audio:"Audio",record_from_microphone:"Enregistrer avec le microphone",stop_recording:"Arrêter l'enregistrement"},Yn={built_with:"Construit avec",built_with_gradio:"Construit avec Gradio",clear:"Effacer",download:"Télécharger",edit:"Éditer",error:"Erreur",loading:"Chargement",logo:"logo",or:"ou",remove:"Supprimer",share:"Partager",submit:"Soumettre"},Qn={click_to_upload:"Cliquer pour Télécharger",drop_audio:"Déposer l'Audio Ici",drop_csv:"Déposer le CSV Ici",drop_file:"Déposer le Fichier Ici",drop_image:"Déposer l'Image Ici",drop_video:"Déposer la Vidéo Ici"},Nl={audio:Jn,common:Yn,upload_text:Qn},Ol=Object.freeze(Object.defineProperty({__proto__:null,audio:Jn,common:Yn,default:Nl,upload_text:Qn},Symbol.toStringTag,{value:"Module"})),Kn={built_with_gradio:"בנוי עם גרדיו",clear:"נקה",or:"או",submit:"שלח"},$n={click_to_upload:"לחץ כדי להעלות",drop_audio:"גרור לכאן קובץ שמע",drop_csv:"גרור csv קובץ לכאן",drop_file:"גרור קובץ לכאן",drop_image:"גרור קובץ תמונה לכאן",drop_video:"גרור קובץ סרטון לכאן"},Ml={common:Kn,upload_text:$n},Il=Object.freeze(Object.defineProperty({__proto__:null,common:Kn,default:Ml,upload_text:$n},Symbol.toStringTag,{value:"Module"})),ei={built_with_gradio:"Gradio से बना",clear:"हटाये",or:"या",submit:"सबमिट करे"},ti={click_to_upload:"अपलोड के लिए बटन दबायें",drop_audio:"यहाँ ऑडियो ड्रॉप करें",drop_csv:"यहाँ CSV ड्रॉप करें",drop_file:"यहाँ File ड्रॉप करें",drop_image:"यहाँ इमेज ड्रॉप करें",drop_video:"यहाँ वीडियो ड्रॉप करें"},Ll={common:ei,upload_text:ti},Rl=Object.freeze(Object.defineProperty({__proto__:null,common:ei,default:Ll,upload_text:ti},Symbol.toStringTag,{value:"Module"})),ri={built_with_gradio:"gradioで作ろう",clear:"クリア",or:"または",submit:"送信"},oi={click_to_upload:"クリックしてアップロード",drop_audio:"ここに音声をドロップ",drop_csv:"ここにCSVをドロップ",drop_file:"ここにファイルをドロップ",drop_image:"ここに画像をドロップ",drop_video:"ここに動画をドロップ"},zl={common:ri,upload_text:oi},Dl=Object.freeze(Object.defineProperty({__proto__:null,common:ri,default:zl,upload_text:oi},Symbol.toStringTag,{value:"Module"})),ni={built_with_gradio:"gradio로 제작되었습니다",clear:"클리어",or:"또는",submit:"제출하기"},ii={click_to_upload:"클릭해서 업로드하기",drop_audio:"오디오를 끌어 놓으세요",drop_csv:"CSV파일을 끌어 놓으세요",drop_file:"파일을 끌어 놓으세요",drop_image:"이미지를 끌어 놓으세요",drop_video:"비디오를 끌어 놓으세요"},jl={common:ni,upload_text:ii},Ul=Object.freeze(Object.defineProperty({__proto__:null,common:ni,default:jl,upload_text:ii},Symbol.toStringTag,{value:"Module"})),ai={built_with_gradio:"sukurta su gradio",clear:"Trinti",or:"arba",submit:"Pateikti"},si={click_to_upload:"Spustelėkite norėdami įkelti",drop_audio:"Įkelkite garso įrašą čia",drop_csv:"Įkelkite CSV čia",drop_file:"Įkelkite bylą čia",drop_image:"Įkelkite paveikslėlį čia",drop_video:"Įkelkite vaizdo įrašą čia"},Gl={common:ai,upload_text:si},Fl=Object.freeze(Object.defineProperty({__proto__:null,common:ai,default:Gl,upload_text:si},Symbol.toStringTag,{value:"Module"})),li={built_with_gradio:"gemaakt met gradio",clear:"Wis",or:"of",submit:"Zend in"},ci={click_to_upload:"Klik om the Uploaden",drop_audio:"Sleep een Geluidsbestand hier",drop_csv:"Sleep een CSV hier",drop_file:"Sleep een Document hier",drop_image:"Sleep een Afbeelding hier",drop_video:"Sleep een Video hier"},ql={common:li,upload_text:ci},Vl=Object.freeze(Object.defineProperty({__proto__:null,common:li,default:ql,upload_text:ci},Symbol.toStringTag,{value:"Module"})),ui={built_with_gradio:"utworzone z gradio",clear:"Wyczyść",or:"lub",submit:"Zatwierdź"},fi={click_to_upload:"Kliknij, aby przesłać",drop_audio:"Przeciągnij tutaj audio",drop_csv:"Przeciągnij tutaj CSV",drop_file:"Przeciągnij tutaj plik",drop_image:"Przeciągnij tutaj zdjęcie",drop_video:"Przeciągnij tutaj video"},Xl={common:ui,upload_text:fi},Wl=Object.freeze(Object.defineProperty({__proto__:null,common:ui,default:Xl,upload_text:fi},Symbol.toStringTag,{value:"Module"})),di={built_with_gradio:"Construído com gradio",clear:"Limpar",error:"Erro",flag:"Marcar",loading:"Carregando",or:"ou",submit:"Enviar"},hi={click_to_upload:"Clique para o Upload",drop_audio:"Solte o Áudio Aqui",drop_csv:"Solte o CSV Aqui",drop_file:"Solte o Arquivo Aqui",drop_image:"Solte a Imagem Aqui",drop_video:"Solte o Vídeo Aqui"},Zl={common:di,upload_text:hi},Jl=Object.freeze(Object.defineProperty({__proto__:null,common:di,default:Zl,upload_text:hi},Symbol.toStringTag,{value:"Module"})),pi={built_with_gradio:"сделано с помощью gradio",clear:"Очистить",or:"или",submit:"Исполнить"},_i={click_to_upload:"Нажмите, чтобы загрузить",drop_audio:"Поместите Аудио Здесь",drop_csv:"Поместите CSV Здесь",drop_file:"Поместите Документ Здесь",drop_image:"Поместите Изображение Здесь",drop_video:"Поместите Видео Здесь"},Yl={common:pi,upload_text:_i},Ql=Object.freeze(Object.defineProperty({__proto__:null,common:pi,default:Yl,upload_text:_i},Symbol.toStringTag,{value:"Module"})),gi={built_with_gradio:"கிரேடியோ வுடன் உருவாக்கப்பட்டது",clear:"அழிக்கவும்",or:"அல்லது",submit:"சமர்ப்பிக்கவும்"},mi={click_to_upload:"பதிவேற்ற அழுத்தவும்",drop_audio:"ஆடியோவை பதிவேற்றவும்",drop_csv:"csv ஐ பதிவேற்றவும்",drop_file:"கோப்பை பதிவேற்றவும்",drop_image:"படத்தை பதிவேற்றவும்",drop_video:"காணொளியை பதிவேற்றவும்"},Kl={common:gi,upload_text:mi},$l=Object.freeze(Object.defineProperty({__proto__:null,common:gi,default:Kl,upload_text:mi},Symbol.toStringTag,{value:"Module"})),bi={built_with_gradio:"Gradio ile oluşturulmuştur",clear:"Temizle",or:"veya",submit:"Yükle"},yi={click_to_upload:"Yüklemek için Tıkla",drop_audio:"Kaydı Buraya Sürükle",drop_csv:"CSV'yi Buraya Sürükle",drop_file:"Dosyayı Buraya Sürükle",drop_image:"Resmi Buraya Sürükle",drop_video:"Videoyu Buraya Sürükle"},ec={common:bi,upload_text:yi},tc=Object.freeze(Object.defineProperty({__proto__:null,common:bi,default:ec,upload_text:yi},Symbol.toStringTag,{value:"Module"})),vi={built_with_gradio:"Зроблено на основі gradio",clear:"Очистити",or:"або",submit:"Надіслати"},wi={click_to_upload:"Натисніть щоб завантажити",drop_audio:"Перетягніть аудіо сюди",drop_csv:"Перетягніть CSV-файл сюди",drop_file:"Перетягніть файл сюди",drop_image:"Перетягніть зображення сюди",drop_video:"Перетягніть відео сюди"},rc={common:vi,upload_text:wi},oc=Object.freeze(Object.defineProperty({__proto__:null,common:vi,default:rc,upload_text:wi},Symbol.toStringTag,{value:"Module"})),xi={built_with_gradio:"کے ساتھ بنایا گیا Gradio",clear:"ہٹا دیں",or:"یا",submit:"جمع کریں"},Ei={click_to_upload:"اپ لوڈ کے لیے کلک کریں",drop_audio:"یہاں آڈیو ڈراپ کریں",drop_csv:"یہاں فائل ڈراپ کریں",drop_file:"یہاں فائل ڈراپ کریں",drop_image:"یہاں تصویر ڈراپ کریں",drop_video:"یہاں ویڈیو ڈراپ کریں"},nc={common:xi,upload_text:Ei},ic=Object.freeze(Object.defineProperty({__proto__:null,common:xi,default:nc,upload_text:Ei},Symbol.toStringTag,{value:"Module"})),Si={built_with_gradio:"gradio bilan qilingan",clear:"Tozalash",submit:"Yubor"},ki={click_to_upload:"Yuklash uchun Bosing",drop_audio:"Audioni Shu Yerga Tashlang",drop_csv:"CSVni Shu Yerga Tashlang",drop_file:"Faylni Shu Yerga Tashlang",drop_image:"Rasmni Shu Yerga Tashlang",drop_video:"Videoni Shu Yerga Tashlang"},ac={common:Si,upload_text:ki},sc=Object.freeze(Object.defineProperty({__proto__:null,common:Si,default:ac,upload_text:ki},Symbol.toStringTag,{value:"Module"})),Ai={built_with_gradio:"使用Gradio构建",clear:"清除",or:"或",submit:"提交"},Ti={click_to_upload:"点击上传",drop_audio:"拖放音频至此处",drop_csv:"拖放CSV至此处",drop_file:"拖放文件至此处",drop_image:"拖放图片至此处",drop_video:"拖放视频至此处"},lc={common:Ai,upload_text:Ti},cc=Object.freeze(Object.defineProperty({__proto__:null,common:Ai,default:lc,upload_text:Ti},Symbol.toStringTag,{value:"Module"})),Bi={built_with_gradio:"使用Gradio構建",clear:"清除",or:"或",submit:"提交"},Pi={click_to_upload:"點擊上傳",drop_audio:"刪除音頻",drop_csv:"刪除CSV",drop_file:"刪除檔案",drop_image:"刪除圖片",drop_video:"刪除影片"},uc={common:Bi,upload_text:Pi},fc=Object.freeze(Object.defineProperty({__proto__:null,common:Bi,default:uc,upload_text:Pi},Symbol.toStringTag,{value:"Module"})),ro=Object.assign({"./lang/ar.json":ml,"./lang/ca.json":yl,"./lang/ckb.json":wl,"./lang/de.json":El,"./lang/en.json":kl,"./lang/es.json":Tl,"./lang/eu.json":Pl,"./lang/fa.json":Cl,"./lang/fr.json":Ol,"./lang/he.json":Il,"./lang/hi.json":Rl,"./lang/ja.json":Dl,"./lang/ko.json":Ul,"./lang/lt.json":Fl,"./lang/nl.json":Vl,"./lang/pl.json":Wl,"./lang/pt-BR.json":Jl,"./lang/ru.json":Ql,"./lang/ta.json":$l,"./lang/tr.json":tc,"./lang/uk.json":oc,"./lang/ur.json":ic,"./lang/uz.json":sc,"./lang/zh-CN.json":cc,"./lang/zh-TW.json":fc});function dc(){let e={};for(const t in ro){const r=t.split("/").pop().split(".").shift();e[r]=ro[t].default}return e}const oo=dc();for(const e in oo)Wo(e,oo[e]);function hc(){Ms({fallbackLocale:"en",initialLocale:Is()})}function no(e){let t,r;return t=new _l({props:{absolute:!e[4],status:e[14],timer:!1,queue_position:null,queue_size:null,translucent:!0,loading_text:e[21],$$slots:{error:[gc]},$$scope:{ctx:e}}}),{c(){rt(t.$$.fragment)},m(o,n){ze(t,o,n),r=!0},p(o,n){const i={};n[0]&16&&(i.absolute=!o[4]),n[0]&16384&&(i.status=o[14]),n[0]&1057024|n[1]&16384&&(i.$$scope={dirty:n,ctx:o}),t.$set(i)},i(o){r||($(t.$$.fragment,o),r=!0)},o(o){se(t.$$.fragment,o),r=!1},d(o){De(t,o)}}}function pc(e){let t,r=e[20]("errors.contact_page_author")+"",o;return{c(){t=D("p"),o=O(r),b(t,"class","svelte-y6l4b")},m(n,i){T(n,t,i),B(t,o)},p(n,i){i[0]&1048576&&r!==(r=n[20]("errors.contact_page_author")+"")&&re(o,r)},d(n){n&&k(t)}}}function _c(e){let t,r,o,n,i,a;return{c(){t=D("p"),r=O("Please "),o=D("a"),n=O("contact the author of the space"),a=O(" to let them know."),b(o,"href",i="https://huggingface.co/spaces/"+e[8]+"/discussions/new?title="+e[22].title(e[13]?.detail)+"&description="+e[22].description(e[13]?.detail,location.origin)),b(o,"class","svelte-y6l4b"),b(t,"class","svelte-y6l4b")},m(l,u){T(l,t,u),B(t,r),B(t,o),B(o,n),B(t,a)},p(l,u){u[0]&8448&&i!==(i="https://huggingface.co/spaces/"+l[8]+"/discussions/new?title="+l[22].title(l[13]?.detail)+"&description="+l[22].description(l[13]?.detail,location.origin))&&b(o,"href",i)},d(l){l&&k(t)}}}function gc(e){let t,r,o,n=(e[13]?.message||"")+"",i,a;function l(c,f){return(c[13].status==="space_error"||c[13].status==="paused")&&c[13].discussions_enabled?_c:pc}let u=l(e),s=u(e);return{c(){t=D("div"),r=D("p"),o=D("strong"),i=O(n),a=te(),s.c(),b(r,"class","svelte-y6l4b"),b(t,"class","error svelte-y6l4b"),b(t,"slot","error")},m(c,f){T(c,t,f),B(t,r),B(r,o),B(o,i),B(t,a),s.m(t,null)},p(c,f){f[0]&8192&&n!==(n=(c[13]?.message||"")+"")&&re(i,n),u===(u=l(c))&&s?s.p(c,f):(s.d(1),s=u(c),s&&(s.c(),s.m(t,null)))},d(c){c&&k(t),s.d()}}}function mc(e){let t,r,o,n;const i=[{app:e[16]},e[12],{theme_mode:e[15]},{control_page_title:e[5]},{target:e[9]},{autoscroll:e[0]},{show_footer:!e[4]},{app_mode:e[3]},{version:e[1]}];function a(s){e[31](s)}function l(s){e[32](s)}let u={};for(let s=0;s<i.length;s+=1)u=fo(u,i[s]);return e[10]!==void 0&&(u.ready=e[10]),e[11]!==void 0&&(u.render_complete=e[11]),t=new e[18]({props:u}),me.push(()=>Yt(t,"ready",a)),me.push(()=>Yt(t,"render_complete",l)),{c(){rt(t.$$.fragment)},m(s,c){ze(t,s,c),n=!0},p(s,c){const f=c[0]&102971?ba(i,[c[0]&65536&&{app:s[16]},c[0]&4096&&ya(s[12]),c[0]&32768&&{theme_mode:s[15]},c[0]&32&&{control_page_title:s[5]},c[0]&512&&{target:s[9]},c[0]&1&&{autoscroll:s[0]},c[0]&16&&{show_footer:!s[4]},c[0]&8&&{app_mode:s[3]},c[0]&2&&{version:s[1]}]):{};!r&&c[0]&1024&&(r=!0,f.ready=s[10],Jt(()=>r=!1)),!o&&c[0]&2048&&(o=!0,f.render_complete=s[11],Jt(()=>o=!1)),t.$set(f)},i(s){n||($(t.$$.fragment,s),n=!0)},o(s){se(t.$$.fragment,s),n=!1},d(s){De(t,s)}}}function bc(e){let t,r;return t=new e[19]({props:{auth_message:e[12].auth_message,root:e[12].root,space_id:e[8],app_mode:e[3]}}),{c(){rt(t.$$.fragment)},m(o,n){ze(t,o,n),r=!0},p(o,n){const i={};n[0]&4096&&(i.auth_message=o[12].auth_message),n[0]&4096&&(i.root=o[12].root),n[0]&256&&(i.space_id=o[8]),n[0]&8&&(i.app_mode=o[3]),t.$set(i)},i(o){r||($(t.$$.fragment,o),r=!0)},o(o){se(t.$$.fragment,o),r=!1},d(o){De(t,o)}}}function yc(e){let t,r,o,n,i,a=(e[14]==="pending"||e[14]==="error")&&!(e[12]&&e[12]?.auth_required)&&no(e);const l=[bc,mc],u=[];function s(c,f){return c[12]?.auth_required&&c[19]?0:c[12]&&c[18]&&c[17]?1:-1}return~(r=s(e))&&(o=u[r]=l[r](e)),{c(){a&&a.c(),t=te(),o&&o.c(),n=Se()},m(c,f){a&&a.m(c,f),T(c,t,f),~r&&u[r].m(c,f),T(c,n,f),i=!0},p(c,f){(c[14]==="pending"||c[14]==="error")&&!(c[12]&&c[12]?.auth_required)?a?(a.p(c,f),f[0]&20480&&$(a,1)):(a=no(c),a.c(),$(a,1),a.m(t.parentNode,t)):a&&(yt(),se(a,1,1,()=>{a=null}),vt());let d=r;r=s(c),r===d?~r&&u[r].p(c,f):(o&&(yt(),se(u[d],1,1,()=>{u[d]=null}),vt()),~r?(o=u[r],o?o.p(c,f):(o=u[r]=l[r](c),o.c()),$(o,1),o.m(n.parentNode,n)):o=null)},i(c){i||($(a),$(o),i=!0)},o(c){se(a),se(o),i=!1},d(c){c&&(k(t),k(n)),a&&a.d(c),~r&&u[r].d(c)}}}function vc(e){let t,r,o;function n(a){e[33](a)}let i={display:e[6]&&e[4],is_embed:e[4],info:!!e[8]&&e[7],version:e[1],initial_height:e[2],space:e[8],loaded:e[14]==="complete",$$slots:{default:[yc]},$$scope:{ctx:e}};return e[9]!==void 0&&(i.wrapper=e[9]),t=new Ys({props:i}),me.push(()=>Yt(t,"wrapper",n)),{c(){rt(t.$$.fragment)},m(a,l){ze(t,a,l),o=!0},p(a,l){const u={};l[0]&80&&(u.display=a[6]&&a[4]),l[0]&16&&(u.is_embed=a[4]),l[0]&384&&(u.info=!!a[8]&&a[7]),l[0]&2&&(u.version=a[1]),l[0]&4&&(u.initial_height=a[2]),l[0]&256&&(u.space=a[8]),l[0]&16384&&(u.loaded=a[14]==="complete"),l[0]&2096955|l[1]&16384&&(u.$$scope={dirty:l,ctx:a}),!r&&l[0]&512&&(r=!0,u.wrapper=a[9],Jt(()=>r=!1)),t.$set(u)},i(a){o||($(t.$$.fragment,a),o=!0)},o(a){se(t.$$.fragment,a),o=!1},d(a){De(t,a)}}}let wc=-1;function xc(){const e=be({}),t=new Map,r=new IntersectionObserver(n=>{n.forEach(i=>{if(i.isIntersecting){let a=t.get(i.target);a!==void 0&&e.update(l=>({...l,[a]:!0}))}})});function o(n,i){t.set(i,n),r.observe(i)}return{register:o,subscribe:e.subscribe}}const io=xc();function Ec(e,t,r){let o,n;xe(e,_r,m=>r(20,o=m)),xe(e,io,m=>r(30,n=m)),hc();let{autoscroll:i}=t,{version:a}=t,{initial_height:l}=t,{app_mode:u}=t,{is_embed:s}=t,{theme_mode:c="system"}=t,{control_page_title:f}=t,{container:d}=t,{info:_}=t,{eager:p}=t,g,{mount_css:y=Vt}=t,{client:w}=t,{upload_files:E}=t,{space:h}=t,{host:v}=t,{src:A}=t,I=wc++,S="pending",H,j=!1,X=!1,U,C=o("common.loading")+"...",R;async function oe(m,Z){if(Z){let V=document.createElement("style");V.innerHTML=Z,m.appendChild(V)}await y(U.root+"/theme.css",document.head),U.stylesheets&&await Promise.all(U.stylesheets.map(V=>{let _e=V.startsWith("http:")||V.startsWith("https:");return y(_e?V:U.root+"/"+V,document.head)}))}function P(m){let V=new URL(window.location.toString()).searchParams.get("__theme");return r(15,R=c||V||"system"),R==="dark"||R==="light"?W(m,R):r(15,R=ue(m)),R}function ue(m){const Z=V();window?.matchMedia("(prefers-color-scheme: dark)")?.addEventListener("change",V);function V(){let _e=window?.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light";return W(m,_e),_e}return Z}function W(m,Z){const V=s?m.parentElement:document.body,_e=s?m:m.parentElement;_e.style.background="var(--body-background-fill)",Z==="dark"?V.classList.add("dark"):V.classList.remove("dark")}let L={message:"",load_status:"pending",status:"sleeping",detail:"SLEEPING"},ee,le=!1;function fe(m){r(13,L=m)}Xt(async()=>{window.__gradio_mode__!=="website"&&r(15,R=P(H));const m=v||h||A||location.origin;r(16,ee=await w(m,{status_callback:fe,normalise_files:!1})),r(12,U=ee.config),window.__gradio_space__=U.space_id,r(13,L={message:"",load_status:"complete",status:"running",detail:"RUNNING"}),await oe(H,U.css),r(17,le=!0),window.__is_colab__=U.is_colab,U.dev_mode&&setTimeout(()=>{const{host:Z}=new URL(m);let V=new URL(`ws://${Z}/dev/reload`);g=new WebSocket(V),g.onmessage=async function(_e){_e.data==="CHANGE"&&(r(16,ee=await w(m,{status_callback:fe,normalise_files:!1})),r(16,ee.config.root=ee.config.path,ee),r(12,U=ee.config),window.__gradio_space__=U.space_id)}},200)}),ha("upload_files",E);let G,x;async function Ae(){r(18,G=(await pt(()=>import("./Blocks-4b426f9b.js").then(m=>m.B),["./Blocks-4b426f9b.js","./Button-6316ad85.js","./Button-620848cb.css","./Blocks-0733f3b3.css"],import.meta.url)).default)}async function Ge(){r(19,x=(await pt(()=>import("./Login-fede0ad0.js"),["./Login-fede0ad0.js","./StaticForm-a1d04327.js","./StaticForm-3812b7f1.css","./InteractiveTextbox-ae52774b.js","./Textbox-a18ed88c.js","./Button-6316ad85.js","./Button-620848cb.css","./BlockTitle-5b421125.js","./Info-7bbe887e.js","./Copy-69ac8f7d.js","./Textbox-dde6f8cc.css","./StaticColumn-d254653b.js","./StaticColumn-2853eb31.css","./Login-9c3cc0eb.css"],import.meta.url)).default)}function Fe(){U.auth_required?Ge():Ae()}const J={readable_error:{NO_APP_FILE:o("errors.no_app_file"),CONFIG_ERROR:o("errors.config_error"),BUILD_ERROR:o("errors.build_error"),RUNTIME_ERROR:o("errors.runtime_error"),PAUSED:o("errors.space_paused")},title(m){return encodeURIComponent(o("errors.space_not_working"))},description(m,Z){return encodeURIComponent(`Hello, | |
Firstly, thanks for creating this space! | |
I noticed that the space isn't working correctly because there is ${this.readable_error[m]||"an error"}. | |
It would be great if you could take a look at this because this space is being embedded on ${Z}. | |
Thanks!`)}};Xt(async()=>{io.register(I,H)});function Q(m){j=m,r(10,j)}function ne(m){X=m,r(11,X)}function ie(m){H=m,r(9,H)}return e.$$set=m=>{"autoscroll"in m&&r(0,i=m.autoscroll),"version"in m&&r(1,a=m.version),"initial_height"in m&&r(2,l=m.initial_height),"app_mode"in m&&r(3,u=m.app_mode),"is_embed"in m&&r(4,s=m.is_embed),"theme_mode"in m&&r(23,c=m.theme_mode),"control_page_title"in m&&r(5,f=m.control_page_title),"container"in m&&r(6,d=m.container),"info"in m&&r(7,_=m.info),"eager"in m&&r(24,p=m.eager),"mount_css"in m&&r(25,y=m.mount_css),"client"in m&&r(26,w=m.client),"upload_files"in m&&r(27,E=m.upload_files),"space"in m&&r(8,h=m.space),"host"in m&&r(28,v=m.host),"src"in m&&r(29,A=m.src)},e.$$.update=()=>{e.$$.dirty[0]&4096&&U?.app_id&&U.app_id,e.$$.dirty[0]&9216&&r(14,S=!j&&L.load_status!=="error"?"pending":!j&&L.load_status==="error"?"error":L.load_status),e.$$.dirty[0]&1090523136&&U&&(p||n[I])&&Fe(),e.$$.dirty[0]&2560&&X&&H.dispatchEvent(new CustomEvent("render",{bubbles:!0,cancelable:!1,composed:!0}))},[i,a,l,u,s,f,d,_,h,H,j,X,U,L,S,R,ee,le,G,x,o,C,J,c,p,y,w,E,v,A,n,Q,ne,ie]}class ao extends At{constructor(t){super(),kt(this,t,Ec,vc,tt,{autoscroll:0,version:1,initial_height:2,app_mode:3,is_embed:4,theme_mode:23,control_page_title:5,container:6,info:7,eager:24,mount_css:25,client:26,upload_files:27,space:8,host:28,src:29},null,[-1,-1])}}const Sc="./assets/index-0ef7ae29.css";let ar;ar=[];function kc(){class e extends HTMLElement{constructor(){super(),this.host=this.getAttribute("host"),this.space=this.getAttribute("space"),this.src=this.getAttribute("src"),this.control_page_title=this.getAttribute("control_page_title"),this.initial_height=this.getAttribute("initial_height")??"300px",this.is_embed=this.getAttribute("embed")??"true",this.container=this.getAttribute("container")??"true",this.info=this.getAttribute("info")??!0,this.autoscroll=this.getAttribute("autoscroll"),this.eager=this.getAttribute("eager"),this.theme_mode=this.getAttribute("theme_mode"),this.updating=!1,this.loading=!1}async connectedCallback(){this.loading=!0,this.app&&this.app.$destroy(),typeof ar!="string"&&ar.forEach(n=>Vt(n,document.head)),await Vt(Sc,document.head);const r=new CustomEvent("domchange",{bubbles:!0,cancelable:!1,composed:!0});new MutationObserver(n=>{this.dispatchEvent(r)}).observe(this,{childList:!0}),this.app=new ao({target:this,props:{space:this.space?this.space.trim():this.space,src:this.src?this.src.trim():this.src,host:this.host?this.host.trim():this.host,info:this.info!=="false",container:this.container!=="false",is_embed:this.is_embed!=="false",initial_height:this.initial_height,eager:this.eager==="true",version:"3-44-3",theme_mode:this.theme_mode,autoscroll:this.autoscroll==="true",control_page_title:this.control_page_title==="true",client:xr,upload_files:wr,app_mode:window.__gradio_mode__==="app"}}),this.updating&&this.setAttribute(this.updating.name,this.updating.value),this.loading=!1}static get observedAttributes(){return["src","space","host"]}attributeChangedCallback(r,o,n){if((r==="host"||r==="space"||r==="src")&&n!==o){if(this.updating={name:r,value:n},this.loading)return;this.app&&this.app.$destroy(),this.space=null,this.host=null,this.src=null,r==="host"?this.host=n:r==="space"?this.space=n:r==="src"&&(this.src=n),this.app=new ao({target:this,props:{space:this.space?this.space.trim():this.space,src:this.src?this.src.trim():this.src,host:this.host?this.host.trim():this.host,info:this.info!=="false",container:this.container!=="false",is_embed:this.is_embed!=="false",initial_height:this.initial_height,eager:this.eager==="true",version:"3-44-3",theme_mode:this.theme_mode,autoscroll:this.autoscroll==="true",control_page_title:this.control_page_title==="true",client:xr,upload_files:wr,app_mode:window.__gradio_mode__==="app"}}),this.updating=!1}}}customElements.get("gradio-app")||customElements.define("gradio-app",e)}kc();export{ma as $,Yc as A,pe as B,Xc as C,Xt as D,Zc as E,rt as F,ze as G,De as H,wt as I,eu as J,ae as K,$c as L,Ki as M,Y as N,Eo as O,el as P,Se as Q,me as R,At as S,Fc as T,Yt as U,ba as V,ya as W,Jt as X,ha as Y,fo as Z,pt as _,Ye as a,xe as a0,_r as a1,hc as a2,tu as a3,Qs as a4,ea as a5,po as a6,pa as a7,Mc as a8,_o as a9,be as aA,Nc as aB,cr as aC,Rc as aa,bo as ab,yo as ac,mo as ad,_l as ae,Oc as af,To as ag,Ic as ah,Ur as ai,da as aj,qc as ak,Vc as al,Qc as am,jc as an,Gc as ao,Uc as ap,Cc as aq,Wc as ar,wr as as,Ac as at,so as au,Bc as av,Tc as aw,Dc as ax,Kc as ay,zc as az,Ee as b,mt as c,bt as d,kt as e,de as f,b as g,T as h,lr as i,B as j,k,St as l,D as m,K as n,te as o,Br as p,Lc as q,yt as r,tt as s,O as t,se as u,vt as v,$ as w,re as x,Oe as y,Jc as z}; | |
//# sourceMappingURL=index-59874607.js.map | |