-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}},{key:"changeLanguage",value:function(i,o){var s=this;this.isLanguageChangingTo=i;var a=mr();this.emit("languageChanging",i);var l=function(d){s.language=d,s.languages=s.services.languageUtils.toResolveHierarchy(d),s.resolvedLanguage=void 0,s.setResolvedLanguage(d)},u=function(d,p){p?(l(p),s.translator.changeLanguage(p),s.isLanguageChangingTo=void 0,s.emit("languageChanged",p),s.logger.log("languageChanged",p)):s.isLanguageChangingTo=void 0,a.resolve(function(){return s.t.apply(s,arguments)}),o&&o(d,function(){return s.t.apply(s,arguments)})},c=function(d){!i&&!d&&s.services.languageDetector&&(d=[]);var p=typeof d=="string"?d:s.services.languageUtils.getBestMatchFromCodes(d);p&&(s.language||l(p),s.translator.language||s.translator.changeLanguage(p),s.services.languageDetector&&s.services.languageDetector.cacheUserLanguage(p)),s.loadResources(p,function(v){u(v,p)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(c):c(i),a}},{key:"getFixedT",value:function(i,o,s){var a=this,l=function u(c,f){var d;if(Yt(f)!=="object"){for(var p=arguments.length,v=new Array(p>2?p-2:0),S=2;S1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var c=function(p,v){var S=o.services.backendConnector.state["".concat(p,"|").concat(v)];return S===-1||S===2};if(s.precheck){var f=s.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(a,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(a,i)&&(!l||c(u,i)))}},{key:"loadNamespaces",value:function(i,o){var s=this,a=mr();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){s.options.ns.indexOf(l)<0&&s.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),o&&o(l)}),a):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var s=mr();typeof i=="string"&&(i=[i]);var a=this.options.preload||[],l=i.filter(function(u){return a.indexOf(u)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(u){s.resolve(),o&&o(u)}),s):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return o.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ni,a=ct(ct(ct({},this.options),o),{isClone:!0}),l=new n(a);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var u=["store","services","language"];return u.forEach(function(c){l[c]=i[c]}),l.services=ct({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new lf(l.services,l.options),l.translator.on("*",function(c){for(var f=arguments.length,d=new Array(f>1?f-1:0),p=1;p0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Ro(e,t)});var Pe=Ro.createInstance();Pe.createInstance=Ro.createInstance;Pe.createInstance;Pe.init;Pe.loadResources;Pe.reloadResources;Pe.use;Pe.changeLanguage;Pe.getFixedT;Pe.t;Pe.exists;Pe.setDefaultNamespace;Pe.hasLoadedNamespace;Pe.loadNamespaces;Pe.loadLanguages;const z1="Stable Diffusion UI",$1="",B1={home:"Home",history:"History",community:"Community",settings:"Settings"},Q1={"status-starting":"Stable Diffusion is starting...","status-ready":"Stable Diffusion is ready to use!","status-error":"Stable Diffusion is not running!","editor-title":"Prompt","initial-img-txt":"Initial Image: (optional)","initial-img-btn":"Browse...","initial-img-text2":"No file selected.","make-img-btn":"Make Image","make-img-btn-stop":"Stop"},V1={"base-img":"Use base image:",seed:"Seed:","amount-of-img":"Amount of images to make:","how-many":"How many at once:","stream-img":"Stream images (this will slow down image generation):",width:"Width:",height:"Height:",sampler:"Sampler:",steps:"Number of inference steps:","guide-scale":"Guidance Scale:","prompt-str":"Prompt Strength:","live-preview":"Show a live preview of the image (disable this for faster image generation)","fix-face":"Fix incorrect faces and eyes (uses GFPGAN)",ups:"Upscale the image to 4x resolution using:","no-ups":"No Upscaling",corrected:"Show only the corrected/upscaled image"},H1={txt:"Image Modifiers (art styles, tags etc)"},K1={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},q1={fave:"Favorites Only",search:"Search"},W1={ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cps:"Cross profile sharing","cps-disc":"Profiles will see suggestions from each other.",acb:"Allow cloud backup","acb-disc":"A button will show up for images on hover","acb-place":"Choose your","acc-api":"Api key","acb-api-place":"Your API key",save:"SAVE"},G1=`If you found this project useful and want to help keep it alive, please to help cover the cost of development and maintenance! Thank you for your support!
+ */var ds=_.exports,d0=fu.exports;function p0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var h0=typeof Object.is=="function"?Object.is:p0,g0=d0.useSyncExternalStore,m0=ds.useRef,v0=ds.useEffect,y0=ds.useMemo,S0=ds.useDebugValue;Qh.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=m0(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=y0(function(){function l(m){if(!u){if(u=!0,c=m,m=r(m),i!==void 0&&s.hasValue){var h=s.value;if(i(h,m))return f=h}return f=m}if(h=f,h0(c,m))return h;var y=r(m);return i!==void 0&&i(h,y)?h:(c=m,f=y)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=g0(e,o[0],o[1]);return v0(function(){s.hasValue=!0,s.value=a},[a]),S0(a),a};(function(e){e.exports=Qh})(Hh);const w0=rd(Hh.exports),{useSyncExternalStoreWithSelector:x0}=w0;function k0(e,t=e.getState,n){const r=x0(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return _.exports.useDebugValue(r),r}const xf=e=>{const t=typeof e=="function"?f0(e):e,n=(r,i)=>k0(t,r,i);return Object.assign(n,t),n},O0=e=>e?xf(e):xf;var xi=O0;const P0=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,...a}=t;let l;try{l=(o!=null?o:({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const u=l.connect(a);let c=!0;i.setState=(m,h,y)=>{const k=n(m,h);return c&&u.send(y===void 0?{type:s||"anonymous"}:typeof y=="string"?{type:y}:y,r()),k};const f=(...m)=>{const h=c;c=!1,n(...m),c=h},d=e(i.setState,r,i);if(u.init(d),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let m=!1;const h=i.dispatch;i.dispatch=(...y)=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&y[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),h(...y)}}return u.subscribe(m=>{var h;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Xs(m.payload,y=>{if(y.type==="__setState"){f(y.state);return}!i.dispatchFromDevtools||typeof i.dispatch=="function"&&i.dispatch(y)});case"DISPATCH":switch(m.payload.type){case"RESET":return f(d),u.init(i.getState());case"COMMIT":return u.init(i.getState());case"ROLLBACK":return Xs(m.state,y=>{f(y),u.init(i.getState())});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Xs(m.state,y=>{f(y)});case"IMPORT_STATE":{const{nextLiftedState:y}=m.payload,k=(h=y.computedStates.slice(-1)[0])==null?void 0:h.state;if(!k)return;f(k),u.send(null,y);return}case"PAUSE_RECORDING":return c=!c}return}}),d},E0=P0,Xs=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)},Uo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Uo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Uo(r)(n)}}}},C0=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:k=>k,version:0,merge:(k,v)=>({...v,...k}),...t},s=!1;const a=new Set,l=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...k)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...k)},r,i);const c=Uo(o.serialize),f=()=>{const k=o.partialize({...r()});let v;const p=c({state:k,version:o.version}).then(g=>u.setItem(o.name,g)).catch(g=>{v=g});if(v)throw v;return p},d=i.setState;i.setState=(k,v)=>{d(k,v),f()};const m=e((...k)=>{n(...k),f()},r,i);let h;const y=()=>{var k;if(!u)return;s=!1,a.forEach(p=>p(r()));const v=((k=o.onRehydrateStorage)==null?void 0:k.call(o,r()))||void 0;return Uo(u.getItem.bind(u))(o.name).then(p=>{if(p)return o.deserialize(p)}).then(p=>{if(p)if(typeof p.version=="number"&&p.version!==o.version){if(o.migrate)return o.migrate(p.state,p.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return p.state}).then(p=>{var g;return h=o.merge(p,(g=r())!=null?g:m),n(h,!0),f()}).then(()=>{v==null||v(h,void 0),s=!0,l.forEach(p=>p(h))}).catch(p=>{v==null||v(void 0,p)})};return i.persist={setOptions:k=>{o={...o,...k},k.getStorage&&(u=k.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:k=>(a.add(k),()=>{a.delete(k)}),onFinishHydration:k=>(l.add(k),()=>{l.delete(k)})},y(),h||m},_0=C0;function zo(){return Math.floor(Math.random()*1e4)}const R0=["plms","ddim","heun","euler","euler_a","dpm2","dpm2_a","lms"],F=xi(E0((e,t)=>({parallelCount:1,requestOptions:{session_id:new Date().getTime().toString(),prompt:"a photograph of an astronaut riding a horse",seed:zo(),num_outputs:1,num_inference_steps:50,guidance_scale:7.5,width:512,height:512,prompt_strength:.8,turbo:!0,use_cpu:!1,use_full_precision:!0,save_to_disk_path:"null",use_face_correction:"GFPGANv1.3",use_upscale:"RealESRGAN_x4plus",show_only_filtered_image:!0,init_image:void 0,sampler:"plms",stream_progress_updates:!0,stream_image_progress:!1,mask:void 0},tags:[],tagMap:{},uiOptions:{isUseRandomSeed:!0,isUseAutoSave:!1,isSoundEnabled:!1},allModifiers:[],isInpainting:!1,setParallelCount:n=>e(H(r=>{r.parallelCount=n})),setRequestOptions:(n,r)=>{e(H(i=>{i.requestOptions[n]=r}))},getValueForRequestKey:n=>t().requestOptions[n],setAllModifiers:n=>{e(H(r=>{r.allModifiers=n}))},toggleTag:(n,r)=>{e(H(i=>{Object.keys(i.tagMap).includes(n)?i.tagMap[n].includes(r)?i.tagMap[n]=i.tagMap[n].filter(o=>o!==r):i.tagMap[n].push(r):i.tagMap[n]=[r]}))},hasTag:(n,r)=>{var i;return(i=t().tagMap[n])==null?void 0:i.includes(r)},selectedTags:()=>{const n=t().allModifiers,r=t().tagMap;let i=[];for(const[o,s]of Object.entries(r)){const a=n.find(l=>l.category===o);if(a)for(const l of s){const u=a.modifiers.find(c=>c.modifier===l);u&&(i=i.concat({...u,category:a.category}))}}return i},builtRequest:()=>{const n=t(),r=n.requestOptions,o=t().selectedTags().map(l=>l.modifier),s=`${r.prompt}, ${o.join(",")}`,a={...r,prompt:s};return n.uiOptions.isUseAutoSave||(a.save_to_disk_path=null),a.init_image===void 0&&(a.prompt_strength=void 0),a.use_upscale===""&&(a.use_upscale=null),a.use_upscale===null&&a.use_face_correction===null&&(a.show_only_filtered_image=!1),a},toggleUseFaceCorrection:()=>{e(H(n=>{const r=typeof n.getValueForRequestKey("use_face_correction")=="string"?null:"GFPGANv1.3";n.requestOptions.use_face_correction=r}))},isUsingFaceCorrection:()=>typeof t().getValueForRequestKey("use_face_correction")=="string",isUsingUpscaling:()=>t().getValueForRequestKey("use_upscale")!=="",toggleUseRandomSeed:()=>{e(H(n=>{n.uiOptions.isUseRandomSeed=!n.uiOptions.isUseRandomSeed,n.requestOptions.seed=n.uiOptions.isUseRandomSeed?zo():n.requestOptions.seed}))},isRandomSeed:()=>t().uiOptions.isUseRandomSeed,toggleUseAutoSave:()=>{e(H(n=>{n.uiOptions.isUseAutoSave=!n.uiOptions.isUseAutoSave}))},isUseAutoSave:()=>t().uiOptions.isUseAutoSave,toggleSoundEnabled:()=>{e(H(n=>{n.uiOptions.isSoundEnabled=!n.uiOptions.isSoundEnabled}))},isSoundEnabled:()=>t().uiOptions.isSoundEnabled,toggleInpainting:()=>{e(H(n=>{n.isInpainting=!n.isInpainting}))}}))),N0=`${xt}/ding.mp3`,Pu=rt.forwardRef((e,t)=>x("audio",{ref:t,style:{display:"none"},children:x("source",{src:N0,type:"audio/mp3"})}));Pu.displayName="AudioDing";var kf="_1jo75h1",Of="_1jo75h0",I0="_1jo75h2";const Pf="Stable Diffusion is starting...",b0="Stable Diffusion is ready to use!",Ef="Stable Diffusion is not running!";function L0({className:e}){const[t,n]=_.exports.useState(Pf),[r,i]=_.exports.useState(Of),o=_.exports.useRef(),{status:s,data:a}=ur(["health"],i0,{refetchInterval:r0});return _.exports.useEffect(()=>{var l;s==="loading"?(n(Pf),i(Of)):s==="error"?(n(Ef),i(kf)):s==="success"&&(a[0]==="OK"?(n(b0),i(I0),(l=o.current)==null||l.play().catch(u=>{console.log("DING!")})):(n(Ef),i(kf)))},[s,a,o]),I(jt,{children:[x(Pu,{ref:o}),x("p",{className:[r,e].join(" "),children:t})]})}const Vh=typeof window>"u"||typeof document>"u";let Bo=Vh?_.exports.useEffect:_.exports.useLayoutEffect;function ps(e){let t=_.exports.useRef(e);return Bo(()=>{t.current=e},[e]),t}let ye=function(e){let t=ps(e);return rt.useCallback((...n)=>t.current(...n),[t])},Zs={serverHandoffComplete:!1};function T0(){let[e,t]=_.exports.useState(Zs.serverHandoffComplete);return _.exports.useEffect(()=>{e!==!0&&t(!0)},[e]),_.exports.useEffect(()=>{Zs.serverHandoffComplete===!1&&(Zs.serverHandoffComplete=!0)},[]),e}var Cf;let D0=0;function _f(){return++D0}let hr=(Cf=rt.useId)!=null?Cf:function(){let e=T0(),[t,n]=rt.useState(e?_f:null);return Bo(()=>{t===null&&n(_f())},[t]),t!=null?""+t:void 0};function Ft(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ft),r}function Eu(e){return Vh?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let dl=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Sn=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Sn||{}),F0=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(F0||{}),M0=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(M0||{});function Kh(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(dl))}var Cu=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Cu||{});function qh(e,t=0){var n;return e===((n=Eu(e))==null?void 0:n.body)?!1:Ft(t,{[0](){return e.matches(dl)},[1](){let r=e;for(;r!==null;){if(r.matches(dl))return!0;r=r.parentElement}return!1}})}let j0=["textarea","input"].join(",");function A0(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,j0))!=null?n:!1}function $0(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),o=t(r);if(i===null||o===null)return 0;let s=i.compareDocumentPosition(o);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function qn(e,t,n=!0,r=null){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?$0(e):e:Kh(e);r=r!=null?r:i.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=t&32?{preventScroll:!0}:{},u=0,c=o.length,f;do{if(u>=c||u+c<=0)return 0;let d=a+u;if(t&16)d=(d+c)%c;else{if(d<0)return 3;if(d>=c)return 1}f=o[d],f==null||f.focus(l),u+=s}while(f!==i.activeElement);return t&6&&A0(f)&&f.select(),f.hasAttribute("tabindex")||f.setAttribute("tabindex","0"),2}function ea(e,t,n){let r=ps(t);_.exports.useEffect(()=>{function i(o){r.current(o)}return document.addEventListener(e,i,n),()=>document.removeEventListener(e,i,n)},[e,n])}function U0(e,t,n=!0){let r=_.exports.useRef(!1);_.exports.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function i(s,a){if(!r.current||s.defaultPrevented)return;let l=function c(f){return typeof f=="function"?c(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e),u=a(s);if(u!==null&&!!u.ownerDocument.documentElement.contains(u)){for(let c of l){if(c===null)continue;let f=c instanceof HTMLElement?c:c.current;if(f!=null&&f.contains(u))return}return!qh(u,Cu.Loose)&&u.tabIndex!==-1&&s.preventDefault(),t(s,u)}}let o=_.exports.useRef(null);ea("mousedown",s=>{r.current&&(o.current=s.target)},!0),ea("click",s=>{!o.current||(i(s,()=>o.current),o.current=null)},!0),ea("blur",s=>i(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Rf(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function z0(e,t){let[n,r]=_.exports.useState(()=>Rf(e));return Bo(()=>{r(Rf(e))},[e.type,e.as]),Bo(()=>{n||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let Wh=Symbol();function B0(e,t=!0){return Object.assign(e,{[Wh]:t})}function gr(...e){let t=_.exports.useRef(e);_.exports.useEffect(()=>{t.current=e},[e]);let n=ye(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[Wh]))?void 0:n}var pi=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(pi||{}),H0=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(H0||{});function wr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:s}){let a=Gh(t,e);if(o)return zi(a,n,r,s);let l=i!=null?i:0;if(l&2){let{static:u=!1,...c}=a;if(u)return zi(c,n,r,s)}if(l&1){let{unmount:u=!0,...c}=a;return Ft(u?0:1,{[0](){return null},[1](){return zi({...c,hidden:!0,style:{display:"none"}},n,r,s)}})}return zi(a,n,r,s)}function zi(e,t={},n,r){let{as:i=n,children:o,refName:s="ref",...a}=ta(e,["unmount","static"]),l=e.ref!==void 0?{[s]:e.ref}:{},u=typeof o=="function"?o(t):o;a.className&&typeof a.className=="function"&&(a.className=a.className(t));let c={};if(t){let f=!1,d=[];for(let[m,h]of Object.entries(t))typeof h=="boolean"&&(f=!0),h===!0&&d.push(m);f&&(c["data-headlessui-state"]=d.join(" "))}if(i===_.exports.Fragment&&Object.keys(Nf(a)).length>0){if(!_.exports.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map(f=>` - ${f}`).join(`
+`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
+`)].join(`
+`));return _.exports.cloneElement(u,Object.assign({},Gh(u.props,Nf(ta(a,["ref"]))),c,l,Q0(u.ref,l.ref)))}return _.exports.createElement(i,Object.assign({},ta(a,["ref"]),i!==_.exports.Fragment&&l,i!==_.exports.Fragment&&c),u)}function Q0(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function Gh(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...o){let s=n[r];for(let a of s){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...o)}}});return t}function xr(e){var t;return Object.assign(_.exports.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function Nf(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function ta(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Yh(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&V0(n)?!1:r}function V0(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}let K0="div";var Ho=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ho||{});let pl=xr(function(e,t){let{features:n=1,...r}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return wr({ourProps:i,theirProps:r,slot:{},defaultTag:K0,name:"Hidden"})}),_u=_.exports.createContext(null);_u.displayName="OpenClosedContext";var hi=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(hi||{});function Jh(){return _.exports.useContext(_u)}function q0({value:e,children:t}){return rt.createElement(_u.Provider,{value:e},t)}var Vt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Vt||{});function W0(e,t,n){let r=ps(t);_.exports.useEffect(()=>{function i(o){r.current(o)}return window.addEventListener(e,i,n),()=>window.removeEventListener(e,i,n)},[e,n])}var wn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(wn||{});function Xh(){let e=_.exports.useRef(0);return W0("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Ru(...e){return _.exports.useMemo(()=>Eu(...e),[...e])}function G0(e,t,n,r){let i=ps(n);_.exports.useEffect(()=>{e=e!=null?e:window;function o(s){i.current(s)}return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o,r)},[e,t,r])}var Y0=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Y0||{}),J0=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(J0||{});let X0={[0]:e=>({...e,popoverState:Ft(e.popoverState,{[0]:1,[1]:0})}),[1](e){return e.popoverState===1?e:{...e,popoverState:1}},[2](e,t){return e.button===t.button?e:{...e,button:t.button}},[3](e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},[4](e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},[5](e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},Nu=_.exports.createContext(null);Nu.displayName="PopoverContext";function hs(e){let t=_.exports.useContext(Nu);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,hs),n}return t}let Iu=_.exports.createContext(null);Iu.displayName="PopoverAPIContext";function bu(e){let t=_.exports.useContext(Iu);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,bu),n}return t}let Lu=_.exports.createContext(null);Lu.displayName="PopoverGroupContext";function Zh(){return _.exports.useContext(Lu)}let Tu=_.exports.createContext(null);Tu.displayName="PopoverPanelContext";function Z0(){return _.exports.useContext(Tu)}function e1(e,t){return Ft(t.type,X0,e,t)}let t1="div",n1=xr(function(e,t){var n;let r=`headlessui-popover-button-${hr()}`,i=`headlessui-popover-panel-${hr()}`,o=_.exports.useRef(null),s=gr(t,B0(w=>{o.current=w})),a=_.exports.useReducer(e1,{popoverState:1,button:null,buttonId:r,panel:null,panelId:i,beforePanelSentinel:_.exports.createRef(),afterPanelSentinel:_.exports.createRef()}),[{popoverState:l,button:u,panel:c,beforePanelSentinel:f,afterPanelSentinel:d},m]=a,h=Ru((n=o.current)!=null?n:u);_.exports.useEffect(()=>m({type:3,buttonId:r}),[r,m]),_.exports.useEffect(()=>m({type:5,panelId:i}),[i,m]);let y=_.exports.useMemo(()=>{if(!u||!c)return!1;for(let w of document.querySelectorAll("body > *"))if(Number(w==null?void 0:w.contains(u))^Number(w==null?void 0:w.contains(c)))return!0;return!1},[u,c]),k=_.exports.useMemo(()=>({buttonId:r,panelId:i,close:()=>m({type:1})}),[r,i,m]),v=Zh(),p=v==null?void 0:v.registerPopover,g=ye(()=>{var w;return(w=v==null?void 0:v.isFocusWithinPopoverGroup())!=null?w:(h==null?void 0:h.activeElement)&&((u==null?void 0:u.contains(h.activeElement))||(c==null?void 0:c.contains(h.activeElement)))});_.exports.useEffect(()=>p==null?void 0:p(k),[p,k]),G0(h==null?void 0:h.defaultView,"focus",w=>{var R,L,j,U;l===0&&(g()||!u||!c||(L=(R=f.current)==null?void 0:R.contains)!=null&&L.call(R,w.target)||(U=(j=d.current)==null?void 0:j.contains)!=null&&U.call(j,w.target)||m({type:1}))},!0),U0([u,c],(w,R)=>{m({type:1}),qh(R,Cu.Loose)||(w.preventDefault(),u==null||u.focus())},l===0);let S=ye(w=>{m({type:1});let R=(()=>w?w instanceof HTMLElement?w:"current"in w&&w.current instanceof HTMLElement?w.current:u:u)();R==null||R.focus()}),O=_.exports.useMemo(()=>({close:S,isPortalled:y}),[S,y]),E=_.exports.useMemo(()=>({open:l===0,close:S}),[l,S]),P=e,C={ref:s};return rt.createElement(Nu.Provider,{value:a},rt.createElement(Iu.Provider,{value:O},rt.createElement(q0,{value:Ft(l,{[0]:hi.Open,[1]:hi.Closed})},wr({ourProps:C,theirProps:P,slot:E,defaultTag:t1,name:"Popover"}))))}),r1="button",i1=xr(function(e,t){let[n,r]=hs("Popover.Button"),{isPortalled:i}=bu("Popover.Button"),o=_.exports.useRef(null),s=`headlessui-focus-sentinel-${hr()}`,a=Zh(),l=a==null?void 0:a.closeOthers,u=Z0(),c=u===null?!1:u===n.panelId,f=gr(o,t,c?null:w=>r({type:2,button:w})),d=gr(o,t),m=Ru(o),h=ye(w=>{var R,L,j;if(c){if(n.popoverState===1)return;switch(w.key){case Vt.Space:case Vt.Enter:w.preventDefault(),(L=(R=w.target).click)==null||L.call(R),r({type:1}),(j=n.button)==null||j.focus();break}}else switch(w.key){case Vt.Space:case Vt.Enter:w.preventDefault(),w.stopPropagation(),n.popoverState===1&&(l==null||l(n.buttonId)),r({type:0});break;case Vt.Escape:if(n.popoverState!==0)return l==null?void 0:l(n.buttonId);if(!o.current||(m==null?void 0:m.activeElement)&&!o.current.contains(m.activeElement))return;w.preventDefault(),w.stopPropagation(),r({type:1});break}}),y=ye(w=>{c||w.key===Vt.Space&&w.preventDefault()}),k=ye(w=>{var R,L;Yh(w.currentTarget)||e.disabled||(c?(r({type:1}),(R=n.button)==null||R.focus()):(w.preventDefault(),w.stopPropagation(),n.popoverState===1&&(l==null||l(n.buttonId)),r({type:0}),(L=n.button)==null||L.focus()))}),v=ye(w=>{w.preventDefault(),w.stopPropagation()}),p=n.popoverState===0,g=_.exports.useMemo(()=>({open:p}),[p]),S=z0(e,o),O=e,E=c?{ref:d,type:S,onKeyDown:h,onClick:k}:{ref:f,id:n.buttonId,type:S,"aria-expanded":e.disabled?void 0:n.popoverState===0,"aria-controls":n.panel?n.panelId:void 0,onKeyDown:h,onKeyUp:y,onClick:k,onMouseDown:v},P=Xh(),C=ye(()=>{let w=n.panel;if(!w)return;function R(){Ft(P.current,{[wn.Forwards]:()=>qn(w,Sn.First),[wn.Backwards]:()=>qn(w,Sn.Last)})}R()});return I(jt,{children:[wr({ourProps:E,theirProps:O,slot:g,defaultTag:r1,name:"Popover.Button"}),p&&!c&&i&&x(pl,{id:s,features:Ho.Focusable,as:"button",type:"button",onFocus:C})]})}),o1="div",s1=pi.RenderStrategy|pi.Static,a1=xr(function(e,t){let[{popoverState:n},r]=hs("Popover.Overlay"),i=gr(t),o=`headlessui-popover-overlay-${hr()}`,s=Jh(),a=(()=>s!==null?s===hi.Open:n===0)(),l=ye(c=>{if(Yh(c.currentTarget))return c.preventDefault();r({type:1})}),u=_.exports.useMemo(()=>({open:n===0}),[n]);return wr({ourProps:{ref:i,id:o,"aria-hidden":!0,onClick:l},theirProps:e,slot:u,defaultTag:o1,features:s1,visible:a,name:"Popover.Overlay"})}),l1="div",u1=pi.RenderStrategy|pi.Static,c1=xr(function(e,t){let{focus:n=!1,...r}=e,[i,o]=hs("Popover.Panel"),{close:s,isPortalled:a}=bu("Popover.Panel"),l=`headlessui-focus-sentinel-before-${hr()}`,u=`headlessui-focus-sentinel-after-${hr()}`,c=_.exports.useRef(null),f=gr(c,t,O=>{o({type:4,panel:O})}),d=Ru(c),m=Jh(),h=(()=>m!==null?m===hi.Open:i.popoverState===0)(),y=ye(O=>{var E;switch(O.key){case Vt.Escape:if(i.popoverState!==0||!c.current||(d==null?void 0:d.activeElement)&&!c.current.contains(d.activeElement))return;O.preventDefault(),O.stopPropagation(),o({type:1}),(E=i.button)==null||E.focus();break}});_.exports.useEffect(()=>{var O;e.static||i.popoverState===1&&((O=e.unmount)!=null?O:!0)&&o({type:4,panel:null})},[i.popoverState,e.unmount,e.static,o]),_.exports.useEffect(()=>{if(!n||i.popoverState!==0||!c.current)return;let O=d==null?void 0:d.activeElement;c.current.contains(O)||qn(c.current,Sn.First)},[n,c,i.popoverState]);let k=_.exports.useMemo(()=>({open:i.popoverState===0,close:s}),[i,s]),v={ref:f,id:i.panelId,onKeyDown:y,onBlur:n&&i.popoverState===0?O=>{var E,P,C,w,R;let L=O.relatedTarget;!L||!c.current||(E=c.current)!=null&&E.contains(L)||(o({type:1}),(((C=(P=i.beforePanelSentinel.current)==null?void 0:P.contains)==null?void 0:C.call(P,L))||((R=(w=i.afterPanelSentinel.current)==null?void 0:w.contains)==null?void 0:R.call(w,L)))&&L.focus({preventScroll:!0}))}:void 0,tabIndex:-1},p=Xh(),g=ye(()=>{let O=c.current;if(!O)return;function E(){Ft(p.current,{[wn.Forwards]:()=>{qn(O,Sn.First)},[wn.Backwards]:()=>{var P;(P=i.button)==null||P.focus({preventScroll:!0})}})}E()}),S=ye(()=>{let O=c.current;if(!O)return;function E(){Ft(p.current,{[wn.Forwards]:()=>{var P,C,w;if(!i.button)return;let R=Kh(),L=R.indexOf(i.button),j=R.slice(0,L+1),U=[...R.slice(L+1),...j];for(let V of U.slice())if(((C=(P=V==null?void 0:V.id)==null?void 0:P.startsWith)==null?void 0:C.call(P,"headlessui-focus-sentinel-"))||((w=i.panel)==null?void 0:w.contains(V))){let Be=U.indexOf(V);Be!==-1&&U.splice(Be,1)}qn(U,Sn.First,!1)},[wn.Backwards]:()=>qn(O,Sn.Last)})}E()});return rt.createElement(Tu.Provider,{value:i.panelId},h&&a&&x(pl,{id:l,ref:i.beforePanelSentinel,features:Ho.Focusable,as:"button",type:"button",onFocus:g}),wr({ourProps:v,theirProps:r,slot:k,defaultTag:l1,features:u1,visible:h,name:"Popover.Panel"}),h&&a&&x(pl,{id:u,ref:i.afterPanelSentinel,features:Ho.Focusable,as:"button",type:"button",onFocus:S}))}),f1="div",d1=xr(function(e,t){let n=_.exports.useRef(null),r=gr(n,t),[i,o]=_.exports.useState([]),s=ye(h=>{o(y=>{let k=y.indexOf(h);if(k!==-1){let v=y.slice();return v.splice(k,1),v}return y})}),a=ye(h=>(o(y=>[...y,h]),()=>s(h))),l=ye(()=>{var h;let y=Eu(n);if(!y)return!1;let k=y.activeElement;return(h=n.current)!=null&&h.contains(k)?!0:i.some(v=>{var p,g;return((p=y.getElementById(v.buttonId))==null?void 0:p.contains(k))||((g=y.getElementById(v.panelId))==null?void 0:g.contains(k))})}),u=ye(h=>{for(let y of i)y.buttonId!==h&&y.close()}),c=_.exports.useMemo(()=>({registerPopover:a,unregisterPopover:s,isFocusWithinPopoverGroup:l,closeOthers:u}),[a,s,l,u]),f=_.exports.useMemo(()=>({}),[]),d=e,m={ref:r};return rt.createElement(Lu.Provider,{value:c},wr({ourProps:m,theirProps:d,slot:f,defaultTag:f1,name:"Popover.Group"}))}),er=Object.assign(n1,{Button:i1,Overlay:a1,Panel:c1,Group:d1});var eg="_17189jg1",tg="_17189jg0",ng="_17189jg2";var If="_1961rof4",Dn="_1961rof2",gs="_1961rof3",rg="_1961rof0",te="_1961rof1";var p1="_1d4r83s0";function h1(){return I(er,{className:tg,children:[I(er.Button,{className:eg,children:[x("i",{className:[Dn,"fa-solid","fa-comments"].join(" ")}),"Help & Community"]}),x(er.Panel,{className:ng,children:x("div",{className:p1,children:I("ul",{children:[x("li",{className:te,children:I("a",{href:"https://github.com/cmdr2/stable-diffusion-ui/blob/main/Troubleshooting.md",target:"_blank",rel:"noreferrer",children:[x("i",{className:[Dn,"fa-solid","fa-circle-question"].join(" ")})," Usual Problems and Solutions"]})}),x("li",{className:te,children:I("a",{href:"https://discord.com/invite/u9yhsFmEkB",target:"_blank",rel:"noreferrer",children:[x("i",{className:[Dn,"fa-brands","fa-discord"].join(" ")})," Discord user Community"]})}),x("li",{className:te,children:I("a",{href:"https://old.reddit.com/r/StableDiffusionUI/",target:"_blank",rel:"noreferrer",children:[x("i",{className:[Dn,"fa-brands","fa-reddit"].join(" ")})," Reddit Community"]})}),x("li",{className:te,children:I("a",{href:"https://github.com/cmdr2/stable-diffusion-ui ",target:"_blank",rel:"noreferrer",children:[x("i",{className:[Dn,"fa-brands","fa-github"].join(" ")})," Source Code on Github"]})})]})})})]})}function on(e){return on=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},on(e)}function kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bf(e,t){for(var n=0;n",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},v1=function(t){return m1[t]},y1=function(t){return t.replace(g1,v1)};function Lf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Tf(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};hl=Tf(Tf({},hl),e)}function x1(){return hl}var k1=function(){function e(){lt(this,e),this.usedNamespaces={}}return ut(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function O1(e){ig=e}function P1(){return ig}var E1={type:"3rdParty",init:function(t){w1(t.options.react),O1(t)}};function C1(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var s=function(l,u){var c=t.services.backendConnector.state["".concat(l,"|").concat(u)];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!i||s(o,e)))}function R1(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return gl("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(o,s){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!s(o.isLanguageChangingTo,e))return!1}}):_1(e,t,n)}function og(e){if(Array.isArray(e))return e}function N1(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,s,a;try{for(n=n.call(e);!(i=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,a=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw a}}return r}}function Mf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=_.exports.useContext(S1)||{},i=r.i18n,o=r.defaultNS,s=n||i||P1();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new k1),!s){gl("You will need to pass in an i18next instance by using initReactI18next");var a=function(w){return Array.isArray(w)?w[w.length-1]:w},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}s.options.react&&s.options.react.wait!==void 0&&gl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=na(na(na({},x1()),s.options.react),t),c=u.useSuspense,f=u.keyPrefix,d=e||o||s.options&&s.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(d);var m=(s.isInitialized||s.initializedStoreOnce)&&d.every(function(C){return R1(C,s,u)});function h(){return s.getFixedT(null,u.nsMode==="fallback"?d:d[0],f)}var y=_.exports.useState(h),k=I1(y,2),v=k[0],p=k[1],g=d.join(),S=b1(g),O=_.exports.useRef(!0);_.exports.useEffect(function(){var C=u.bindI18n,w=u.bindI18nStore;O.current=!0,!m&&!c&&Ff(s,d,function(){O.current&&p(h)}),m&&S&&S!==g&&O.current&&p(h);function R(){O.current&&p(h)}return C&&s&&s.on(C,R),w&&s&&s.store.on(w,R),function(){O.current=!1,C&&s&&C.split(" ").forEach(function(L){return s.off(L,R)}),w&&s&&w.split(" ").forEach(function(L){return s.store.off(L,R)})}},[s,g]);var E=_.exports.useRef(!0);_.exports.useEffect(function(){O.current&&!E.current&&p(h),E.current=!1},[s,f]);var P=[v,s,m];if(P.t=v,P.i18n=s,P.ready=m,m||!m&&!c)return P;throw new Promise(function(C){Ff(s,d,function(){C()})})}function L1(){const{t:e}=At(),[t,n]=_.exports.useState(!1),[r,i]=_.exports.useState("beta"),{status:o,data:s}=ur([fl],Bh),a=Ph(),{status:l,data:u}=ur([a0],async()=>await l0(r),{enabled:t});return _.exports.useEffect(()=>{if(o==="success"){const{update_branch:c}=s;i(c==="main"?"beta":"main")}},[o,s]),_.exports.useEffect(()=>{l==="success"&&(u[0]==="OK"&&a.invalidateQueries([fl]),n(!1))},[l,u,n]),I("label",{children:[x("input",{type:"checkbox",checked:r==="main",onChange:c=>{n(!0)}}),"\u{1F525}",e("advanced-settings.beta")," ",e("advanced-settings.beta-disc")]})}var T1="cg4q680";function D1(){const{t:e}=At(),t=F(c=>c.isUseAutoSave()),n=F(c=>c.getValueForRequestKey("save_to_disk_path")),r=F(c=>c.getValueForRequestKey("turbo")),i=F(c=>c.getValueForRequestKey("use_cpu")),o=F(c=>c.getValueForRequestKey("use_full_precision")),s=!0,a=F(c=>c.setRequestOptions),l=F(c=>c.toggleUseAutoSave),u=F(c=>c.toggleSoundEnabled);return I(er,{className:tg,children:[I(er.Button,{className:eg,children:[x("i",{className:[Dn,"fa-solid","fa-gear"].join(" ")}),"Settings"]}),x(er.Panel,{className:ng,children:I("div",{className:T1,children:[x("h4",{children:"System Settings"}),I("ul",{children:[I("li",{className:te,children:[I("label",{children:[x("input",{checked:t,onChange:c=>l(),type:"checkbox"}),e("storage.ast")," "]}),I("label",{children:[x("input",{value:n,onChange:c=>a("save_to_disk_path",c.target.value),size:40,disabled:!t}),x("span",{className:"visually-hidden",children:"Path on disk where images will be saved"})]})]}),x("li",{className:te,children:I("label",{children:[x("input",{checked:s,onChange:c=>u(),type:"checkbox"}),e("advanced-settings.sound")]})}),x("li",{className:te,children:I("label",{children:[x("input",{checked:r,onChange:c=>a("turbo",c.target.checked),type:"checkbox"}),e("advanced-settings.turbo")," ",e("advanced-settings.turbo-disc")]})}),x("li",{className:te,children:I("label",{children:[x("input",{type:"checkbox",checked:i,onChange:c=>a("use_cpu",c.target.checked)}),e("advanced-settings.cpu")," ",e("advanced-settings.cpu-disc")]})}),x("li",{className:te,children:I("label",{children:[x("input",{checked:o,onChange:c=>a("use_full_precision",c.target.checked),type:"checkbox"}),e("advanced-settings.gpu")," ",e("advanced-settings.gpu-disc")]})}),x("li",{className:te,children:x(L1,{})})]})]})})]})}var F1="_1v2cc580",M1="_1v2cc582",j1="_1v2cc581";function A1(){const{t:e}=At(),{status:t,data:n}=ur([fl],Bh),[r,i]=_.exports.useState("2.1.0"),[o,s]=_.exports.useState("");return _.exports.useEffect(()=>{if(t==="success"){const{update_branch:a}=n;i("v2.1"),s(a==="main"?"(stable)":"(beta)")}},[t,n,i,i]),I("div",{className:F1,children:[I("div",{className:j1,children:[I("h1",{children:[e("title")," ",r," ",o," "]}),x(L0,{className:"status-display"})]}),I("div",{className:M1,children:[x(h1,{}),x(D1,{})]})]})}const St=xi(_0((e,t)=>({isOpenAdvancedSettings:!1,isOpenAdvImprovementSettings:!1,isOpenAdvPropertySettings:!1,isOpenAdvWorkflowSettings:!1,isOpenImageModifier:!1,toggleAdvancedSettings:()=>{e(H(n=>{n.isOpenAdvancedSettings=!n.isOpenAdvancedSettings}))},toggleAdvImprovementSettings:()=>{e(H(n=>{n.isOpenAdvImprovementSettings=!n.isOpenAdvImprovementSettings}))},toggleAdvPropertySettings:()=>{e(H(n=>{n.isOpenAdvPropertySettings=!n.isOpenAdvPropertySettings}))},toggleAdvWorkflowSettings:()=>{e(H(n=>{n.isOpenAdvWorkflowSettings=!n.isOpenAdvWorkflowSettings}))},toggleImageModifier:()=>{e(H(n=>{n.isOpenImageModifier=!n.isOpenImageModifier}))}}),{name:"createUI"}));var ra="_11d5x3d1",$1="_11d5x3d0";function U1(){const{t:e}=At(),t=F(f=>f.isUsingFaceCorrection()),n=F(f=>f.isUsingUpscaling()),r=F(f=>f.getValueForRequestKey("use_upscale")),i=F(f=>f.getValueForRequestKey("show_only_filtered_image")),o=F(f=>f.toggleUseFaceCorrection),s=F(f=>f.setRequestOptions),a=St(f=>f.isOpenAdvImprovementSettings),l=St(f=>f.toggleAdvImprovementSettings),[u,c]=_.exports.useState(!1);return _.exports.useEffect(()=>{t||r!=""?c(!1):c(!0)},[t,n,c]),I("div",{children:[x("button",{type:"button",className:gs,onClick:l,children:x("h4",{children:"Improvement Settings"})}),a&&I(jt,{children:[x("div",{className:te,children:I("label",{children:[x("input",{type:"checkbox",checked:t,onChange:f=>o()}),"Fix incorrect faces and eyes (uses GFPGAN)"]})}),x("div",{className:te,children:I("label",{children:[e("settings.ups"),I("select",{id:"upscale_model",name:"upscale_model",value:r,onChange:f=>{s("use_upscale",f.target.value)},children:[x("option",{value:"",children:e("settings.no-ups")}),x("option",{value:"RealESRGAN_x4plus",children:"RealESRGAN_x4plus"}),x("option",{value:"RealESRGAN_x4plus_anime_6B",children:"RealESRGAN_x4plus_anime_6B"})]})]})}),x("div",{className:te,children:I("label",{children:[x("input",{disabled:u,type:"checkbox",checked:i,onChange:f=>s("show_only_filtered_image",f.target.checked)}),e("settings.corrected")]})})]})]})}const Af=[{value:128,label:"128 (*)"},{value:192,label:"192"},{value:256,label:"256 (*)"},{value:320,label:"320"},{value:384,label:"384"},{value:448,label:"448"},{value:512,label:"512 (*)"},{value:576,label:"576"},{value:640,label:"640"},{value:704,label:"704"},{value:768,label:"768 (*)"},{value:832,label:"832"},{value:896,label:"896"},{value:960,label:"960"},{value:1024,label:"1024 (*)"}];function z1(){const{t:e}=At(),t=F(h=>h.setRequestOptions),n=F(h=>h.toggleUseRandomSeed),r=F(h=>h.isRandomSeed()),i=F(h=>h.getValueForRequestKey("seed")),o=F(h=>h.getValueForRequestKey("num_inference_steps")),s=F(h=>h.getValueForRequestKey("guidance_scale")),a=F(h=>h.getValueForRequestKey("init_image")),l=F(h=>h.getValueForRequestKey("prompt_strength")),u=F(h=>h.getValueForRequestKey("width")),c=F(h=>h.getValueForRequestKey("height")),f=F(h=>h.getValueForRequestKey("sampler")),d=St(h=>h.isOpenAdvPropertySettings),m=St(h=>h.toggleAdvPropertySettings);return I("div",{children:[x("button",{type:"button",className:gs,onClick:m,children:x("h4",{children:"Property Settings"})}),d&&I(jt,{children:[I("div",{className:te,children:[I("label",{children:["Seed:",x("input",{size:10,value:i,onChange:h=>t("seed",h.target.value),disabled:r,placeholder:"random"})]}),I("label",{children:[x("input",{type:"checkbox",checked:r,onChange:h=>n()})," ","Random Image"]})]}),x("div",{className:te,children:I("label",{children:[e("settings.steps")," ",x("input",{value:o,onChange:h=>{t("num_inference_steps",h.target.value)},size:4})]})}),I("div",{className:te,children:[I("label",{children:[e("settings.guide-scale"),x("input",{value:s,onChange:h=>t("guidance_scale",h.target.value),type:"range",min:"0",max:"20",step:".1"})]}),x("span",{children:s})]}),a!==void 0&&I("div",{className:te,children:[I("label",{children:[e("settings.prompt-str")," ",x("input",{value:l,onChange:h=>t("prompt_strength",h.target.value),type:"range",min:"0",max:"1",step:".05"})]}),x("span",{children:l})]}),I("div",{className:te,children:[I("label",{children:[e("settings.width"),x("select",{value:u,onChange:h=>t("width",h.target.value),children:Af.map(h=>x("option",{value:h.value,children:h.label},`width-option_${h.value}`))})]}),I("label",{children:[e("settings.height"),x("select",{value:c,onChange:h=>t("height",h.target.value),children:Af.map(h=>x("option",{value:h.value,children:h.label},`height-option_${h.value}`))})]})]}),x("div",{className:te,children:I("label",{children:[e("settings.sampler"),x("select",{value:f,onChange:h=>t("sampler",h.target.value),children:R0.map(h=>x("option",{value:h,children:h},`sampler-option_${h}`))})]})})]})]})}function B1(){const{t:e}=At(),t=F(l=>l.getValueForRequestKey("num_outputs")),n=F(l=>l.parallelCount),r=F(l=>l.setRequestOptions),i=F(l=>l.setParallelCount),o=F(l=>l.getValueForRequestKey("stream_image_progress")),s=St(l=>l.isOpenAdvWorkflowSettings),a=St(l=>l.toggleAdvWorkflowSettings);return I("div",{children:[x("button",{type:"button",className:gs,onClick:a,children:x("h4",{children:"Workflow Settings"})}),s&&I(jt,{children:[x("div",{className:te,children:I("label",{children:[e("settings.amount-of-img")," ",x("input",{type:"number",value:t,onChange:l=>r("num_outputs",parseInt(l.target.value,10)),size:4})]})}),x("div",{className:te,children:I("label",{children:[e("settings.how-many"),x("input",{type:"number",value:n,onChange:l=>i(parseInt(l.target.value,10)),size:4})]})}),x("div",{className:te,children:I("label",{children:[e("settings.stream-img"),x("input",{type:"checkbox",checked:o,onChange:l=>r("stream_image_progress",l.target.checked)})]})})]})]})}function H1(){return I("ul",{className:$1,children:[x("li",{className:ra,children:x(U1,{})}),x("li",{className:ra,children:x(z1,{})}),x("li",{className:ra,children:x(B1,{})})]})}function Q1(){const e=St(n=>n.isOpenAdvancedSettings),t=St(n=>n.toggleAdvancedSettings);return I("div",{className:rg,children:[x("button",{type:"button",onClick:t,className:"panel-box-toggle-btn",children:x("h3",{children:"Advanced Settings"})}),e&&x(H1,{})]})}var V1="g3uahc1",K1="g3uahc0",q1="g3uahc2";var W1="f149m50",G1="f149m51";function lg({name:e,category:t,previews:n}){const r="portrait",i=F(a=>a.hasTag(t,e))?"selected":"",o=F(a=>a.toggleTag),s=()=>{o(t,e)};return I("div",{className:[W1,i].join(" "),onClick:s,children:[x("p",{children:e}),x("div",{className:G1,children:n.map(a=>a.name!==r?null:x("img",{src:`${xt}/media/modifier-thumbnails/${a.path}`,alt:a.name,title:a.name},a.name))})]})}function Y1({tags:e,category:t}){return x("ul",{className:q1,children:e.map(n=>x("li",{children:x(lg,{category:t,name:n.modifier,previews:n.previews})},n.modifier))})}function J1({title:e,category:t,tags:n}){const[r,i]=_.exports.useState(!1);return I("div",{className:V1,children:[x("button",{type:"button",className:gs,onClick:()=>{i(!r)},children:x("h4",{children:e})}),r&&x(Y1,{category:t,tags:n})]})}function X1(){const e=F(i=>i.allModifiers),t=St(i=>i.isOpenImageModifier),n=St(i=>i.toggleImageModifier);return I("div",{className:rg,children:[x("button",{type:"button",onClick:()=>{n()},className:"panel-box-toggle-btn",children:x("h3",{children:"Image Modifiers (art styles, tags, ect)"})}),t&&x("ul",{className:K1,children:e.map((i,o)=>x("li",{children:x(J1,{title:i.category,category:i.category,tags:i.modifiers})},i.category))})]})}var Z1="fma0ug0";function eS({imageData:e,brushSize:t,brushShape:n,brushColor:r,isErasing:i,setData:o}){const s=_.exports.useRef(null),a=_.exports.useRef(null),[l,u]=_.exports.useState(!1),[c,f]=_.exports.useState(512),[d,m]=_.exports.useState(512);_.exports.useEffect(()=>{const g=new Image;g.onload=()=>{f(g.width),m(g.height)},g.src=e},[e]),_.exports.useEffect(()=>{if(s.current!=null){const g=s.current.getContext("2d");if(g!=null){const S=g.getImageData(0,0,c,d),O=S.data;for(let E=0;E0&&(O[E]=parseInt(r,16),O[E+1]=parseInt(r,16),O[E+2]=parseInt(r,16));g.putImageData(S,0,0)}}},[r]);const h=g=>{u(!0)},y=g=>{u(!1);const S=s.current;if(S!=null){const O=S.toDataURL();o(O)}},k=(g,S,O,E,P)=>{const C=s.current;if(C!=null){const w=C.getContext("2d");if(w!=null)if(i){const R=O/2;w.clearRect(g-R,S-R,O,O)}else w.beginPath(),w.lineWidth=O,w.lineCap=E,w.strokeStyle=P,w.moveTo(g,S),w.lineTo(g,S),w.stroke()}},v=(g,S,O,E,P)=>{const C=a.current;if(C!=null){const w=C.getContext("2d");if(w!=null)if(w.beginPath(),w.clearRect(0,0,C.width,C.height),i){const R=O/2;w.lineWidth=2,w.lineCap="butt",w.strokeStyle=P,w.moveTo(g-R,S-R),w.lineTo(g+R,S-R),w.lineTo(g+R,S+R),w.lineTo(g-R,S+R),w.lineTo(g-R,S-R),w.stroke()}else w.lineWidth=O,w.lineCap=E,w.strokeStyle=P,w.moveTo(g,S),w.lineTo(g,S),w.stroke()}};return I("div",{className:Z1,children:[x("img",{src:e}),x("canvas",{ref:s,width:c,height:d}),x("canvas",{ref:a,width:c,height:d,onMouseDown:h,onMouseUp:y,onMouseMove:g=>{const{nativeEvent:{offsetX:S,offsetY:O}}=g;v(S,O,t,n,r),l&&k(S,O,t,n,r)}})]})}var $f="_2yyo4x2",tS="_2yyo4x1",nS="_2yyo4x0";function rS(){const[e,t]=_.exports.useState("20"),[n,r]=_.exports.useState("round"),[i,o]=_.exports.useState("#fff"),[s,a]=_.exports.useState(!1),l=F(h=>h.getValueForRequestKey("init_image")),u=F(h=>h.setRequestOptions);return I("div",{className:nS,children:[x(eS,{imageData:l,brushSize:e,brushShape:n,brushColor:i,isErasing:s,setData:h=>{u("mask",h)}}),I("div",{className:tS,children:[I("div",{className:$f,children:[x("button",{onClick:()=>{a(!1)},children:"Mask"}),x("button",{onClick:()=>{a(!0)},children:"Erase"}),I("label",{children:["Brush Size",x("input",{type:"range",min:"1",max:"100",value:e,onChange:h=>{t(h.target.value)}})]})]}),I("div",{className:$f,children:[x("button",{onClick:()=>{r("round")},children:"Cirle Brush"}),x("button",{onClick:()=>{r("square")},children:"Square Brush"})]})]})]})}var iS="cjcdm20",oS="cjcdm21";var sS="_1how28i0",aS="_1how28i1";var lS="_1rn4m8a4",uS="_1rn4m8a2",cS="_1961rof4",fS="_1rn4m8a0",dS="_1rn4m8a1",pS="_1rn4m8a5";function hS(e){const{t}=At(),n=_.exports.useRef(null),r=F(c=>c.getValueForRequestKey("init_image")),i=F(c=>c.isInpainting),o=F(c=>c.setRequestOptions),s=()=>{var c;(c=n.current)==null||c.click()},a=c=>{const f=c.target.files[0];if(f!==void 0){const d=new FileReader;d.onload=m=>{m.target!=null&&o("init_image",m.target.result)},d.readAsDataURL(f)}},l=F(c=>c.toggleInpainting),u=()=>{o("init_image",void 0),o("mask",void 0),i&&l()};return I("div",{className:fS,children:[I("div",{children:[x("label",{className:dS,children:x("b",{children:t("home.initial-img-txt")})}),x("input",{ref:n,className:uS,name:"init_image",type:"file",onChange:a}),x("button",{className:cS,onClick:s,children:t("home.initial-img-btn")})]}),x("div",{className:lS,children:r!==void 0&&I(jt,{children:[I("div",{children:[x("img",{src:r,width:"100",height:"100"}),x("button",{className:pS,onClick:u,children:"X"})]}),I("label",{children:[x("input",{type:"checkbox",onChange:c=>{l()},checked:i}),t("in-paint.txt")]})]})})]})}function gS(){const e=F(t=>t.selectedTags());return I("div",{className:"selected-tags",children:[x("p",{children:"Active Tags"}),x("ul",{children:e.map(t=>x("li",{children:x(lg,{category:t.category,name:t.modifier,previews:t.previews})},t.modifier))})]})}const Bi=xi((e,t)=>({images:[],completedImageIds:[],addNewImage:(n,r)=>{e(H(i=>{const o={id:n,options:r,status:"pending"};i.images.push(o)}))},hasQueuedImages:()=>t().images.length>0,firstInQueue:()=>{const{images:n}=t();return n.length>0?n[0]:{}},removeFirstInQueue:()=>{e(H(n=>{const r=n.images.shift();r!==void 0&&n.completedImageIds.push(r.id)}))},clearCachedIds:()=>{e(H(n=>{n.completedImageIds=[]}))}})),qe={IDLE:"IDLE",FETCHING:"FETCHING",PROGRESSING:"PROGRESSING",SUCCEEDED:"SUCCEEDED",COMPLETE:"COMPLETE",ERROR:"ERROR"},ke=xi(e=>({status:qe.IDLE,step:0,totalSteps:0,data:"",progressImages:[],timeStarted:new Date,timeNow:new Date,appendData:t=>{e(H(n=>{n.data+=t}))},reset:()=>{e(H(t=>{t.status=qe.IDLE,t.step=0,t.totalSteps=0,t.data=""}))},setStatus:t=>{e(H(n=>{n.status=t}))},setStep:t=>{e(H(n=>{n.step=t}))},setTotalSteps:t=>{e(H(n=>{n.totalSteps=t}))},addProgressImage:t=>{e(H(n=>{n.progressImages.push(t)}))},setStartTime:()=>{e(H(t=>{t.timeStarted=new Date}))},setNowTime:()=>{e(H(t=>{t.timeNow=new Date}))},resetForFetching:()=>{e(H(t=>{t.status=qe.FETCHING,t.progressImages=[],t.step=0,t.totalSteps=0,t.timeNow=new Date,t.timeStarted=new Date}))}})),Vr=xi((e,t)=>({imageMap:new Map,images:[],currentImage:null,updateDisplay:(n,r,i)=>{e(H(o=>{o.currentImage={id:n,display:r,info:i},o.images.unshift({id:n,data:r,info:i}),o.currentImage=o.images[0]}))},setCurrentImage:n=>{e(H(r=>{r.currentImage=n}))},clearDisplay:()=>{e(H(n=>{n.images=[],n.currentImage=null}))}}));let Hi;const mS=new Uint8Array(16);function vS(){if(!Hi&&(Hi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Hi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Hi(mS)}const fe=[];for(let e=0;e<256;++e)fe.push((e+256).toString(16).slice(1));function yS(e,t=0){return(fe[e[t+0]]+fe[e[t+1]]+fe[e[t+2]]+fe[e[t+3]]+"-"+fe[e[t+4]]+fe[e[t+5]]+"-"+fe[e[t+6]]+fe[e[t+7]]+"-"+fe[e[t+8]]+fe[e[t+9]]+"-"+fe[e[t+10]]+fe[e[t+11]]+fe[e[t+12]]+fe[e[t+13]]+fe[e[t+14]]+fe[e[t+15]]).toLowerCase()}const SS=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Uf={randomUUID:SS};function wS(e,t,n){if(Uf.randomUUID&&!t&&!e)return Uf.randomUUID();e=e||{};const r=e.random||(e.rng||vS)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){n=n||0;for(let i=0;i<16;++i)t[n+i]=r[i];return t}return yS(r)}var xS="_1hnlbmt0 _1961rof4";const kS="_batch";function OS(){const{t:e}=At(),t=_.exports.useRef(),n=F(w=>w.parallelCount),r=F(w=>w.builtRequest),i=F(w=>w.isRandomSeed()),o=F(w=>w.setRequestOptions),s=Bi(w=>w.addNewImage),a=Bi(w=>w.hasQueuedImages()),l=Bi(w=>w.removeFirstInQueue),{id:u,options:c}=Bi(w=>w.firstInQueue()),f=ke(w=>w.status),d=ke(w=>w.setStatus),m=ke(w=>w.setStep),h=ke(w=>w.setTotalSteps),y=ke(w=>w.addProgressImage),k=ke(w=>w.setStartTime),v=ke(w=>w.setNowTime),p=ke(w=>w.resetForFetching);ke(w=>w.appendData);const g=Vr(w=>w.updateDisplay),S=(w,R)=>{try{const L=JSON.parse(w),{status:j,request:U,output:V}=L;j==="succeeded"?V.forEach((Be,Le)=>{const{data:ae,seed:b}=Be,D={...U,seed:b},M=`${R}${kS}-${b}-${Le}`;g(M,ae,D)}):console.warn(`Unexpected status: ${j}`)}catch(L){console.log("Error HACKING JSON: ",L)}},O=async(w,R)=>{var U;const L=new TextDecoder;let j="";for(;;){const{done:V,value:Be}=await R.read(),Le=L.decode(Be);if(V){l(),d(qe.COMPLETE),S(j,w),(U=t.current)==null||U.play();break}try{const ae=JSON.parse(Le),{status:b}=ae;if(b==="progress"){d(qe.PROGRESSING);const{progress:{step:D,total_steps:M},output:z}=ae;m(D),h(M),D===0?k():v(),z!==void 0&&z.forEach(Z=>{const $t=`${Z.path}?t=${new Date().getTime()}`;y($t)})}else b==="succeeded"?(d(qe.SUCCEEDED),console.log(ae)):b==="failed"?(console.warn("failed"),console.log(ae)):console.log("UNKNOWN ?",ae)}catch{console.log("EXPECTED PARSE ERRROR"),j+=Le}}},E=async(w,R)=>{var L;try{p();const U=(L=(await u0(R)).body)==null?void 0:L.getReader();U!==void 0&&O(w,U)}catch(j){console.log("TOP LINE STREAM ERROR"),console.log(j)}},P=async w=>{const R=[];let{num_outputs:L}=w;if(n>L)R.push(L);else for(;L>=1;)L-=n,L<=0?R.push(n):R.push(Math.abs(L));R.forEach((j,U)=>{let V=w.seed;U!==0&&(V=zo()),s(wS(),{...w,num_outputs:j,seed:V})})},C=async()=>{i&&o("seed",zo());const w=r();await P(w)};return _.exports.useEffect(()=>{const w=async R=>{await E(u!=null?u:"",R)};if(!(f===qe.PROGRESSING||f===qe.FETCHING)&&a){if(c===void 0){console.log("req is undefined");return}w(c).catch(R=>{console.log("HAS QUEUE ERROR"),console.log(R)})}},[a,f,u,c,E]),I(jt,{children:[x("button",{className:xS,onClick:()=>{C()},disabled:a,children:e("home.make-img-btn")}),x(Pu,{ref:t})]})}function PS(){const{t:e}=At(),t=F(i=>i.getValueForRequestKey("prompt")),n=F(i=>i.setRequestOptions),r=i=>{n("prompt",i.target.value)};return I("div",{className:sS,children:[I("div",{className:aS,children:[x("p",{children:e("home.editor-title")}),x("textarea",{value:t,onChange:r})]}),x(OS,{}),x(hS,{}),x(gS,{})]})}function ES(){const e=F(t=>t.isInpainting);return I(jt,{children:[I("div",{className:iS,children:[x(PS,{}),x(Q1,{}),x(X1,{})]}),e&&x("div",{className:oS,children:x(rS,{})})]})}var CS="_1iqbo9r0";var _S="_1yvg52n0";function RS({imageData:e,metadata:t,className:n}){return x("div",{className:[_S,n].join(" "),children:x("img",{src:e,alt:t.prompt})})}var NS="kiqcbi2",IS="kiqcbi1",bS="kiqcbi3",LS="kiqcbi0";function TS({info:e,data:t}){const n=()=>{const{prompt:s,seed:a,num_inference_steps:l,guidance_scale:u,use_face_correction:c,use_upscale:f,width:d,height:m}=e;let h=s.replace(/[^a-zA-Z0-9]/g,"_");h=h.substring(0,100);let y=`${h}_Seed-${a}_Steps-${l}_Guidance-${u}`;return typeof c=="string"&&(y+=`_FaceCorrection-${c}`),typeof f=="string"&&(y+=`_Upscale-${f}`),y+=`_${d}x${m}`,y+=".png",y},r=F(s=>s.setRequestOptions),i=()=>{const s=document.createElement("a");s.download=n(),s.href=t!=null?t:"",s.click()},o=()=>{r("init_image",t)};return x("div",{className:LS,children:x("div",{className:IS,children:x("div",{className:NS,children:I("div",{className:bS,children:[I("div",{children:[I("p",{children:[" ",e==null?void 0:e.prompt]}),I("div",{children:[x("button",{className:If,onClick:i,children:"Save"}),x("button",{className:If,onClick:o,children:"Use as Input"})]})]}),x(RS,{imageData:t,metadata:e})]})})})})}const DS=()=>x("h4",{className:"no-image",children:"Try Making a new image!"}),FS=()=>{const e=ke(u=>u.step),t=ke(u=>u.totalSteps),n=ke(u=>u.progressImages),r=ke(u=>u.timeStarted),i=ke(u=>u.timeNow),[o,s]=_.exports.useState(0),[a,l]=_.exports.useState(0);return _.exports.useEffect(()=>{t>0?l(Math.round(e/t*100)):l(0)},[e,t]),_.exports.useEffect(()=>{const u=+i-+r,d=((e==0?0:u/e)*t-u)/1e3;s(d.toPrecision(3))},[e,t,r,i,s]),I(jt,{children:[x("h4",{className:"loading",children:"Loading..."}),I("p",{children:[a," % Complete "]}),o!=0&&I("p",{children:["Time Remaining: ",o," s"]}),n.map((u,c)=>{if(c==n.length-1)return x("img",{src:`${xt}${u}`},c)})]})};function MS(){const e=ke(n=>n.status),t=Vr(n=>n.currentImage);return I("div",{className:CS,children:[e===qe.IDLE&&x(DS,{}),(e===qe.FETCHING||e===qe.PROGRESSING)&&x(FS,{}),e===qe.COMPLETE&&t!=null&&x(TS,{info:t==null?void 0:t.info,data:t==null?void 0:t.data})]})}var jS="fsj92y3",AS="fsj92y1",$S="fsj92y0",US="fsj92y2";function zS(){const e=Vr(i=>i.images),t=Vr(i=>i.setCurrentImage),n=Vr(i=>i.clearDisplay),r=()=>{n()};return I("div",{className:$S,children:[e!=null&&e.length>0&&x("button",{className:jS,onClick:()=>{r()},children:"REMOVE"}),x("ul",{className:AS,children:e==null?void 0:e.map((i,o)=>i===void 0?(console.warn(`image ${o} is undefined`),null):x("li",{children:x("button",{className:US,onClick:()=>{t(i)},children:x("img",{src:i.data,alt:i.info.prompt})})},i.id))})]})}var BS="_688lcr1",HS="_688lcr0",QS="_688lcr2";function VS(){return I("div",{className:HS,children:[x("div",{className:BS,children:x(MS,{})}),x("div",{className:QS,children:x(zS,{})})]})}var KS="_97t2g71",qS="_97t2g70";function WS(){return I("div",{className:qS,children:[I("p",{children:["If you found this project useful and want to help keep it alive, please"," ",x("a",{href:"https://ko-fi.com/cmdr2_stablediffusion_ui",target:"_blank",rel:"noreferrer",children:x("img",{src:`${xt}/kofi.png`,className:KS})})," ","to help cover the cost of development and maintenance! Thank you for your support!"]}),I("p",{children:["Please feel free to join the"," ",x("a",{href:"https://discord.com/invite/u9yhsFmEkB",target:"_blank",rel:"noreferrer",children:"discord community"})," ","or"," ",x("a",{href:"https://github.com/cmdr2/stable-diffusion-ui/issues",target:"_blank",rel:"noreferrer",children:"file an issue"})," ","if you have any problems or suggestions in using this interface."]}),I("div",{id:"footer-legal",children:[I("p",{children:[x("b",{children:"Disclaimer:"})," The authors of this project are not responsible for any content generated using this interface."]}),I("p",{children:["This license of this software forbids you from sharing any content that violates any laws, produce any harm to a person, disseminate any personal information that would be meant for harm, ",x("br",{}),"spread misinformation and target vulnerable groups. For the full list of restrictions please read"," ",x("a",{href:"https://github.com/cmdr2/stable-diffusion-ui/blob/main/LICENSE",target:"_blank",rel:"noreferrer",children:"the license"}),"."]}),x("p",{children:"By using this software, you consent to the terms and conditions of the license."})]})]})}function GS({className:e}){const t=F(a=>a.setRequestOptions),{status:n,data:r}=ur(["SaveDir"],s0),{status:i,data:o}=ur(["modifications"],o0),s=F(a=>a.setAllModifiers);return _.exports.useEffect(()=>{n==="success"&&t("save_to_disk_path",r)},[t,n,r]),_.exports.useEffect(()=>{i==="success"?s(o):i==="error"&&s(c0)},[t,i,o]),I("div",{className:[Xy,e].join(" "),children:[x("header",{className:n0,children:x(A1,{})}),x("nav",{className:Zy,children:x(ES,{})}),x("main",{className:e0,children:x(VS,{})}),x("footer",{className:t0,children:x(WS,{})})]})}function YS({className:e}){return x("div",{children:x("h1",{children:"Settings"})})}var JS="_4vfmtj23";function sn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ml(e,t){return ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ml(e,t)}function ms(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ml(e,t)}function ki(e,t){if(t&&(on(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sn(e)}function wt(e){return wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wt(e)}function XS(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZS(e){return og(e)||XS(e)||sg(e)||ag()}function zf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Bf(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};lt(this,e),this.init(t,n)}return ut(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||ew,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i1?r-1:0),o=1;o-1?a.replace(/###/g,"."):a}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),Object.prototype.hasOwnProperty.call(e,s)?e=e[s]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function Qf(e,t,n){var r=Du(e,t,Object),i=r.obj,o=r.k;i[o]=n}function rw(e,t,n,r){var i=Du(e,t,Object),o=i.obj,s=i.k;o[s]=o[s]||[],r&&(o[s]=o[s].concat(n)),r||o[s].push(n)}function Qo(e,t){var n=Du(e,t),r=n.obj,i=n.k;if(!!r)return r[i]}function Vf(e,t,n){var r=Qo(e,n);return r!==void 0?r:Qo(t,n)}function ug(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):ug(e[r],t[r],n):e[r]=t[r]);return e}function Tn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var iw={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function ow(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return iw[t]}):e}var vs=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,sw=[" ",",","?","!",";"];function aw(e,t,n){t=t||"",n=n||"";var r=sw.filter(function(a){return t.indexOf(a)<0&&n.indexOf(a)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(a){return a==="?"?"\\?":a}).join("|"),")")),o=!i.test(e);if(!o){var s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}function Kf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qi(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cg(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!!e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;oo+s;)s++,a=r.slice(o,o+s).join(n),l=i[a];if(l===void 0)return;if(l===null)return null;if(t.endsWith(a)){if(typeof l=="string")return l;if(a&&typeof l[a]=="string")return l[a]}var u=r.slice(o+s).join(n);return u?cg(l,u,n):void 0}i=i[r[o]]}return i}}var cw=function(e){ms(n,e);var t=lw(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return lt(this,n),i=t.call(this),vs&&un.call(sn(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return ut(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure,c=[i,o];s&&typeof s!="string"&&(c=c.concat(s)),s&&typeof s=="string"&&(c=c.concat(l?s.split(l):s)),i.indexOf(".")>-1&&(c=i.split("."));var f=Qo(this.data,c);return f||!u||typeof s!="string"?f:cg(this.data&&this.data[i]&&this.data[i][o],s,l)}},{key:"addResource",value:function(i,o,s,a){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var c=[i,o];s&&(c=c.concat(u?s.split(u):s)),i.indexOf(".")>-1&&(c=i.split("."),a=o,o=c[1]),this.addNamespaces(o),Qf(this.data,c,a),l.silent||this.emit("added",i,o,s,a)}},{key:"addResources",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in s)(typeof s[l]=="string"||Object.prototype.toString.apply(s[l])==="[object Array]")&&this.addResource(i,o,l,s[l],{silent:!0});a.silent||this.emit("added",i,o,s)}},{key:"addResourceBundle",value:function(i,o,s,a,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},c=[i,o];i.indexOf(".")>-1&&(c=i.split("."),a=s,s=o,o=c[1]),this.addNamespaces(o);var f=Qo(this.data,c)||{};a?ug(f,s,l):f=Qi(Qi({},f),s),Qf(this.data,c,f),u.silent||this.emit("added",i,o,s)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Qi(Qi({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),s=o&&Object.keys(o)||[];return!!s.find(function(a){return o[a]&&Object.keys(o[a]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(un),fg={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,i,o){var s=this;return t.forEach(function(a){s.processors[a]&&(n=s.processors[a].process(n,r,i,o))}),n}};function qf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function we(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Wf={},Gf=function(e){ms(n,e);var t=fw(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return lt(this,n),i=t.call(this),vs&&un.call(sn(i)),nw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,sn(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=gt.create("translator"),i}return ut(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var s=this.resolve(i,o);return s&&s.res!==void 0}},{key:"extractFromKey",value:function(i,o){var s=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");var a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],u=s&&i.indexOf(s)>-1,c=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!aw(i,s,a);if(u&&!c){var f=i.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:i,namespaces:l};var d=i.split(s);(s!==a||s===a&&this.options.ns.indexOf(d[0])>-1)&&(l=d.shift()),i=d.join(a)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,s){var a=this;if(on(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,c=this.extractFromKey(i[i.length-1],o),f=c.key,d=c.namespaces,m=d[d.length-1],h=o.lng||this.language,y=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(y){var k=o.nsSeparator||this.options.nsSeparator;return l?(v.res="".concat(m).concat(k).concat(f),v):"".concat(m).concat(k).concat(f)}return l?(v.res=f,v):f}var v=this.resolve(i,o),p=v&&v.res,g=v&&v.usedKey||f,S=v&&v.exactUsedKey||f,O=Object.prototype.toString.apply(p),E=["[object Number]","[object Function]","[object RegExp]"],P=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,w=typeof p!="string"&&typeof p!="boolean"&&typeof p!="number";if(C&&p&&w&&E.indexOf(O)<0&&!(typeof P=="string"&&O==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var R=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,p,we(we({},o),{},{ns:d})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(v.res=R,v):R}if(u){var L=O==="[object Array]",j=L?[]:{},U=L?S:g;for(var V in p)if(Object.prototype.hasOwnProperty.call(p,V)){var Be="".concat(U).concat(u).concat(V);j[V]=this.translate(Be,we(we({},o),{joinArrays:!1,ns:d})),j[V]===Be&&(j[V]=p[V])}p=j}}else if(C&&typeof P=="string"&&O==="[object Array]")p=p.join(P),p&&(p=this.extendTranslation(p,i,o,s));else{var Le=!1,ae=!1,b=o.count!==void 0&&typeof o.count!="string",D=n.hasDefaultValue(o),M=b?this.pluralResolver.getSuffix(h,o.count,o):"",z=o["defaultValue".concat(M)]||o.defaultValue;!this.isValidLookup(p)&&D&&(Le=!0,p=z),this.isValidLookup(p)||(ae=!0,p=f);var Z=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,$t=Z&&ae?void 0:p,Te=D&&z!==p&&this.options.updateMissing;if(ae||Le||Te){if(this.logger.log(Te?"updateKey":"missingKey",h,m,f,Te?z:p),u){var In=this.resolve(f,we(we({},o),{},{keySeparator:!1}));In&&In.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var De=[],Ot=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Ot&&Ot[0])for(var ys=0;ys1&&arguments[1]!==void 0?arguments[1]:{},a,l,u,c,f;return typeof i=="string"&&(i=[i]),i.forEach(function(d){if(!o.isValidLookup(a)){var m=o.extractFromKey(d,s),h=m.key;l=h;var y=m.namespaces;o.options.fallbackNS&&(y=y.concat(o.options.fallbackNS));var k=s.count!==void 0&&typeof s.count!="string",v=k&&!s.ordinal&&s.count===0&&o.pluralResolver.shouldUseIntlApi(),p=s.context!==void 0&&(typeof s.context=="string"||typeof s.context=="number")&&s.context!=="",g=s.lngs?s.lngs:o.languageUtils.toResolveHierarchy(s.lng||o.language,s.fallbackLng);y.forEach(function(S){o.isValidLookup(a)||(f=S,!Wf["".concat(g[0],"-").concat(S)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(f)&&(Wf["".concat(g[0],"-").concat(S)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(g.join(", "),`" won't get resolved as namespace "`).concat(f,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(function(O){if(!o.isValidLookup(a)){c=O;var E=[h];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(E,h,O,S,s);else{var P;k&&(P=o.pluralResolver.getSuffix(O,s.count,s));var C="".concat(o.options.pluralSeparator,"zero");if(k&&(E.push(h+P),v&&E.push(h+C)),p){var w="".concat(h).concat(o.options.contextSeparator).concat(s.context);E.push(w),k&&(E.push(w+P),v&&E.push(w+C))}}for(var R;R=E.pop();)o.isValidLookup(a)||(u=R,a=o.getResource(O,S,R,s))}}))})}}),{res:a,usedKey:l,exactUsedKey:u,usedLng:c,usedNS:f}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,s){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,s,a):this.resourceStore.getResource(i,o,s,a)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)&&o===s.substring(0,o.length)&&i[s]!==void 0)return!0;return!1}}]),n}(un);function ia(e){return e.charAt(0).toUpperCase()+e.slice(1)}var pw=function(){function e(t){lt(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=gt.create("languageUtils")}return ut(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=ia(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=ia(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=ia(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var s=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(s))&&(i=s)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var s=r.getLanguagePartFromCode(o);if(r.isSupportedCode(s))return i=s;i=r.options.supportedLngs.find(function(a){if(a.indexOf(s)===0)return a})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),s=[],a=function(u){!u||(i.isSupportedCode(u)?s.push(u):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(n))):typeof n=="string"&&a(this.formatLanguageCode(n)),o.forEach(function(l){s.indexOf(l)<0&&a(i.formatLanguageCode(l))}),s}}]),e}(),hw=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],gw={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},mw=["v1","v2","v3"],Yf={zero:0,one:1,two:2,few:3,many:4,other:5};function vw(){var e={};return hw.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:gw[t.fc]}})}),e}var yw=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};lt(this,e),this.languageUtils=t,this.options=n,this.logger=gt.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=vw()}return ut(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(s,a){return Yf[s]-Yf[a]}).map(function(s){return"".concat(r.options.prepend).concat(s)}):o.numbers.map(function(s){return r.getSuffix(n,s,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),s=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));var a=function(){return i.options.prepend&&s.toString()?i.options.prepend+s.toString():s.toString()};return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?"_plural_".concat(s.toString()):a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!mw.includes(this.options.compatibilityJSON)}}]),e}();function Jf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};lt(this,e),this.logger=gt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return ut(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:ow,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Tn(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Tn(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Tn(r.nestingPrefix):r.nestingPrefixEscaped||Tn("$t("),this.nestingSuffix=r.nestingSuffix?Tn(r.nestingSuffix):r.nestingSuffixEscaped||Tn(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var s=this,a,l,u,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(k){return k.replace(/\$/g,"$$$$")}var d=function(v){if(v.indexOf(s.formatSeparator)<0){var p=Vf(r,c,v);return s.alwaysFormat?s.format(p,void 0,i,Ze(Ze(Ze({},o),r),{},{interpolationkey:v})):p}var g=v.split(s.formatSeparator),S=g.shift().trim(),O=g.join(s.formatSeparator).trim();return s.format(Vf(r,c,S),O,i,Ze(Ze(Ze({},o),r),{},{interpolationkey:S}))};this.resetRegExp();var m=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,h=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,y=[{regex:this.regexpUnescape,safeValue:function(v){return f(v)}},{regex:this.regexp,safeValue:function(v){return s.escapeValue?f(s.escape(v)):f(v)}}];return y.forEach(function(k){for(u=0;a=k.regex.exec(n);){var v=a[1].trim();if(l=d(v),l===void 0)if(typeof m=="function"){var p=m(n,a,o);l=typeof p=="string"?p:""}else if(o&&o.hasOwnProperty(v))l="";else if(h){l=a[0];continue}else s.logger.warn("missed to pass in variable ".concat(v," for interpolating ").concat(n)),l="";else typeof l!="string"&&!s.useRawValueToEscape&&(l=Hf(l));var g=k.safeValue(l);if(n=n.replace(a[0],g),h?(k.regex.lastIndex+=l.length,k.regex.lastIndex-=a[0].length):k.regex.lastIndex=0,u++,u>=s.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,a,l=Ze({},o);l.applyPostProcessor=!1,delete l.defaultValue;function u(m,h){var y=this.nestingOptionsSeparator;if(m.indexOf(y)<0)return m;var k=m.split(new RegExp("".concat(y,"[ ]*{"))),v="{".concat(k[1]);m=k[0],v=this.interpolate(v,l);var p=v.match(/'/g),g=v.match(/"/g);(p&&p.length%2===0&&!g||g.length%2!==0)&&(v=v.replace(/'/g,'"'));try{l=JSON.parse(v),h&&(l=Ze(Ze({},h),l))}catch(S){return this.logger.warn("failed parsing options string in nesting for key ".concat(m),S),"".concat(m).concat(y).concat(v)}return delete l.defaultValue,m}for(;s=this.nestingRegexp.exec(n);){var c=[],f=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){var d=s[1].split(this.formatSeparator).map(function(m){return m.trim()});s[1]=d.shift(),c=d,f=!0}if(a=r(u.call(this,s[1].trim(),l),l),a&&s[0]===n&&typeof a!="string")return a;typeof a!="string"&&(a=Hf(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(n)),a=""),f&&(a=c.reduce(function(m,h){return i.format(m,h,o.lng,Ze(Ze({},o),{},{interpolationkey:s[1].trim()}))},a.trim())),n=n.replace(s[0],a),this.regexp.lastIndex=0}return n}}]),e}();function Xf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zt(e){for(var t=1;t-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(t==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(s){if(!!s){var a=s.split(":"),l=ZS(a),u=l[0],c=l.slice(1),f=c.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=f),f==="false"&&(n[u.trim()]=!1),f==="true"&&(n[u.trim()]=!0),isNaN(f)||(n[u.trim()]=parseInt(f,10))}})}}return{formatName:t,formatOptions:n}}var xw=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lt(this,e),this.logger=gt.create("formatter"),this.options=t,this.formats={number:function(r,i,o){return new Intl.NumberFormat(i,o).format(r)},currency:function(r,i,o){return new Intl.NumberFormat(i,zt(zt({},o),{},{style:"currency"})).format(r)},datetime:function(r,i,o){return new Intl.DateTimeFormat(i,zt({},o)).format(r)},relativetime:function(r,i,o){return new Intl.RelativeTimeFormat(i,zt({},o)).format(r,o.range||"day")},list:function(r,i,o){return new Intl.ListFormat(i,zt({},o)).format(r)}},this.init(t)}return ut(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"format",value:function(n,r,i,o){var s=this,a=r.split(this.formatSeparator),l=a.reduce(function(u,c){var f=ww(c),d=f.formatName,m=f.formatOptions;if(s.formats[d]){var h=u;try{var y=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},k=y.locale||y.lng||o.locale||o.lng||i;h=s.formats[d](u,k,zt(zt(zt({},m),o),y))}catch(v){s.logger.warn(v)}return h}else s.logger.warn("there was no format function for ".concat(d));return u},n);return l}}]),e}();function Zf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ed(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pw(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var Ew=function(e){ms(n,e);var t=kw(n);function n(r,i,o){var s,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return lt(this,n),s=t.call(this),vs&&un.call(sn(s)),s.backend=r,s.store=i,s.services=o,s.languageUtils=o.languageUtils,s.options=a,s.logger=gt.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=a.maxParallelReads||10,s.readingCalls=0,s.maxRetries=a.maxRetries>=0?a.maxRetries:5,s.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(o,a.backend,a),s}return ut(n,[{key:"queueLoad",value:function(i,o,s,a){var l=this,u={},c={},f={},d={};return i.forEach(function(m){var h=!0;o.forEach(function(y){var k="".concat(m,"|").concat(y);!s.reload&&l.store.hasResourceBundle(m,y)?l.state[k]=2:l.state[k]<0||(l.state[k]===1?c[k]===void 0&&(c[k]=!0):(l.state[k]=1,h=!1,c[k]===void 0&&(c[k]=!0),u[k]===void 0&&(u[k]=!0),d[y]===void 0&&(d[y]=!0)))}),h||(f[m]=!0)}),(Object.keys(u).length||Object.keys(c).length)&&this.queue.push({pending:c,pendingCount:Object.keys(c).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(u),pending:Object.keys(c),toLoadLanguages:Object.keys(f),toLoadNamespaces:Object.keys(d)}}},{key:"loaded",value:function(i,o,s){var a=i.split("|"),l=a[0],u=a[1];o&&this.emit("failedLoading",l,u,o),s&&this.store.addResourceBundle(l,u,s),this.state[i]=o?-1:2;var c={};this.queue.forEach(function(f){rw(f.loaded,[l],u),Pw(f,i),o&&f.errors.push(o),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(d){c[d]||(c[d]={});var m=f.loaded[d];m.length&&m.forEach(function(h){c[d][h]===void 0&&(c[d][h]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(f){return!f.done})}},{key:"read",value:function(i,o,s){var a=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,c=arguments.length>5?arguments[5]:void 0;if(!i.length)return c(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:s,tried:l,wait:u,callback:c});return}return this.readingCalls++,this.backend[s](i,o,function(f,d){if(a.readingCalls--,a.waitingReads.length>0){var m=a.waitingReads.shift();a.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(f&&d&&l2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var u=this.queueLoad(i,o,a,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(c){s.loadOne(c)})}},{key:"load",value:function(i,o,s){this.prepareLoading(i,o,{},s)}},{key:"reload",value:function(i,o,s){this.prepareLoading(i,o,{reload:!0},s)}},{key:"loadOne",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=i.split("|"),l=a[0],u=a[1];this.read(l,u,"read",void 0,void 0,function(c,f){c&&o.logger.warn("".concat(s,"loading namespace ").concat(u," for language ").concat(l," failed"),c),!c&&f&&o.logger.log("".concat(s,"loaded namespace ").concat(u," for language ").concat(l),f),o.loaded(i,c,f)})}},{key:"saveMissing",value:function(i,o,s,a,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(s,'" as the namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}s==null||s===""||(this.backend&&this.backend.create&&this.backend.create(i,o,s,a,null,ed(ed({},u),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],o,s,a))}}]),n}(un);function Cw(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(on(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),on(t[2])==="object"||on(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function td(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function nd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ft(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vi(){}function Nw(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var Vo=function(e){ms(n,e);var t=_w(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(lt(this,n),r=t.call(this),vs&&un.call(sn(r)),r.options=td(i),r.services={},r.logger=gt,r.modules={external:[]},Nw(sn(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),ki(r,sn(r));setTimeout(function(){r.init(i,o)},0)}return r}return ut(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(s=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var a=Cw();this.options=ft(ft(ft({},a),this.options),td(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=ft(ft({},a.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(v){return v?typeof v=="function"?new v:v:null}if(!this.options.isClone){this.modules.logger?gt.init(l(this.modules.logger),this.options):gt.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=xw);var c=new pw(this.options);this.store=new cw(this.options.resources,this.options);var f=this.services;f.logger=gt,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new yw(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(f.formatter=l(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Sw(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Ew(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(v){for(var p=arguments.length,g=new Array(p>1?p-1:0),S=1;S1?p-1:0),S=1;S
0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var m=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];m.forEach(function(v){i[v]=function(){var p;return(p=i.store)[v].apply(p,arguments)}});var h=["addResource","addResources","addResourceBundle","removeResourceBundle"];h.forEach(function(v){i[v]=function(){var p;return(p=i.store)[v].apply(p,arguments),i}});var y=Ir(),k=function(){var p=function(S,O){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),y.resolve(O),s(S,O)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return p(null,i.t.bind(i));i.changeLanguage(i.options.lng,p)};return this.options.resources||!this.options.initImmediate?k():setTimeout(k,0),y}},{key:"loadResources",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vi,a=s,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(a=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return a();var u=[],c=function(m){if(!!m){var h=o.services.languageUtils.toResolveHierarchy(m);h.forEach(function(y){u.indexOf(y)<0&&u.push(y)})}};if(l)c(l);else{var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.forEach(function(d){return c(d)})}this.options.preload&&this.options.preload.forEach(function(d){return c(d)}),this.services.backendConnector.load(u,this.options.ns,function(d){!d&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),a(d)})}else a(null)}},{key:"reloadResources",value:function(i,o,s){var a=Ir();return i||(i=this.languages),o||(o=this.options.ns),s||(s=Vi),this.services.backendConnector.reload(i,o,function(l){a.resolve(),s(l)}),a}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&fg.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}},{key:"changeLanguage",value:function(i,o){var s=this;this.isLanguageChangingTo=i;var a=Ir();this.emit("languageChanging",i);var l=function(d){s.language=d,s.languages=s.services.languageUtils.toResolveHierarchy(d),s.resolvedLanguage=void 0,s.setResolvedLanguage(d)},u=function(d,m){m?(l(m),s.translator.changeLanguage(m),s.isLanguageChangingTo=void 0,s.emit("languageChanged",m),s.logger.log("languageChanged",m)):s.isLanguageChangingTo=void 0,a.resolve(function(){return s.t.apply(s,arguments)}),o&&o(d,function(){return s.t.apply(s,arguments)})},c=function(d){!i&&!d&&s.services.languageDetector&&(d=[]);var m=typeof d=="string"?d:s.services.languageUtils.getBestMatchFromCodes(d);m&&(s.language||l(m),s.translator.language||s.translator.changeLanguage(m),s.services.languageDetector&&s.services.languageDetector.cacheUserLanguage(m)),s.loadResources(m,function(h){u(h,m)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(c):c(i),a}},{key:"getFixedT",value:function(i,o,s){var a=this,l=function u(c,f){var d;if(on(f)!=="object"){for(var m=arguments.length,h=new Array(m>2?m-2:0),y=2;y1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var a=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;var c=function(m,h){var y=o.services.backendConnector.state["".concat(m,"|").concat(h)];return y===-1||y===2};if(s.precheck){var f=s.precheck(this,c);if(f!==void 0)return f}return!!(this.hasResourceBundle(a,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||c(a,i)&&(!l||c(u,i)))}},{key:"loadNamespaces",value:function(i,o){var s=this,a=Ir();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){s.options.ns.indexOf(l)<0&&s.options.ns.push(l)}),this.loadResources(function(l){a.resolve(),o&&o(l)}),a):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var s=Ir();typeof i=="string"&&(i=[i]);var a=this.options.preload||[],l=i.filter(function(u){return a.indexOf(u)<0});return l.length?(this.options.preload=a.concat(l),this.loadResources(function(u){s.resolve(),o&&o(u)}),s):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return o.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vi,a=ft(ft(ft({},this.options),o),{isClone:!0}),l=new n(a);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var u=["store","services","language"];return u.forEach(function(c){l[c]=i[c]}),l.services=ft({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new Gf(l.services,l.options),l.translator.on("*",function(c){for(var f=arguments.length,d=new Array(f>1?f-1:0),m=1;m0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Vo(e,t)});var Ce=Vo.createInstance();Ce.createInstance=Vo.createInstance;Ce.createInstance;Ce.init;Ce.loadResources;Ce.reloadResources;Ce.use;Ce.changeLanguage;Ce.getFixedT;Ce.t;Ce.exists;Ce.setDefaultNamespace;Ce.hasLoadedNamespace;Ce.loadNamespaces;Ce.loadLanguages;const Iw="Stable Diffusion UI",bw="",Lw={home:"Home",history:"History",community:"Community",settings:"Settings"},Tw={"status-starting":"Stable Diffusion is starting...","status-ready":"Stable Diffusion is ready to use!","status-error":"Stable Diffusion is not running!","editor-title":"Prompt","initial-img-txt":"Initial Image: (optional)","initial-img-btn":"Browse...","initial-img-text2":"No file selected.","make-img-btn":"Make Image","make-img-btn-stop":"Stop"},Dw={"base-img":"Use base image:",seed:"Seed:","amount-of-img":"Amount of images to make:","how-many":"How many at once:","stream-img":"Stream images (this will slow down image generation):",width:"Width:",height:"Height:",sampler:"Sampler:",steps:"Number of inference steps:","guide-scale":"Guidance Scale:","prompt-str":"Prompt Strength:","live-preview":"Show a live preview of the image (disable this for faster image generation)","fix-face":"Fix incorrect faces and eyes (uses GFPGAN)",ups:"Upscale the image to 4x resolution using:","no-ups":"No Upscaling",corrected:"Show only the corrected/upscaled image"},Fw={txt:"Image Modifiers (art styles, tags etc)"},Mw={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},jw={fave:"Favorites Only",search:"Search"},Aw={ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cps:"Cross profile sharing","cps-disc":"Profiles will see suggestions from each other.",acb:"Allow cloud backup","acb-disc":"A button will show up for images on hover","acb-place":"Choose your","acc-api":"Api key","acb-api-place":"Your API key",save:"SAVE"},$w=`If you found this project useful and want to help keep it alive, please to help cover the cost of development and maintenance! Thank you for your support!
Please feel free to join the discord community or file an issue if you have any problems or suggestions in using this interface.
@@ -91,10 +94,10 @@ This license of this software forbids you from sharing any content that violates
spread misinformation and target vulnerable groups. For the full list of restrictions please read the license.
By using this software, you consent to the terms and conditions of the license.
-`,Y1={title:z1,description:$1,navbar:B1,"land-cre":{cp:"Create Profile","cp-place":"Profile name",pp:"Profile Picture","pp-disc":"",ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cre:"Create"},"land-pre":{user:"Username",add:"Add Profile"},home:Q1,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:V1,tags:H1,"preview-prompt":{part1:'Type a prompt and press the "Make Image" button.',part2:`You can set an "Initial Image" if you want to guide the AI.
+`,Uw={title:Iw,description:bw,navbar:Lw,"land-cre":{cp:"Create Profile","cp-place":"Profile name",pp:"Profile Picture","pp-disc":"",ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cre:"Create"},"land-pre":{user:"Username",add:"Add Profile"},home:Tw,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:Dw,tags:Fw,"preview-prompt":{part1:'Type a prompt and press the "Make Image" button.',part2:`You can set an "Initial Image" if you want to guide the AI.
`,part3:`You can also add modifiers like "Realistic", "Pencil Sketch", "ArtStation" etc by browsing through the "Image Modifiers" section and selecting the desired modifiers.
-`,part4:'Click "Advanced Settings" for additional settings like seed, image size, number of images to generate etc.',part5:"Enjoy! :)"},"current-task":"Current task","recent-create":"Recently Created",popup:K1,history:q1,"advanced-settings":{sound:"Play sound on task completion","sound-disc":"Will play a sound so user can hear when image is done.",turbo:"Turbo mode","turbo-disc":"Generates images faster, but uses an additional 1 GB of GPU memory",cpu:"Use CPU instead of GPU","cpu-disc":"Warning: this will be *very* slow",gpu:"Use full precision","gpu-disc":"(for GPU-only. warning: this will consume more VRAM)",beta:"Beta Features","beta-disc":`Get the latest features immediately (but could be less stable).
-Please restart the program after changing this.`,save:"SAVE"},storage:W1,import:{"imp-btn":"IMPORT","exp-btn":"EXPORT",disc:"It is a good idea to leave the exported file as it is. Otherwise it may not import correctly","disc:2":"When importing, only profiles that are not already present on the will be added."},about:G1},J1="Stable Diffusion UI",X1="",Z1={home:"Home",history:"History",community:"Community",settings:"Settings"},eS={"status-starting":"Stable Diffusion is starting...","status-ready":"Stable Diffusion is ready to use!","status-error":"Stable Diffusion is not running!","editor-title":"Prompt","initial-img-txt":"Initial Image: (optional)","initial-img-btn":"Browse...","initial-img-text2":"No file selected.","make-img-btn":"Make Image","make-img-btn-stop":"Stop"},tS={"base-img":"Use base image:",seed:"Seed:","amount-of-img":"Amount of images to make:","how-many":"How many at once:",width:"Width:",height:"Height:",steps:"Number of inference steps:","guide-scale":"Guidance Scale:","prompt-str":"Prompt Strength:","live-preview":"Show a live preview of the image (disable this for faster image generation)","fix-face":"Fix incorrect faces and eyes (uses GFPGAN)",ups:"Upscale the image to 4x resolution using:","no-ups":"No Upscaling",corrected:"Show only the corrected/upscaled image"},nS={txt:"Image Modifiers (art styles, tags etc)"},rS={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},iS={fave:"Favorites Only",search:"Search"},oS={ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cps:"Cross profile sharing","cps-disc":"Profiles will see suggestions from each other.",acb:"Allow cloud backup","acb-disc":"A button will show up for images on hover","acb-place":"Choose your","acc-api":"Api key","acb-api-place":"Your API key",save:"SAVE"},sS=`If you found this project useful and want to help keep it alive, please to help cover the cost of development and maintenance! Thank you for your support!
+`,part4:'Click "Advanced Settings" for additional settings like seed, image size, number of images to generate etc.',part5:"Enjoy! :)"},"current-task":"Current task","recent-create":"Recently Created",popup:Mw,history:jw,"advanced-settings":{sound:"Play sound on task completion","sound-disc":"Will play a sound so user can hear when image is done.",turbo:"Turbo mode","turbo-disc":"Generates images faster, but uses an additional 1 GB of GPU memory",cpu:"Use CPU instead of GPU","cpu-disc":"Warning: this will be *very* slow",gpu:"Use full precision","gpu-disc":"(for GPU-only. warning: this will consume more VRAM)",beta:"Beta Features","beta-disc":`Get the latest features immediately (but could be less stable).
+Please restart the program after changing this.`,save:"SAVE"},storage:Aw,import:{"imp-btn":"IMPORT","exp-btn":"EXPORT",disc:"It is a good idea to leave the exported file as it is. Otherwise it may not import correctly","disc:2":"When importing, only profiles that are not already present on the will be added."},about:$w},zw="Stable Diffusion UI",Bw="",Hw={home:"Home",history:"History",community:"Community",settings:"Settings"},Qw={"status-starting":"Stable Diffusion is starting...","status-ready":"Stable Diffusion is ready to use!","status-error":"Stable Diffusion is not running!","editor-title":"Prompt","initial-img-txt":"Initial Image: (optional)","initial-img-btn":"Browse...","initial-img-text2":"No file selected.","make-img-btn":"Make Image","make-img-btn-stop":"Stop"},Vw={"base-img":"Use base image:",seed:"Seed:","amount-of-img":"Amount of images to make:","how-many":"How many at once:",width:"Width:",height:"Height:",steps:"Number of inference steps:","guide-scale":"Guidance Scale:","prompt-str":"Prompt Strength:","live-preview":"Show a live preview of the image (disable this for faster image generation)","fix-face":"Fix incorrect faces and eyes (uses GFPGAN)",ups:"Upscale the image to 4x resolution using:","no-ups":"No Upscaling",corrected:"Show only the corrected/upscaled image"},Kw={txt:"Image Modifiers (art styles, tags etc)"},qw={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},Ww={fave:"Favorites Only",search:"Search"},Gw={ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cps:"Cross profile sharing","cps-disc":"Profiles will see suggestions from each other.",acb:"Allow cloud backup","acb-disc":"A button will show up for images on hover","acb-place":"Choose your","acc-api":"Api key","acb-api-place":"Your API key",save:"SAVE"},Yw=`If you found this project useful and want to help keep it alive, please to help cover the cost of development and maintenance! Thank you for your support!
Please feel free to join the discord community or file an issue if you have any problems or suggestions in using this interface.
@@ -104,7 +107,7 @@ This license of this software forbids you from sharing any content that violates
spread misinformation and target vulnerable groups. For the full list of restrictions please read the license.
By using this software, you consent to the terms and conditions of the license.
-`,aS={title:J1,description:X1,navbar:Z1,"land-cre":{cp:"Create Profile","cp-place":"Profile name",pp:"Profile Picture","pp-disc":"",ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cre:"Create"},"land-pre":{user:"Username",add:"Add Profile"},home:eS,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:tS,tags:nS,"preview-prompt":{part1:'Type a prompt and press the "Make Image" button.',part2:`You can set an "Initial Image" if you want to guide the AI.
+`,Jw={title:zw,description:Bw,navbar:Hw,"land-cre":{cp:"Create Profile","cp-place":"Profile name",pp:"Profile Picture","pp-disc":"",ast:"Automatically save to","ast-disc":"File path to auto save your creations",place:"File path",cre:"Create"},"land-pre":{user:"Username",add:"Add Profile"},home:Qw,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:Vw,tags:Kw,"preview-prompt":{part1:'Type a prompt and press the "Make Image" button.',part2:`You can set an "Initial Image" if you want to guide the AI.
`,part3:`You can also add modifiers like "Realistic", "Pencil Sketch", "ArtStation" etc by browsing through the "Image Modifiers" section and selecting the desired modifiers.
-`,part4:'Click "Advanced Settings" for additional settings like seed, image size, number of images to generate etc.',part5:"Enjoy! :)"},"current-task":"Current task","recent-create":"Recently Created",popup:rS,history:iS,"advanced-settings":{sound:"Play sound on task completion","sound-disc":"Will play a sound so user can hear when image is done.",turbo:"Turbo mode","turbo-disc":"Generates images faster, but uses an additional 1 GB of GPU memory",cpu:"Use CPU instead of GPU","cpu-disc":"Warning: this will be *very* slow",gpu:"Use full precision","gpu-disc":"(for GPU-only. warning: this will consume more VRAM)",beta:"Beta Features","beta-disc":`Get the latest features immediately (but could be less stable).
-Please restart the program after changing this.`,save:"SAVE"},storage:oS,import:{"imp-btn":"IMPORT","exp-btn":"EXPORT",disc:"It is a good idea to leave the exported file as it is. Otherwise it may not import correctly","disc:2":"When importing, only profiles that are not already present on the will be added."},about:sS},lS={en:{translation:Y1},es:{translation:aS}};Pe.use(Qy).init({lng:"en",interpolation:{escapeValue:!1},resources:lS}).then(()=>{console.log("i18n initialized")}).catch(e=>{console.error("i18n initialization failed",e)}).finally(()=>{console.log("i18n initialization finished")});const uS=new jv;function cS(){const e=a1;return k(Av,{location:uS,routes:[{path:"/",element:k(o1,{className:e})},{path:"/settings",element:k(s1,{className:e})}]})}const fS=new iv({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:1/0,cacheTime:1/0}}});Ov();bs.createRoot(document.getElementById("root")).render(k(Ch.StrictMode,{children:N(lv,{client:fS,children:[k(cS,{}),k(gv,{initialIsOpen:!0})]})}));
+`,part4:'Click "Advanced Settings" for additional settings like seed, image size, number of images to generate etc.',part5:"Enjoy! :)"},"current-task":"Current task","recent-create":"Recently Created",popup:qw,history:Ww,"advanced-settings":{sound:"Play sound on task completion","sound-disc":"Will play a sound so user can hear when image is done.",turbo:"Turbo mode","turbo-disc":"Generates images faster, but uses an additional 1 GB of GPU memory",cpu:"Use CPU instead of GPU","cpu-disc":"Warning: this will be *very* slow",gpu:"Use full precision","gpu-disc":"(for GPU-only. warning: this will consume more VRAM)",beta:"Beta Features","beta-disc":`Get the latest features immediately (but could be less stable).
+Please restart the program after changing this.`,save:"SAVE"},storage:Gw,import:{"imp-btn":"IMPORT","exp-btn":"EXPORT",disc:"It is a good idea to leave the exported file as it is. Otherwise it may not import correctly","disc:2":"When importing, only profiles that are not already present on the will be added."},about:Yw},Xw={en:{translation:Uw},es:{translation:Jw}};Ce.use(E1).init({lng:"en",interpolation:{escapeValue:!1},resources:Xw}).then(()=>{console.log("i18n initialized")}).catch(e=>{console.error("i18n initialization failed",e)}).finally(()=>{console.log("i18n initialization finished")});const Zw=new My;function ex(){const e=JS;return x(jy,{location:Zw,routes:[{path:"/",element:x(GS,{className:e})},{path:"/settings",element:x(YS,{className:e})}]})}const tx=new iy({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:1/0,cacheTime:1/0}}});xy();oa.createRoot(document.getElementById("root")).render(x(rt.StrictMode,{children:I(ay,{client:tx,children:[x(ex,{}),x(hy,{initialIsOpen:!0})]})}));