-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}},{key:"changeLanguage",value:function(i,o){var s=this;this.isLanguageChangingTo=i;var a=gr();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(qt(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=gr();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=gr();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]:Ei,a=ot(ot(ot({},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=ot({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new sf(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 Po(e,t)});var ke=Po.createInstance();ke.createInstance=Po.createInstance;ke.createInstance;ke.init;ke.loadResources;ke.reloadResources;ke.use;ke.changeLanguage;ke.getFixedT;ke.t;ke.exists;ke.setDefaultNamespace;ke.hasLoadedNamespace;ke.loadNamespaces;ke.loadLanguages;const j1="Stable Diffusion UI",T1="",M1={home:"Home",history:"History",community:"Community",settings:"Settings"},A1={"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"},U1={"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"},z1={txt:"Image Modifiers (art styles, tags etc)"},$1={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},B1={fave:"Favorites Only",search:"Search"},Q1={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"},V1=`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 Ho=E.exports,dy=Tl.exports;function py(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hy=typeof Object.is=="function"?Object.is:py,gy=dy.useSyncExternalStore,my=Ho.useRef,vy=Ho.useEffect,yy=Ho.useMemo,Sy=Ho.useDebugValue;th.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=my(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=yy(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),i!==void 0&&s.hasValue){var v=s.value;if(i(v,p))return f=v}return f=p}if(v=f,hy(c,p))return v;var S=r(p);return i!==void 0&&i(v,S)?v:(c=p,f=S)}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=gy(e,o[0],o[1]);return vy(function(){s.hasValue=!0,s.value=a},[a]),Sy(a),a};(function(e){e.exports=th})(eh);const wy=hf(eh.exports),{useSyncExternalStoreWithSelector:ky}=wy;function Oy(e,t=e.getState,n){const r=ky(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return E.exports.useDebugValue(r),r}const Tc=e=>{const t=typeof e=="function"?fy(e):e,n=(r,i)=>Oy(t,r,i);return Object.assign(n,t),n},xy=e=>e?Tc(e):Tc;var Gl=xy;const Py=(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=(p,v,S)=>{const w=n(p,v);return c&&u.send(S===void 0?{type:s||"anonymous"}:typeof S=="string"?{type:S}:S,r()),w};const f=(...p)=>{const v=c;c=!1,n(...p),c=v},d=e(i.setState,r,i);if(u.init(d),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let p=!1;const v=i.dispatch;i.dispatch=(...S)=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&S[0].type==="__setState"&&!p&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),p=!0),v(...S)}}return u.subscribe(p=>{var v;switch(p.type){case"ACTION":if(typeof p.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Is(p.payload,S=>{if(S.type==="__setState"){f(S.state);return}!i.dispatchFromDevtools||typeof i.dispatch=="function"&&i.dispatch(S)});case"DISPATCH":switch(p.payload.type){case"RESET":return f(d),u.init(i.getState());case"COMMIT":return u.init(i.getState());case"ROLLBACK":return Is(p.state,S=>{f(S),u.init(i.getState())});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Is(p.state,S=>{f(S)});case"IMPORT_STATE":{const{nextLiftedState:S}=p.payload,w=(v=S.computedStates.slice(-1)[0])==null?void 0:v.state;if(!w)return;f(w),u.send(null,S);return}case"PAUSE_RECORDING":return c=!c}return}}),d},_y=Py,Is=(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)},Oo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Oo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Oo(r)(n)}}}},Cy=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:w=>w,version:0,merge:(w,m)=>({...m,...w}),...t},s=!1;const a=new Set,l=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...w)},r,i);const c=Oo(o.serialize),f=()=>{const w=o.partialize({...r()});let m;const h=c({state:w,version:o.version}).then(g=>u.setItem(o.name,g)).catch(g=>{m=g});if(m)throw m;return h},d=i.setState;i.setState=(w,m)=>{d(w,m),f()};const p=e((...w)=>{n(...w),f()},r,i);let v;const S=()=>{var w;if(!u)return;s=!1,a.forEach(h=>h(r()));const m=((w=o.onRehydrateStorage)==null?void 0:w.call(o,r()))||void 0;return Oo(u.getItem.bind(u))(o.name).then(h=>{if(h)return o.deserialize(h)}).then(h=>{if(h)if(typeof h.version=="number"&&h.version!==o.version){if(o.migrate)return o.migrate(h.state,h.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return h.state}).then(h=>{var g;return v=o.merge(h,(g=r())!=null?g:p),n(v,!0),f()}).then(()=>{m==null||m(v,void 0),s=!0,l.forEach(h=>h(v))}).catch(h=>{m==null||m(void 0,h)})};return i.persist={setOptions:w=>{o={...o,...w},w.getStorage&&(u=w.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>S(),hasHydrated:()=>s,onHydrate:w=>(a.add(w),()=>{a.delete(w)}),onFinishHydration:w=>(l.add(w),()=>{l.delete(w)})},S(),v||p},Ey=Cy;function Xr(){return Math.floor(Math.random()*1e4)}const F=Gl(_y((e,t)=>({parallelCount:1,requestOptions:{prompt:"a photograph of an astronaut riding a horse",seed:Xr(),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},tags:[],uiOptions:{isUseRandomSeed:!0,isUseAutoSave:!1,isSoundEnabled:!1},allModifiers:[[[]]],isInpainting:!1,setParallelCount:n=>e(ie(r=>{r.parallelCount=n})),setRequestOptions:(n,r)=>{e(ie(i=>{i.requestOptions[n]=r}))},getValueForRequestKey:n=>t().requestOptions[n],setAllModifiers:n=>{e(ie(r=>{r.allModifiers=n}))},toggleTag:n=>{e(ie(r=>{const i=r.tags.indexOf(n);i>-1?r.tags.splice(i,1):r.tags.push(n)}))},hasTag:n=>t().tags.includes(n),selectedTags:()=>t().tags,builtRequest:()=>{const n=t(),r=n.requestOptions,i=n.tags,o=`${r.prompt} ${i.join(",")}`,s={...r,prompt:o};return n.uiOptions.isUseAutoSave||(s.save_to_disk_path=null),s.init_image===void 0&&(s.prompt_strength=void 0),s.use_upscale===""&&(s.use_upscale=null),s.use_upscale===null&&s.use_face_correction===null&&(s.show_only_filtered_image=!1),s},toggleUseFaceCorrection:()=>{e(ie(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(ie(n=>{n.uiOptions.isUseRandomSeed=!n.uiOptions.isUseRandomSeed,n.requestOptions.seed=n.uiOptions.isUseRandomSeed?Xr():n.requestOptions.seed}))},isRandomSeed:()=>t().uiOptions.isUseRandomSeed,toggleUseAutoSave:()=>{e(ie(n=>{n.uiOptions.isUseAutoSave=!n.uiOptions.isUseAutoSave}))},isUseAutoSave:()=>t().uiOptions.isUseAutoSave,toggleSoundEnabled:()=>{e(ie(n=>{n.uiOptions.isSoundEnabled=!n.uiOptions.isSoundEnabled}))},isSoundEnabled:()=>t().uiOptions.isSoundEnabled,toggleInpainting:()=>{e(ie(n=>{n.isInpainting=!n.isInpainting}))}})));var Mc="_1jo75h1",Ac="_1jo75h0",Ry="_1jo75h2";const Uc="Stable Diffusion is starting...",Ny="Stable Diffusion is ready to use!",zc="Stable Diffusion is not running!";function Iy({className:e}){const[t,n]=E.exports.useState(Uc),[r,i]=E.exports.useState(Ac),{status:o,data:s}=Wr(["health"],iy,{refetchInterval:ry});return E.exports.useEffect(()=>{o==="loading"?(n(Uc),i(Ac)):o==="error"?(n(zc),i(Mc)):o==="success"&&(s[0]==="OK"?(n(Ny),i(Ry)):(n(zc),i(Mc)))},[o,s]),k(yn,{children:k("p",{className:[r,e].join(" "),children:t})})}function qt(e){return qt=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},qt(e)}function ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $c(e,t){for(var n=0;n",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"\xA9","©":"\xA9","®":"\xAE","®":"\xAE","…":"\u2026","…":"\u2026","/":"/","/":"/"},Fy=function(t){return by[t]},Dy=function(t){return t.replace(Ly,Fy)};function Bc(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 Qc(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};Ua=Qc(Qc({},Ua),e)}function My(){return Ua}var Ay=function(){function e(){nt(this,e),this.usedNamespaces={}}return rt(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 Uy(e){nh=e}function zy(){return nh}var $y={type:"3rdParty",init:function(t){Ty(t.options.react),Uy(t)}};function By(){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 Vy(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return za("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}}):Qy(e,t,n)}function rh(e){if(Array.isArray(e))return e}function Hy(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 Kc(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=E.exports.useContext(jy)||{},i=r.i18n,o=r.defaultNS,s=n||i||zy();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new Ay),!s){za("You will need to pass in an i18next instance by using initReactI18next");var a=function(R){return Array.isArray(R)?R[R.length-1]:R},l=[a,{},!1];return l.t=a,l.i18n={},l.ready=!1,l}s.options.react&&s.options.react.wait!==void 0&&za("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=Ls(Ls(Ls({},My()),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 p=(s.isInitialized||s.initializedStoreOnce)&&d.every(function(O){return Vy(O,s,u)});function v(){return s.getFixedT(null,u.nsMode==="fallback"?d:d[0],f)}var S=E.exports.useState(v),w=Ky(S,2),m=w[0],h=w[1],g=d.join(),y=qy(g),P=E.exports.useRef(!0);E.exports.useEffect(function(){var O=u.bindI18n,R=u.bindI18nStore;P.current=!0,!p&&!c&&Hc(s,d,function(){P.current&&h(v)}),p&&y&&y!==g&&P.current&&h(v);function b(){P.current&&h(v)}return O&&s&&s.on(O,b),R&&s&&s.store.on(R,b),function(){P.current=!1,O&&s&&O.split(" ").forEach(function(M){return s.off(M,b)}),R&&s&&R.split(" ").forEach(function(M){return s.store.off(M,b)})}},[s,g]);var _=E.exports.useRef(!0);E.exports.useEffect(function(){P.current&&!_.current&&h(v),_.current=!1},[s,f]);var x=[m,s,p];if(x.t=m,x.i18n=s,x.ready=p,p||!p&&!c)return x;throw new Promise(function(O){Hc(s,d,function(){O()})})}var Wy="_1v2cc580";function Gy(){const{t:e}=tn(),{status:t,data:n}=Wr([ay],ly),[r,i]=E.exports.useState("2.1.0"),[o,s]=E.exports.useState("");return E.exports.useEffect(()=>{if(t==="success"){const{update_branch:a}=n;i("v2.1"),s(a==="main"?"(stable)":"(beta)")}},[t,n,i,i]),L("div",{className:Wy,children:[L("h1",{children:[e("title")," ",r," ",o," "]}),k(Iy,{className:"status-display"})]})}const Ke=Gl(Ey((e,t)=>({isOpenAdvancedSettings:!1,isOpenAdvImprovementSettings:!1,isOpenAdvPropertySettings:!1,isOpenAdvWorkflowSettings:!1,isOpenAdvGPUSettings:!1,isOpenImageModifier:!1,imageMofidiersMap:{},toggleAdvancedSettings:()=>{e(ie(n=>{n.isOpenAdvancedSettings=!n.isOpenAdvancedSettings}))},toggleAdvImprovementSettings:()=>{e(ie(n=>{n.isOpenAdvImprovementSettings=!n.isOpenAdvImprovementSettings}))},toggleAdvPropertySettings:()=>{e(ie(n=>{n.isOpenAdvPropertySettings=!n.isOpenAdvPropertySettings}))},toggleAdvWorkflowSettings:()=>{e(ie(n=>{n.isOpenAdvWorkflowSettings=!n.isOpenAdvWorkflowSettings}))},toggleAdvGPUSettings:()=>{e(ie(n=>{n.isOpenAdvGPUSettings=!n.isOpenAdvGPUSettings}))},toggleImageModifier:()=>{e(ie(n=>{n.isOpenImageModifier=!n.isOpenImageModifier}))}}),{name:"createUI"}));var sh="_1961rof0",ve="_1961rof1";var Pi="_11d5x3d1",Yy="_11d5x3d0",Ko="_11d5x3d2";function Jy(){const{t:e}=tn(),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=Ke(f=>f.isOpenAdvImprovementSettings),l=Ke(f=>f.toggleAdvImprovementSettings),[u,c]=E.exports.useState(!1);return E.exports.useEffect(()=>{t||r!=""?c(!1):c(!0)},[t,n,c]),L("div",{children:[k("button",{type:"button",className:Ko,onClick:l,children:k("h4",{children:"Improvement Settings"})}),a&&L(yn,{children:[k("div",{className:ve,children:L("label",{children:[k("input",{type:"checkbox",checked:t,onChange:f=>o()}),"Fix incorrect faces and eyes (uses GFPGAN)"]})}),k("div",{className:ve,children:L("label",{children:[e("settings.ups"),L("select",{id:"upscale_model",name:"upscale_model",value:r,onChange:f=>{s("use_upscale",f.target.value)},children:[k("option",{value:"",children:e("settings.no-ups")}),k("option",{value:"RealESRGAN_x4plus",children:"RealESRGAN_x4plus"}),k("option",{value:"RealESRGAN_x4plus_anime_6B",children:"RealESRGAN_x4plus_anime_6B"})]})]})}),k("div",{className:ve,children:L("label",{children:[k("input",{disabled:u,type:"checkbox",checked:i,onChange:f=>s("show_only_filtered_image",f.target.checked)}),e("settings.corrected")]})})]})]})}const Wc=[{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 Xy(){const{t:e}=tn(),t=F(p=>p.setRequestOptions),n=F(p=>p.toggleUseRandomSeed),r=F(p=>p.isRandomSeed()),i=F(p=>p.getValueForRequestKey("seed")),o=F(p=>p.getValueForRequestKey("num_inference_steps")),s=F(p=>p.getValueForRequestKey("guidance_scale")),a=F(p=>p.getValueForRequestKey("init_image")),l=F(p=>p.getValueForRequestKey("prompt_strength")),u=F(p=>p.getValueForRequestKey("width")),c=F(p=>p.getValueForRequestKey("height")),f=Ke(p=>p.isOpenAdvPropertySettings),d=Ke(p=>p.toggleAdvPropertySettings);return L("div",{children:[k("button",{type:"button",className:Ko,onClick:d,children:k("h4",{children:"Property Settings"})}),f&&L(yn,{children:[L("div",{className:ve,children:[L("label",{children:["Seed:",k("input",{size:10,value:i,onChange:p=>t("seed",p.target.value),disabled:r,placeholder:"random"})]}),L("label",{children:[k("input",{type:"checkbox",checked:r,onChange:p=>n()})," ","Random Image"]})]}),k("div",{className:ve,children:L("label",{children:[e("settings.steps")," ",k("input",{value:o,onChange:p=>{t("num_inference_steps",p.target.value)},size:4})]})}),L("div",{className:ve,children:[L("label",{children:[e("settings.guide-scale"),k("input",{value:s,onChange:p=>t("guidance_scale",p.target.value),type:"range",min:"0",max:"20",step:".1"})]}),k("span",{children:s})]}),a!==void 0&&L("div",{className:ve,children:[L("label",{children:[e("settings.prompt-str")," ",k("input",{value:l,onChange:p=>t("prompt_strength",p.target.value),type:"range",min:"0",max:"1",step:".05"})]}),k("span",{children:l})]}),L("div",{className:ve,children:[L("label",{children:[e("settings.width"),k("select",{value:u,onChange:p=>t("width",p.target.value),children:Wc.map(p=>k("option",{value:p.value,children:p.label},`width-option_${p.value}`))})]}),L("label",{children:[e("settings.height"),k("select",{value:c,onChange:p=>t("height",p.target.value),children:Wc.map(p=>k("option",{value:p.value,children:p.label},`height-option_${p.value}`))})]})]})]})]})}function Zy(){const{t:e}=tn(),t=F(d=>d.getValueForRequestKey("num_outputs")),n=F(d=>d.parallelCount),r=F(d=>d.isUseAutoSave()),i=F(d=>d.getValueForRequestKey("save_to_disk_path")),o=F(d=>d.isSoundEnabled()),s=F(d=>d.setRequestOptions),a=F(d=>d.setParallelCount),l=F(d=>d.toggleUseAutoSave),u=F(d=>d.toggleSoundEnabled),c=Ke(d=>d.isOpenAdvWorkflowSettings),f=Ke(d=>d.toggleAdvWorkflowSettings);return L("div",{children:[k("button",{type:"button",className:Ko,onClick:f,children:k("h4",{children:"Workflow Settings"})}),c&&L(yn,{children:[k("div",{className:ve,children:L("label",{children:[e("settings.amount-of-img")," ",k("input",{type:"number",value:t,onChange:d=>s("num_outputs",parseInt(d.target.value,10)),size:4})]})}),k("div",{className:ve,children:L("label",{children:[e("settings.how-many"),k("input",{type:"number",value:n,onChange:d=>a(parseInt(d.target.value,10)),size:4})]})}),L("div",{className:ve,children:[L("label",{children:[k("input",{checked:r,onChange:d=>l(),type:"checkbox"}),e("storage.ast")," "]}),L("label",{children:[k("input",{value:i,onChange:d=>s("save_to_disk_path",d.target.value),size:40,disabled:!r}),k("span",{className:"visually-hidden",children:"Path on disk where images will be saved"})]})]}),k("div",{className:ve,children:L("label",{children:[k("input",{checked:o,onChange:d=>u(),type:"checkbox"}),e("advanced-settings.sound")]})})]})]})}function e0(){const{t:e}=tn(),t=F(a=>a.getValueForRequestKey("turbo")),n=F(a=>a.getValueForRequestKey("use_cpu")),r=F(a=>a.getValueForRequestKey("use_full_precision")),i=F(a=>a.setRequestOptions),o=Ke(a=>a.isOpenAdvGPUSettings),s=Ke(a=>a.toggleAdvGPUSettings);return L("div",{children:[k("button",{type:"button",className:Ko,onClick:s,children:k("h4",{children:"GPU Settings"})}),o&&L(yn,{children:[k("div",{className:ve,children:L("label",{children:[k("input",{checked:t,onChange:a=>i("turbo",a.target.checked),type:"checkbox"}),e("advanced-settings.turbo")," ",e("advanced-settings.turbo-disc")]})}),k("div",{className:ve,children:L("label",{children:[k("input",{type:"checkbox",checked:n,onChange:a=>i("use_cpu",a.target.checked)}),e("advanced-settings.cpu")," ",e("advanced-settings.cpu-disc")]})}),k("div",{className:ve,children:L("label",{children:[k("input",{checked:r,onChange:a=>i("use_full_precision",a.target.checked),type:"checkbox"}),e("advanced-settings.gpu")," ",e("advanced-settings.gpu-disc")]})})]})]})}function t0(){return L("ul",{className:Yy,children:[k("li",{className:Pi,children:k(Jy,{})}),k("li",{className:Pi,children:k(Xy,{})}),k("li",{className:Pi,children:k(Zy,{})}),k("li",{className:Pi,children:k(e0,{})})]})}function n0(){const e=Ke(n=>n.isOpenAdvancedSettings),t=Ke(n=>n.toggleAdvancedSettings);return L("div",{className:sh,children:[k("button",{type:"button",onClick:t,className:"panel-box-toggle-btn",children:k("h3",{children:"Advanced Settings"})}),e&&k(t0,{})]})}var r0="g3uahc1",i0="g3uahc0",o0="g3uahc2",s0="g3uahc3";function ah({name:e}){const t=F(i=>i.hasTag(e))?"selected":"",n=F(i=>i.toggleTag),r=()=>{n(e)};return k("div",{className:"modifierTag "+t,onClick:r,children:k("p",{children:e})})}function a0({tags:e}){return k("ul",{className:s0,children:e.map(t=>k("li",{children:k(ah,{name:t})},t))})}function l0({title:e,tags:t}){const[n,r]=E.exports.useState(!1);return L("div",{className:r0,children:[k("button",{type:"button",className:o0,onClick:()=>{r(!n)},children:k("h4",{children:e})}),n&&k(a0,{tags:t})]})}function u0(){const e=F(i=>i.allModifiers),t=Ke(i=>i.isOpenImageModifier),n=Ke(i=>i.toggleImageModifier);return L("div",{className:sh,children:[k("button",{type:"button",onClick:()=>{n()},className:"panel-box-toggle-btn",children:k("h3",{children:"Image Modifiers (art styles, tags, ect)"})}),t&&k("ul",{className:i0,children:e.map((i,o)=>k("li",{children:k(l0,{title:i[0],tags:i[1]})},i[0]))})]})}var c0="fma0ug0";function f0({imageData:e,brushSize:t,brushShape:n,brushColor:r,isErasing:i}){const o=E.exports.useRef(null),s=E.exports.useRef(null),[a,l]=E.exports.useState(!1),[u,c]=E.exports.useState(512),[f,d]=E.exports.useState(512);E.exports.useEffect(()=>{const h=new Image;h.onload=()=>{c(h.width),d(h.height)},h.src=e},[e]),E.exports.useEffect(()=>{if(o.current!=null){const h=o.current.getContext("2d"),g=h.getImageData(0,0,u,f),y=g.data;for(let P=0;P0&&(y[P]=parseInt(r,16),y[P+1]=parseInt(r,16),y[P+2]=parseInt(r,16));h.putImageData(g,0,0)}},[r]);const p=h=>{l(!0)},v=h=>{l(!1);const g=o.current;g!=null&&g.toDataURL()},S=(h,g,y,P,_)=>{const x=o.current;if(x!=null){const O=x.getContext("2d");if(i){const R=y/2;O.clearRect(h-R,g-R,y,y)}else O.beginPath(),O.lineWidth=y,O.lineCap=P,O.strokeStyle=_,O.moveTo(h,g),O.lineTo(h,g),O.stroke()}},w=(h,g,y,P,_)=>{const x=s.current;if(x!=null){const O=x.getContext("2d");if(O.beginPath(),O.clearRect(0,0,x.width,x.height),i){const R=y/2;O.lineWidth=2,O.lineCap="butt",O.strokeStyle=_,O.moveTo(h-R,g-R),O.lineTo(h+R,g-R),O.lineTo(h+R,g+R),O.lineTo(h-R,g+R),O.lineTo(h-R,g-R),O.stroke()}else O.lineWidth=y,O.lineCap=P,O.strokeStyle=_,O.moveTo(h,g),O.lineTo(h,g),O.stroke()}};return L("div",{className:c0,children:[k("img",{src:e}),k("canvas",{ref:o,width:u,height:f}),k("canvas",{ref:s,width:u,height:f,onMouseDown:p,onMouseUp:v,onMouseMove:h=>{const{nativeEvent:{offsetX:g,offsetY:y}}=h;w(g,y,t,n,r),a&&S(g,y,t,n,r)}})]})}var Gc="_2yyo4x2",d0="_2yyo4x1",p0="_2yyo4x0";function h0(){const e=E.exports.useRef(null),[t,n]=E.exports.useState("20"),[r,i]=E.exports.useState("round"),[o,s]=E.exports.useState("#fff"),[a,l]=E.exports.useState(!1),u=F(S=>S.getValueForRequestKey("init_image"));return L("div",{className:p0,children:[k(f0,{imageData:u,brushSize:t,brushShape:r,brushColor:o,isErasing:a}),L("div",{className:d0,children:[L("div",{className:Gc,children:[k("button",{onClick:()=>{l(!1)},children:"Mask"}),k("button",{onClick:()=>{l(!0)},children:"Erase"}),k("button",{disabled:!0,onClick:()=>{console.log("fill mask!!",e)},children:"Fill"}),k("button",{disabled:!0,onClick:()=>{console.log("clear all")},children:"Clear"}),L("label",{children:["Brush Size",k("input",{type:"range",min:"1",max:"100",value:t,onChange:S=>{n(S.target.value)}})]})]}),L("div",{className:Gc,children:[k("button",{onClick:()=>{i("round")},children:"Cirle Brush"}),k("button",{onClick:()=>{i("square")},children:"Square Brush"}),k("button",{onClick:()=>{s("#000")},children:"Dark Brush"}),k("button",{onClick:()=>{s("#fff")},children:"Light Brush"})]})]})]})}var g0="cjcdm20",m0="cjcdm21";var v0="_1how28i0",y0="_1how28i1";var S0="_1rn4m8a4",w0="_1rn4m8a2",k0="_1rn4m8a3",O0="_1rn4m8a0",x0="_1rn4m8a1",P0="_1rn4m8a5";function _0(e){const{t}=tn(),n=E.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=p=>{p.target!=null&&o("init_image",p.target.result)},d.readAsDataURL(f)}},l=F(c=>c.toggleInpainting),u=()=>{o("init_image",void 0),i&&l()};return L("div",{className:O0,children:[L("div",{children:[k("label",{className:x0,children:k("b",{children:t("home.initial-img-txt")})}),k("input",{ref:n,className:w0,name:"init_image",type:"file",onChange:a}),k("button",{className:k0,onClick:s,children:t("home.initial-img-btn")})]}),k("div",{className:S0,children:r!==void 0&&k(yn,{children:L("div",{children:[k("img",{src:r,width:"100",height:"100"}),k("button",{className:P0,onClick:u,children:"X"})]})})})]})}function C0(){const e=F(t=>t.selectedTags());return L("div",{className:"selected-tags",children:[k("p",{children:"Active Tags"}),k("ul",{children:e.map(t=>k("li",{children:k(ah,{name:t})},t))})]})}const Mn=Gl((e,t)=>({images:[],completedImageIds:[],addNewImage:(n,r,i=!1)=>{e(ie(o=>{let{seed:s}=r;i&&(s=Xr()),o.images.push({id:n,options:{...r,seed:s}})}))},hasQueuedImages:()=>t().images.length>0,firstInQueue:()=>{let n=t().images[0];return n=n!==void 0?n:{},n},removeFirstInQueue:()=>{e(ie(n=>{const r=n.images.shift();n.completedImageIds.push(r.id)}))},clearCachedIds:()=>{e(ie(n=>{n.completedImageIds=[]}))}}));let _i;const E0=new Uint8Array(16);function R0(){if(!_i&&(_i=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!_i))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return _i(E0)}const ae=[];for(let e=0;e<256;++e)ae.push((e+256).toString(16).slice(1));function N0(e,t=0){return(ae[e[t+0]]+ae[e[t+1]]+ae[e[t+2]]+ae[e[t+3]]+"-"+ae[e[t+4]]+ae[e[t+5]]+"-"+ae[e[t+6]]+ae[e[t+7]]+"-"+ae[e[t+8]]+ae[e[t+9]]+"-"+ae[e[t+10]]+ae[e[t+11]]+ae[e[t+12]]+ae[e[t+13]]+ae[e[t+14]]+ae[e[t+15]]).toLowerCase()}const I0=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Yc={randomUUID:I0};function L0(e,t,n){if(Yc.randomUUID&&!t&&!e)return Yc.randomUUID();e=e||{};const r=e.random||(e.rng||R0)();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 N0(r)}var b0="_1hnlbmt0";function F0(){const{t:e}=tn(),t=F(l=>l.parallelCount),n=F(l=>l.builtRequest),r=Mn(l=>l.addNewImage),i=Mn(l=>l.hasQueuedImages()),o=F(l=>l.isRandomSeed()),s=F(l=>l.setRequestOptions);return k("button",{className:b0,onClick:()=>{o&&s("seed",Xr());const l=n(),u=[];let{num_outputs:c}=l;if(t>c)u.push(c);else for(;c>=1;)c-=t,c<=0?u.push(t):u.push(Math.abs(c));u.forEach((f,d)=>{let p=l.seed;if(d!==0){debugger;p=Xr()}r(L0(),{...l,num_outputs:f,seed:p})})},disabled:i,children:e("home.make-img-btn")})}function D0(){const{t:e}=tn(),t=F(i=>i.getValueForRequestKey("prompt")),n=F(i=>i.setRequestOptions),r=i=>{n("prompt",i.target.value)};return L("div",{className:v0,children:[L("div",{className:y0,children:[k("p",{children:e("home.editor-title")}),k("textarea",{value:t,onChange:r})]}),k(F0,{}),k(_0,{}),k(C0,{})]})}function j0(){const e=F(t=>t.isInpainting);return L(yn,{children:[L("div",{className:g0,children:[k(D0,{}),k(n0,{}),k(u0,{})]}),e&&k("div",{className:m0,children:k(h0,{})})]})}const T0=`${Sn}/ding.mp3`,lh=Of.forwardRef((e,t)=>k("audio",{ref:t,style:{display:"none"},children:k("source",{src:T0,type:"audio/mp3"})}));lh.displayName="AudioDing";var M0="_1yvg52n0",A0="_1yvg52n1";function U0({imageData:e,metadata:t,className:n}){return k("div",{className:[M0,n].join(" "),children:k("img",{className:A0,src:e,alt:t.prompt})})}function z0({isLoading:e,image:t}){const{info:n,data:r}=t!=null?t:{},i=F(l=>l.setRequestOptions),o=()=>{const{prompt:l,seed:u,num_inference_steps:c,guidance_scale:f,use_face_correction:d,use_upscale:p,width:v,height:S}=n;let w=l.replace(/[^a-zA-Z0-9]/g,"_");w=w.substring(0,100);let m=`${w}_Seed-${u}_Steps-${c}_Guidance-${f}`;return typeof d=="string"&&(m+=`_FaceCorrection-${d}`),typeof p=="string"&&(m+=`_Upscale-${p}`),m+=`_${v}x${S}`,m+=".png",m},s=()=>{const l=document.createElement("a");l.download=o(),l.href=r,l.click()},a=()=>{i("init_image",r)};return k("div",{className:"current-display",children:e?k("h4",{className:"loading",children:"Loading..."}):t!==null&&L("div",{children:[L("p",{children:[" ",n==null?void 0:n.prompt]}),k(U0,{imageData:r,metadata:n}),L("div",{children:[k("button",{onClick:s,children:"Save"}),k("button",{onClick:a,children:"Use as Input"})]})]})||k("h4",{className:"no-image",children:"Try Making a new image!"})})}var $0="fsj92y3",B0="fsj92y1",Q0="fsj92y0",V0="fsj92y2";function H0({images:e,setCurrentDisplay:t,removeImages:n}){const r=i=>{const o=e[i];t(o)};return L("div",{className:Q0,children:[e!=null&&e.length>0&&k("button",{className:$0,onClick:()=>{n()},children:"REMOVE"}),k("ul",{className:B0,children:e==null?void 0:e.map((i,o)=>i===void 0?(console.warn(`image ${o} is undefined`),null):k("li",{children:k("button",{className:V0,onClick:()=>{r(o)},children:k("img",{src:i.data,alt:i.info.prompt})})},i.id))})]})}var K0="_688lcr1",q0="_688lcr0",W0="_688lcr2";const G0="_batch";function Y0(){const e=E.exports.useRef(null),t=F(g=>g.isSoundEnabled()),{id:n,options:r}=Mn(g=>g.firstInQueue()),i=Mn(g=>g.removeFirstInQueue),[o,s]=E.exports.useState(null),[a,l]=E.exports.useState(!1),[u,c]=E.exports.useState(!0),{status:f,data:d}=Wr([Ns,n],async()=>await uy(r),{enabled:a});E.exports.useEffect(()=>{l(n!==void 0)},[n]),E.exports.useEffect(()=>{c(!!(a&&f==="loading"))},[a,f]),E.exports.useEffect(()=>{var g;f==="success"&&d.status==="succeeded"&&(t&&((g=e.current)==null||g.play()),i())},[f,d,i,e,t]);const p=Tp(),[v,S]=E.exports.useState([]),w=Mn(g=>g.completedImageIds),m=Mn(g=>g.clearCachedIds);return E.exports.useEffect(()=>{const g=w.map(y=>p.getQueryData([Ns,y]));if(g.length>0){const y=g.map((P,_)=>{if(P!==void 0)return P.output.map((x,O)=>({id:`${w[O]}${G0}-${x.seed}-${O}`,data:x.data,info:{...P.request,seed:x.seed}}))}).flat().reverse().filter(P=>P!==void 0);S(y),y.length>0?s(y[0]):s(null)}else S([]),s(null)},[S,s,p,w]),L("div",{className:q0,children:[k(lh,{ref:e}),k("div",{className:K0,children:k(z0,{isLoading:u,image:o})}),k("div",{className:W0,children:k(H0,{removeImages:()=>{w.forEach(g=>{p.removeQueries([Ns,g])}),m()},images:v,setCurrentDisplay:s})})]})}var J0="_97t2g71",X0="_97t2g70";function Z0(){return L("div",{className:X0,children:[L("p",{children:["If you found this project useful and want to help keep it alive, please"," ",k("a",{href:"https://ko-fi.com/cmdr2_stablediffusion_ui",target:"_blank",rel:"noreferrer",children:k("img",{src:`${Sn}/kofi.png`,className:J0})})," ","to help cover the cost of development and maintenance! Thank you for your support!"]}),L("p",{children:["Please feel free to join the"," ",k("a",{href:"https://discord.com/invite/u9yhsFmEkB",target:"_blank",rel:"noreferrer",children:"discord community"})," ","or"," ",k("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."]}),L("div",{id:"footer-legal",children:[L("p",{children:[k("b",{children:"Disclaimer:"})," The authors of this project are not responsible for any content generated using this interface."]}),L("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, ",k("br",{}),"spread misinformation and target vulnerable groups. For the full list of restrictions please read"," ",k("a",{href:"https://github.com/cmdr2/stable-diffusion-ui/blob/main/LICENSE",target:"_blank",rel:"noreferrer",children:"the license"}),"."]}),k("p",{children:"By using this software, you consent to the terms and conditions of the license."})]})]})}function e1({className:e}){const t=F(a=>a.setRequestOptions),{status:n,data:r}=Wr(["SaveDir"],sy),{status:i,data:o}=Wr(["modifications"],oy),s=F(a=>a.setAllModifiers);return E.exports.useEffect(()=>{n==="success"&&t("save_to_disk_path",r)},[t,n,r]),E.exports.useEffect(()=>{i==="success"?s(o):i==="error"&&s(cy)},[t,i,o]),L("div",{className:[Xv,e].join(" "),children:[k("header",{className:ny,children:k(Gy,{})}),k("nav",{className:Zv,children:k(j0,{})}),k("main",{className:ey,children:k(Y0,{})}),k("footer",{className:ty,children:k(Z0,{})})]})}function t1({className:e}){return k("div",{children:k("h1",{children:"Settings"})})}var n1="_4vfmtj1z";function Wt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $a(e,t){return $a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$a(e,t)}function qo(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&&$a(e,t)}function oi(e,t){if(t&&(qt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wt(e)}function pt(e){return pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pt(e)}function r1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function i1(e){return rh(e)||r1(e)||ih(e)||oh()}function Jc(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 Xc(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.init(t,n)}return rt(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||o1,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 ef(e,t,n){var r=Yl(e,t,Object),i=r.obj,o=r.k;i[o]=n}function l1(e,t,n,r){var i=Yl(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 xo(e,t){var n=Yl(e,t),r=n.obj,i=n.k;if(!!r)return r[i]}function tf(e,t,n){var r=xo(e,n);return r!==void 0?r:xo(t,n)}function uh(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]):uh(e[r],t[r],n):e[r]=t[r]);return e}function Pn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var u1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function c1(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return u1[t]}):e}var Wo=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,f1=[" ",",","?","!",";"];function d1(e,t,n){t=t||"",n=n||"";var r=f1.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 nf(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 Ci(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 ch(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?ch(l,u,n):void 0}i=i[r[o]]}return i}}var g1=function(e){qo(n,e);var t=p1(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return nt(this,n),i=t.call(this),Wo&&Jt.call(Wt(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 rt(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=xo(this.data,c);return f||!u||typeof s!="string"?f:ch(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),ef(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=xo(this.data,c)||{};a?uh(f,s,l):f=Ci(Ci({},f),s),ef(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"?Ci(Ci({},{}),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}(Jt),fh={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 rf(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 ge(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 of={},sf=function(e){qo(n,e);var t=m1(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return nt(this,n),i=t.call(this),Wo&&Jt.call(Wt(i)),a1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Wt(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=ut.create("translator"),i}return rt(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&&!d1(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(qt(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,p=d[d.length-1],v=o.lng||this.language,S=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(S){var w=o.nsSeparator||this.options.nsSeparator;return l?(m.res="".concat(p).concat(w).concat(f),m):"".concat(p).concat(w).concat(f)}return l?(m.res=f,m):f}var m=this.resolve(i,o),h=m&&m.res,g=m&&m.usedKey||f,y=m&&m.exactUsedKey||f,P=Object.prototype.toString.apply(h),_=["[object Number]","[object Function]","[object RegExp]"],x=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,R=typeof h!="string"&&typeof h!="boolean"&&typeof h!="number";if(O&&h&&R&&_.indexOf(P)<0&&!(typeof x=="string"&&P==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,h,ge(ge({},o),{},{ns:d})):"key '".concat(f," (").concat(this.language,")' returned an object instead of string.");return l?(m.res=b,m):b}if(u){var M=P==="[object Array]",ne=M?[]:{},Re=M?y:g;for(var Oe in h)if(Object.prototype.hasOwnProperty.call(h,Oe)){var sr="".concat(Re).concat(u).concat(Oe);ne[Oe]=this.translate(sr,ge(ge({},o),{joinArrays:!1,ns:d})),ne[Oe]===sr&&(ne[Oe]=h[Oe])}h=ne}}else if(O&&typeof x=="string"&&P==="[object Array]")h=h.join(x),h&&(h=this.extendTranslation(h,i,o,s));else{var Nt=!1,gt=!1,N=o.count!==void 0&&typeof o.count!="string",D=n.hasDefaultValue(o),j=N?this.pluralResolver.getSuffix(v,o.count,o):"",$=o["defaultValue".concat(j)]||o.defaultValue;!this.isValidLookup(h)&&D&&(Nt=!0,h=$),this.isValidLookup(h)||(gt=!0,h=f);var J=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,wn=J&>?void 0:h,Ne=D&&$!==h&&this.options.updateMissing;if(gt||Nt||Ne){if(this.logger.log(Ne?"updateKey":"missingKey",v,p,f,Ne?$:h),u){var kn=this.resolve(f,ge(ge({},o),{},{keySeparator:!1}));kn&&kn.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 Ie=[],mt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&mt&&mt[0])for(var Go=0;Go1&&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 p=o.extractFromKey(d,s),v=p.key;l=v;var S=p.namespaces;o.options.fallbackNS&&(S=S.concat(o.options.fallbackNS));var w=s.count!==void 0&&typeof s.count!="string",m=w&&!s.ordinal&&s.count===0&&o.pluralResolver.shouldUseIntlApi(),h=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);S.forEach(function(y){o.isValidLookup(a)||(f=y,!of["".concat(g[0],"-").concat(y)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(f)&&(of["".concat(g[0],"-").concat(y)]=!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(P){if(!o.isValidLookup(a)){c=P;var _=[v];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(_,v,P,y,s);else{var x;w&&(x=o.pluralResolver.getSuffix(P,s.count,s));var O="".concat(o.options.pluralSeparator,"zero");if(w&&(_.push(v+x),m&&_.push(v+O)),h){var R="".concat(v).concat(o.options.contextSeparator).concat(s.context);_.push(R),w&&(_.push(R+x),m&&_.push(R+O))}}for(var b;b=_.pop();)o.isValidLookup(a)||(u=b,a=o.getResource(P,y,b,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}(Jt);function bs(e){return e.charAt(0).toUpperCase()+e.slice(1)}var y1=function(){function e(t){nt(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ut.create("languageUtils")}return rt(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]=bs(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]=bs(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=bs(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}(),S1=[{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}],w1={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)}},k1=["v1","v2","v3"],af={zero:0,one:1,two:2,few:3,many:4,other:5};function O1(){var e={};return S1.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:w1[t.fc]}})}),e}var x1=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.languageUtils=t,this.options=n,this.logger=ut.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=O1()}return rt(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 af[s]-af[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!k1.includes(this.options.compatibilityJSON)}}]),e}();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 We(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=ut.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return rt(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:c1,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Pn(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Pn(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?Pn(r.nestingPrefix):r.nestingPrefixEscaped||Pn("$t("),this.nestingSuffix=r.nestingSuffix?Pn(r.nestingSuffix):r.nestingSuffixEscaped||Pn(")"),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(w){return w.replace(/\$/g,"$$$$")}var d=function(m){if(m.indexOf(s.formatSeparator)<0){var h=tf(r,c,m);return s.alwaysFormat?s.format(h,void 0,i,We(We(We({},o),r),{},{interpolationkey:m})):h}var g=m.split(s.formatSeparator),y=g.shift().trim(),P=g.join(s.formatSeparator).trim();return s.format(tf(r,c,y),P,i,We(We(We({},o),r),{},{interpolationkey:y}))};this.resetRegExp();var p=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,v=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,S=[{regex:this.regexpUnescape,safeValue:function(m){return f(m)}},{regex:this.regexp,safeValue:function(m){return s.escapeValue?f(s.escape(m)):f(m)}}];return S.forEach(function(w){for(u=0;a=w.regex.exec(n);){var m=a[1].trim();if(l=d(m),l===void 0)if(typeof p=="function"){var h=p(n,a,o);l=typeof h=="string"?h:""}else if(o&&o.hasOwnProperty(m))l="";else if(v){l=a[0];continue}else s.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(n)),l="";else typeof l!="string"&&!s.useRawValueToEscape&&(l=Zc(l));var g=w.safeValue(l);if(n=n.replace(a[0],g),v?(w.regex.lastIndex+=l.length,w.regex.lastIndex-=a[0].length):w.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=We({},o);l.applyPostProcessor=!1,delete l.defaultValue;function u(p,v){var S=this.nestingOptionsSeparator;if(p.indexOf(S)<0)return p;var w=p.split(new RegExp("".concat(S,"[ ]*{"))),m="{".concat(w[1]);p=w[0],m=this.interpolate(m,l);var h=m.match(/'/g),g=m.match(/"/g);(h&&h.length%2===0&&!g||g.length%2!==0)&&(m=m.replace(/'/g,'"'));try{l=JSON.parse(m),v&&(l=We(We({},v),l))}catch(y){return this.logger.warn("failed parsing options string in nesting for key ".concat(p),y),"".concat(p).concat(S).concat(m)}return delete l.defaultValue,p}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(p){return p.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=Zc(a)),a||(this.logger.warn("missed to resolve ".concat(s[1]," for nesting ").concat(n)),a=""),f&&(a=c.reduce(function(p,v){return i.format(p,v,o.lng,We(We({},o),{},{interpolationkey:s[1].trim()}))},a.trim())),n=n.replace(s[0],a),this.regexp.lastIndex=0}return n}}]),e}();function uf(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 Lt(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=i1(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 C1=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=ut.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,Lt(Lt({},o),{},{style:"currency"})).format(r)},datetime:function(r,i,o){return new Intl.DateTimeFormat(i,Lt({},o)).format(r)},relativetime:function(r,i,o){return new Intl.RelativeTimeFormat(i,Lt({},o)).format(r,o.range||"day")},list:function(r,i,o){return new Intl.ListFormat(i,Lt({},o)).format(r)}},this.init(t)}return rt(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=_1(c),d=f.formatName,p=f.formatOptions;if(s.formats[d]){var v=u;try{var S=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},w=S.locale||S.lng||o.locale||o.lng||i;v=s.formats[d](u,w,Lt(Lt(Lt({},p),o),S))}catch(m){s.logger.warn(m)}return v}else s.logger.warn("there was no format function for ".concat(d));return u},n);return l}}]),e}();function cf(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 ff(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 N1(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var I1=function(e){qo(n,e);var t=E1(n);function n(r,i,o){var s,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return nt(this,n),s=t.call(this),Wo&&Jt.call(Wt(s)),s.backend=r,s.store=i,s.services=o,s.languageUtils=o.languageUtils,s.options=a,s.logger=ut.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 rt(n,[{key:"queueLoad",value:function(i,o,s,a){var l=this,u={},c={},f={},d={};return i.forEach(function(p){var v=!0;o.forEach(function(S){var w="".concat(p,"|").concat(S);!s.reload&&l.store.hasResourceBundle(p,S)?l.state[w]=2:l.state[w]<0||(l.state[w]===1?c[w]===void 0&&(c[w]=!0):(l.state[w]=1,v=!1,c[w]===void 0&&(c[w]=!0),u[w]===void 0&&(u[w]=!0),d[S]===void 0&&(d[S]=!0)))}),v||(f[p]=!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){l1(f.loaded,[l],u),N1(f,i),o&&f.errors.push(o),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(function(d){c[d]||(c[d]={});var p=f.loaded[d];p.length&&p.forEach(function(v){c[d][v]===void 0&&(c[d][v]=!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 p=a.waitingReads.shift();a.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.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,ff(ff({},u),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],o,s,a))}}]),n}(Jt);function L1(){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(qt(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),qt(t[2])==="object"||qt(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 df(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 pf(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 ot(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 Ei(){}function D1(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var Po=function(e){qo(n,e);var t=b1(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(nt(this,n),r=t.call(this),Wo&&Jt.call(Wt(r)),r.options=df(i),r.services={},r.logger=ut,r.modules={external:[]},D1(Wt(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),oi(r,Wt(r));setTimeout(function(){r.init(i,o)},0)}return r}return rt(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=L1();this.options=ot(ot(ot({},a),this.options),df(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=ot(ot({},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(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?ut.init(l(this.modules.logger),this.options):ut.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=C1);var c=new y1(this.options);this.store=new g1(this.options.resources,this.options);var f=this.services;f.logger=ut,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new x1(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 P1(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new I1(l(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var h=arguments.length,g=new Array(h>1?h-1:0),y=1;y1?h-1:0),y=1;y0&&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 p=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];p.forEach(function(m){i[m]=function(){var h;return(h=i.store)[m].apply(h,arguments)}});var v=["addResource","addResources","addResourceBundle","removeResourceBundle"];v.forEach(function(m){i[m]=function(){var h;return(h=i.store)[m].apply(h,arguments),i}});var S=gr(),w=function(){var h=function(y,P){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),S.resolve(P),s(y,P)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return h(null,i.t.bind(i));i.changeLanguage(i.options.lng,h)};return this.options.resources||!this.options.initImmediate?w():setTimeout(w,0),S}},{key:"loadResources",value:function(i){var o=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ei,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(p){if(!!p){var v=o.services.languageUtils.toResolveHierarchy(p);v.forEach(function(S){u.indexOf(S)<0&&u.push(S)})}};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=gr();return i||(i=this.languages),o||(o=this.options.ns),s||(s=Ei),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"&&fh.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=gr();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(qt(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=gr();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=gr();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]:Ei,a=ot(ot(ot({},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=ot({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new sf(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 Po(e,t)});var ke=Po.createInstance();ke.createInstance=Po.createInstance;ke.createInstance;ke.init;ke.loadResources;ke.reloadResources;ke.use;ke.changeLanguage;ke.getFixedT;ke.t;ke.exists;ke.setDefaultNamespace;ke.hasLoadedNamespace;ke.loadNamespaces;ke.loadLanguages;const j1="Stable Diffusion UI",T1="",M1={home:"Home",history:"History",community:"Community",settings:"Settings"},A1={"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"},U1={"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"},z1={txt:"Image Modifiers (art styles, tags etc)"},$1={"use-btn":"Use Image","use-btn2":"Use Image and Tags"},B1={fave:"Favorites Only",search:"Search"},Q1={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"},V1=`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.
@@ -107,4 +107,4 @@ By using this software, you consent to the terms and conditions of the license.
`,nS={title:K1,description:q1,navbar:W1,"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:G1,"in-paint":{txt:"In-Painting (select the area which the AI will paint into)",clear:"Clear"},settings:Y1,tags:J1,"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:X1,history:Z1,"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:eS,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:tS},rS={en:{translation:H1},es:{translation:nS}};ke.use($y).init({lng:"en",interpolation:{escapeValue:!1},resources:rS});const iS=new Tv;function oS(){const e=n1;return k(Mv,{location:iS,routes:[{path:"/",element:k(e1,{className:e})},{path:"/settings",element:k(t1,{className:e})}]})}const sS=new iv({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:1/0,cacheTime:1/0}}});kv();Fs.createRoot(document.getElementById("root")).render(k(Of.StrictMode,{children:L(av,{client:sS,children:[k(oS,{}),k(hv,{initialIsOpen:!0})]})}));
+Please restart the program after changing this.`,save:"SAVE"},storage:eS,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:tS},rS={en:{translation:H1},es:{translation:nS}};ke.use($y).init({lng:"en",interpolation:{escapeValue:!1},resources:rS}).then(()=>{console.log("i18n initialized")}).catch(e=>{console.error("i18n initialization failed",e)}).finally(()=>{console.log("i18n initialization finished")});const iS=new Tv;function oS(){const e=n1;return k(Mv,{location:iS,routes:[{path:"/",element:k(e1,{className:e})},{path:"/settings",element:k(t1,{className:e})}]})}const sS=new iv({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:1/0,cacheTime:1/0}}});kv();Fs.createRoot(document.getElementById("root")).render(k(Of.StrictMode,{children:L(av,{client:sS,children:[k(oS,{}),k(hv,{initialIsOpen:!0})]})}));