mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
2 lines
22 KiB
JavaScript
2 lines
22 KiB
JavaScript
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","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function Se(e){return()=>({fontFamily:e.fontFamily||"sans-serif"})}var he=Object.defineProperty,D=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,V=(e,r,n)=>r in e?he(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,X=(e,r)=>{for(var n in r||(r={}))ve.call(r,n)&&V(e,n,r[n]);if(D)for(var n of D(r))_e.call(r,n)&&V(e,n,r[n]);return e};function ke(e){return r=>({WebkitTapHighlightColor:"transparent",[r||"&:focus"]:X({},e.focusRing==="always"||e.focusRing==="auto"?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e)),[r?r.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)"]:X({},e.focusRing==="auto"||e.focusRing==="never"?e.focusRingStyles.resetStyles(e):null)})}function E(e){return r=>typeof e.primaryShade=="number"?e.primaryShade:e.primaryShade[r||e.colorScheme]}function F(e){const r=E(e);return(n,o,a=!0,t=!0)=>{if(typeof n=="string"&&n.includes(".")){const[s,f]=n.split("."),c=parseInt(f,10);if(s in e.colors&&c>=0&&c<10)return e.colors[s][typeof o=="number"&&!t?o:c]}const i=typeof o=="number"?o:r();return n in e.colors?e.colors[n][i]:a?e.colors[e.primaryColor][i]:n}}function ne(e){let r="";for(let n=1;n<e.length-1;n+=1)r+=`${e[n]} ${n/(e.length-1)*100}%, `;return`${e[0]} 0%, ${r}${e[e.length-1]} 100%`}function we(e,...r){return`linear-gradient(${e}deg, ${ne(r)})`}function $e(...e){return`radial-gradient(circle, ${ne(e)})`}function te(e){const r=F(e),n=E(e);return o=>{const a={from:(o==null?void 0:o.from)||e.defaultGradient.from,to:(o==null?void 0:o.to)||e.defaultGradient.to,deg:(o==null?void 0:o.deg)||e.defaultGradient.deg};return`linear-gradient(${a.deg}deg, ${r(a.from,n(),!1)} 0%, ${r(a.to,n(),!1)} 100%)`}}function oe(e){return r=>{if(typeof r=="number")return`${r/16}${e}`;if(typeof r=="string"){const n=r.replace("px","");if(!Number.isNaN(Number(n)))return`${Number(n)/16}${e}`}return r}}const v=oe("rem"),j=oe("em");function ae({size:e,sizes:r,units:n}){return e in r?r[e]:typeof e=="number"?n==="em"?j(e):v(e):e||r.md}function O(e){return typeof e=="number"?e:typeof e=="string"&&e.includes("rem")?Number(e.replace("rem",""))*16:typeof e=="string"&&e.includes("em")?Number(e.replace("em",""))*16:Number(e)}function Pe(e){return r=>`@media (min-width: ${j(O(ae({size:r,sizes:e.breakpoints})))})`}function Ce(e){return r=>`@media (max-width: ${j(O(ae({size:r,sizes:e.breakpoints}))-1)})`}function xe(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}function Ee(e){let r=e.replace("#","");if(r.length===3){const i=r.split("");r=[i[0],i[0],i[1],i[1],i[2],i[2]].join("")}const n=parseInt(r,16),o=n>>16&255,a=n>>8&255,t=n&255;return{r:o,g:a,b:t,a:1}}function Oe(e){const[r,n,o,a]=e.replace(/[^0-9,.]/g,"").split(",").map(Number);return{r,g:n,b:o,a:a||1}}function T(e){return xe(e)?Ee(e):e.startsWith("rgb")?Oe(e):{r:0,g:0,b:0,a:1}}function k(e,r){if(typeof e!="string"||r>1||r<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;const{r:n,g:o,b:a}=T(e);return`rgba(${n}, ${o}, ${a}, ${r})`}function Ne(e=0){return{position:"absolute",top:v(e),right:v(e),left:v(e),bottom:v(e)}}function ze(e,r){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:o,b:a,a:t}=T(e),i=1-r,s=f=>Math.round(f*i);return`rgba(${s(n)}, ${s(o)}, ${s(a)}, ${t})`}function je(e,r){if(typeof e=="string"&&e.startsWith("var(--"))return e;const{r:n,g:o,b:a,a:t}=T(e),i=s=>Math.round(s+(255-s)*r);return`rgba(${i(n)}, ${i(o)}, ${i(a)}, ${t})`}function Ie(e){return r=>{if(typeof r=="number")return v(r);const n=typeof e.defaultRadius=="number"?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[r]||r||n}}function Re(e,r){if(typeof e=="string"&&e.includes(".")){const[n,o]=e.split("."),a=parseInt(o,10);if(n in r.colors&&a>=0&&a<10)return{isSplittedColor:!0,key:n,shade:a}}return{isSplittedColor:!1}}function Fe(e){const r=F(e),n=E(e),o=te(e);return({variant:a,color:t,gradient:i,primaryFallback:s})=>{const f=Re(t,e);switch(a){case"light":return{border:"transparent",background:k(r(t,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1),color:t==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:r(t,e.colorScheme==="dark"?2:n("light")),hover:k(r(t,e.colorScheme==="dark"?7:1,s,!1),e.colorScheme==="dark"?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:t==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:r(t,e.colorScheme==="dark"?2:n("light")),hover:k(r(t,e.colorScheme==="dark"?8:0,s,!1),e.colorScheme==="dark"?.2:1)};case"outline":return{border:r(t,e.colorScheme==="dark"?5:n("light")),background:"transparent",color:r(t,e.colorScheme==="dark"?5:n("light")),hover:e.colorScheme==="dark"?k(r(t,5,s,!1),.05):k(r(t,0,s,!1),.35)};case"default":return{border:e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[4],background:e.colorScheme==="dark"?e.colors.dark[6]:e.white,color:e.colorScheme==="dark"?e.white:e.black,hover:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:r(t,n()),hover:null};case"transparent":return{border:"transparent",color:t==="dark"?e.colorScheme==="dark"?e.colors.dark[0]:e.colors.dark[9]:r(t,e.colorScheme==="dark"?2:n("light")),background:"transparent",hover:null};case"gradient":return{background:o(i),color:e.white,border:"transparent",hover:null};default:{const c=n(),g=f.isSplittedColor?f.shade:c,m=f.isSplittedColor?f.key:t;return{border:"transparent",background:r(m,g,s),color:e.white,hover:r(m,g===9?8:g+1)}}}}}function Te(e){return r=>{const n=E(e)(r);return e.colors[e.primaryColor][n]}}function Me(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}}function He(e){return()=>({userSelect:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]})}function Ae(e){return()=>e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}const l={fontStyles:Se,themeColor:F,focusStyles:ke,linearGradient:we,radialGradient:$e,smallerThan:Ce,largerThan:Pe,rgba:k,cover:Ne,darken:ze,lighten:je,radius:Ie,variant:Fe,primaryShade:E,hover:Me,gradient:te,primaryColor:Te,placeholderStyles:He,dimmed:Ae};var Le=Object.defineProperty,We=Object.defineProperties,Ge=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,Y=(e,r,n)=>r in e?Le(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Ve=(e,r)=>{for(var n in r||(r={}))Ue.call(r,n)&&Y(e,n,r[n]);if(J)for(var n of J(r))De.call(r,n)&&Y(e,n,r[n]);return e},Xe=(e,r)=>We(e,Ge(r));function ie(e){return Xe(Ve({},e),{fn:{fontStyles:l.fontStyles(e),themeColor:l.themeColor(e),focusStyles:l.focusStyles(e),largerThan:l.largerThan(e),smallerThan:l.smallerThan(e),radialGradient:l.radialGradient,linearGradient:l.linearGradient,gradient:l.gradient(e),rgba:l.rgba,cover:l.cover,lighten:l.lighten,darken:l.darken,primaryShade:l.primaryShade(e),radius:l.radius(e),variant:l.variant(e),hover:l.hover,primaryColor:l.primaryColor(e),placeholderStyles:l.placeholderStyles(e),dimmed:l.dimmed(e)}})}const Je={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:ye,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:e=>({outlineOffset:"0.125rem",outline:`0.125rem solid ${e.colors[e.primaryColor][e.colorScheme==="dark"?7:5]}`}),resetStyles:()=>({outline:"none"}),inputStyles:e=>({outline:"none",borderColor:e.colors[e.primaryColor][typeof e.primaryShade=="object"?e.primaryShade[e.colorScheme]:e.primaryShade]})}},M=ie(Je);var Ye=Object.defineProperty,qe=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,q=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,K=(e,r,n)=>r in e?Ye(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,Be=(e,r)=>{for(var n in r||(r={}))Qe.call(r,n)&&K(e,n,r[n]);if(q)for(var n of q(r))Ze.call(r,n)&&K(e,n,r[n]);return e},er=(e,r)=>qe(e,Ke(r));function rr({theme:e}){return h.createElement(z,{styles:{"*, *::before, *::after":{boxSizing:"border-box"},html:{colorScheme:e.colorScheme==="dark"?"dark":"light"},body:er(Be({},e.fn.fontStyles()),{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white,color:e.colorScheme==="dark"?e.colors.dark[0]:e.black,lineHeight:e.lineHeight,fontSize:e.fontSizes.md,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"})}})}function C(e,r,n,o=v){Object.keys(r).forEach(a=>{e[`--mantine-${n}-${a}`]=o(r[a])})}function nr({theme:e}){const r={"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-transition-timing-function":e.transitionTimingFunction,"--mantine-line-height":`${e.lineHeight}`,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":`${e.headings.fontWeight}`};C(r,e.shadows,"shadow"),C(r,e.fontSizes,"font-size"),C(r,e.radius,"radius"),C(r,e.spacing,"spacing"),C(r,e.breakpoints,"breakpoints",j),Object.keys(e.colors).forEach(o=>{e.colors[o].forEach((a,t)=>{r[`--mantine-color-${o}-${t}`]=a})});const n=e.headings.sizes;return Object.keys(n).forEach(o=>{r[`--mantine-${o}-font-size`]=n[o].fontSize,r[`--mantine-${o}-line-height`]=`${n[o].lineHeight}`}),h.createElement(z,{styles:{":root":r}})}var tr=Object.defineProperty,or=Object.defineProperties,ar=Object.getOwnPropertyDescriptors,Q=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,sr=Object.prototype.propertyIsEnumerable,Z=(e,r,n)=>r in e?tr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,b=(e,r)=>{for(var n in r||(r={}))ir.call(r,n)&&Z(e,n,r[n]);if(Q)for(var n of Q(r))sr.call(r,n)&&Z(e,n,r[n]);return e},I=(e,r)=>or(e,ar(r));function fr(e,r){var n;if(!r)return e;const o=Object.keys(e).reduce((a,t)=>{if(t==="headings"&&r.headings){const i=r.headings.sizes?Object.keys(e.headings.sizes).reduce((s,f)=>(s[f]=b(b({},e.headings.sizes[f]),r.headings.sizes[f]),s),{}):e.headings.sizes;return I(b({},a),{headings:I(b(b({},e.headings),r.headings),{sizes:i})})}if(t==="breakpoints"&&r.breakpoints){const i=b(b({},e.breakpoints),r.breakpoints);return I(b({},a),{breakpoints:Object.fromEntries(Object.entries(i).sort((s,f)=>O(s[1])-O(f[1])))})}return a[t]=typeof r[t]=="object"?b(b({},e[t]),r[t]):typeof r[t]=="number"||typeof r[t]=="boolean"||typeof r[t]=="function"?r[t]:r[t]||e[t],a},{});if(r!=null&&r.fontFamily&&!((n=r==null?void 0:r.headings)!=null&&n.fontFamily)&&(o.headings.fontFamily=r.fontFamily),!(o.primaryColor in o.colors))throw new Error("MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color");return o}function cr(e,r){return ie(fr(e,r))}function lr(e){return Object.keys(e).reduce((r,n)=>(e[n]!==void 0&&(r[n]=e[n]),r),{})}const ur={html:{fontFamily:"sans-serif",lineHeight:"1.15",textSizeAdjust:"100%"},body:{margin:0},"article, aside, footer, header, nav, section, figcaption, figure, main":{display:"block"},h1:{fontSize:"2em"},hr:{boxSizing:"content-box",height:0,overflow:"visible"},pre:{fontFamily:"monospace, monospace",fontSize:"1em"},a:{background:"transparent",textDecorationSkip:"objects"},"a:active, a:hover":{outlineWidth:0},"abbr[title]":{borderBottom:"none",textDecoration:"underline"},"b, strong":{fontWeight:"bolder"},"code, kbp, samp":{fontFamily:"monospace, monospace",fontSize:"1em"},dfn:{fontStyle:"italic"},mark:{backgroundColor:"#ff0",color:"#000"},small:{fontSize:"80%"},"sub, sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sup:{top:"-0.5em"},sub:{bottom:"-0.25em"},"audio, video":{display:"inline-block"},"audio:not([controls])":{display:"none",height:0},img:{borderStyle:"none",verticalAlign:"middle"},"svg:not(:root)":{overflow:"hidden"},"button, input, optgroup, select, textarea":{fontFamily:"sans-serif",fontSize:"100%",lineHeight:"1.15",margin:0},"button, input":{overflow:"visible"},"button, select":{textTransform:"none"},"button, [type=reset], [type=submit]":{WebkitAppearance:"button"},"button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner":{borderStyle:"none",padding:0},"button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring":{outline:`${v(1)} dotted ButtonText`},legend:{boxSizing:"border-box",color:"inherit",display:"table",maxWidth:"100%",padding:0,whiteSpace:"normal"},progress:{display:"inline-block",verticalAlign:"baseline"},textarea:{overflow:"auto"},"[type=checkbox], [type=radio]":{boxSizing:"border-box",padding:0},"[type=number]::-webkit-inner-spin-button, [type=number]::-webkit-outer-spin-button":{height:"auto"},"[type=search]":{appearance:"none"},"[type=search]::-webkit-search-cancel-button, [type=search]::-webkit-search-decoration":{appearance:"none"},"::-webkit-file-upload-button":{appearance:"button",font:"inherit"},"details, menu":{display:"block"},summary:{display:"list-item"},canvas:{display:"inline-block"},template:{display:"none"}};function dr(){return h.createElement(z,{styles:ur})}var gr=Object.defineProperty,B=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,br=Object.prototype.propertyIsEnumerable,ee=(e,r,n)=>r in e?gr(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,x=(e,r)=>{for(var n in r||(r={}))pr.call(r,n)&&ee(e,n,r[n]);if(B)for(var n of B(r))br.call(r,n)&&ee(e,n,r[n]);return e};const N=u.createContext({theme:M});function se(){var e;return((e=u.useContext(N))==null?void 0:e.theme)||M}function hr(e){const r=se(),n=o=>{var a,t,i,s;return{styles:((a=r.components[o])==null?void 0:a.styles)||{},classNames:((t=r.components[o])==null?void 0:t.classNames)||{},variants:(i=r.components[o])==null?void 0:i.variants,sizes:(s=r.components[o])==null?void 0:s.sizes}};return Array.isArray(e)?e.map(n):[n(e)]}function vr(){var e;return(e=u.useContext(N))==null?void 0:e.emotionCache}function _r(e,r,n){var o;const a=se(),t=(o=a.components[e])==null?void 0:o.defaultProps,i=typeof t=="function"?t(a):t;return x(x(x({},r),i),lr(n))}function mr({theme:e,emotionCache:r,withNormalizeCSS:n=!1,withGlobalStyles:o=!1,withCSSVariables:a=!1,inherit:t=!1,children:i}){const s=u.useContext(N),f=cr(M,t?x(x({},s.theme),e):e);return h.createElement(le,{theme:f},h.createElement(N.Provider,{value:{theme:f,emotionCache:r}},n&&h.createElement(dr,null),o&&h.createElement(rr,{theme:f}),a&&h.createElement(nr,{theme:f}),typeof f.globalStyles=="function"&&h.createElement(z,{styles:f.globalStyles(f)}),i))}mr.displayName="@mantine/core/MantineProvider";export{mr as M,vr as a,se as b,hr as c,ae as d,_r as e,lr as f,O as g,v as r,Sr as u};
|