InvokeAI/invokeai/frontend/web/dist/assets/MantineProvider-d7f01775.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

2 lines
22 KiB
JavaScript
Raw Normal View History

2023-07-06 01:09:13 +00:00
import{q as u,fk as fe,fl as ce,a7 as h,f6 as z,fe as le}from"./index-581af3d4.js";function ue(){if(console&&console.warn){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];typeof r[0]=="string"&&(r[0]=`react-i18next:: ${r[0]}`),console.warn(...r)}}const W={};function R(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];typeof r[0]=="string"&&W[r[0]]||(typeof r[0]=="string"&&(W[r[0]]=new Date),ue(...r))}const re=(e,r)=>()=>{if(e.isInitialized)r();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),r()};e.on("initialized",n)}};function G(e,r,n){e.loadNamespaces(r,re(e,n))}function U(e,r,n,o){typeof n=="string"&&(n=[n]),n.forEach(a=>{e.options.ns.indexOf(a)<0&&e.options.ns.push(a)}),e.loadLanguages(r,re(e,o))}function de(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=r.languages[0],a=r.options?r.options.fallbackLng:!1,t=r.languages[r.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const i=(s,f)=>{const c=r.services.backendConnector.state[`${s}|${f}`];return c===-1||c===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e)?!1:!!(r.hasResourceBundle(o,e)||!r.services.backendConnector.backend||r.options.resources&&!r.options.partialBundledLanguages||i(o,e)&&(!a||i(t,e)))}function ge(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!r.languages||!r.languages.length?(R("i18n.languages were undefined or empty",r.languages),!0):r.options.ignoreJSONStructure!==void 0?r.hasLoadedNamespace(e,{lng:n.lng,precheck:(a,t)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!t(a.isLanguageChangingTo,e))return!1}}):de(e,r,n)}const pe=u.createContext();class be{constructor(){this.usedNamespaces={}}addUsedNamespaces(r){r.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const me=(e,r)=>{const n=u.useRef();return u.useEffect(()=>{n.current=r?n.current:e},[e,r]),n.current};function Sr(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=r,{i18n:o,defaultNS:a}=u.useContext(pe)||{},t=n||o||ce();if(t&&!t.reportNamespaces&&(t.reportNamespaces=new be),!t){R("You will need to pass in an i18next instance by using initReactI18next");const d=(S,p)=>typeof p=="string"?p:p&&typeof p=="object"&&typeof p.defaultValue=="string"?p.defaultValue:Array.isArray(S)?S[S.length-1]:S,y=[d,{},!1];return y.t=d,y.i18n={},y.ready=!1,y}t.options.react&&t.options.react.wait!==void 0&&R("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const i={...fe(),...t.options.react,...r},{useSuspense:s,keyPrefix:f}=i;let c=e||a||t.options&&t.options.defaultNS;c=typeof c=="string"?[c]:c||["translation"],t.reportNamespaces.addUsedNamespaces&&t.reportNamespaces.addUsedNamespaces(c);const g=(t.isInitialized||t.initializedStoreOnce)&&c.every(d=>ge(d,t,i));function m(){return t.getFixedT(r.lng||null,i.nsMode==="fallback"?c:c[0],f)}const[H,w]=u.useState(m);let $=c.join();r.lng&&($=`${r.lng}${$}`);const A=me($),_=u.useRef(!0);u.useEffect(()=>{const{bindI18n:d,bindI18nStore:y}=i;_.current=!0,!g&&!s&&(r.lng?U(t,r.lng,c,()=>{_.current&&w(m)}):G(t,c,()=>{_.current&&w(m)})),g&&A&&A!==$&&_.current&&w(m);function S(){_.current&&w(m)}return d&&t&&t.on(d,S),y&&t&&t.store.on(y,S),()=>{_.current=!1,d&&t&&d.split(" ").forEach(p=>t.off(p,S)),y&&t&&y.split(" ").forEach(p=>t.store.off(p,S))}},[t,$]);const L=u.useRef(!0);u.useEffect(()=>{_.current&&!L.current&&w(m),L.current=!1},[t,f]);const P=[H,t,g];if(P.t=H,P.i18n=t,P.ready=g,g||!g&&!s)return P;throw new Promise(d=>{r.lng?U(t,r.lng,c,()=>d()):G(t,c,()=>d())})}const ye={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9"