import{forwardRef as e,useContext as r,createElement as o,createContext as n,Fragment as t}from"react";import i from"../node_modules/@emotion/cache/dist/emotion-cache.esm.js";import s from"../../../@babel/runtime/helpers/esm/extends.js";import a from"../../weak-memoize/dist/weak-memoize.esm.js";import{getRegisteredStyles as m,insertStyles as u}from"../../utils/dist/emotion-utils.esm.js";import{serializeStyles as c}from"../../serialize/dist/emotion-serialize.esm.js";var _="undefined"!=typeof document,l=Object.prototype.hasOwnProperty,f=n("undefined"!=typeof HTMLElement?i({key:"css"}):null);f.Provider;var d=function(o){return e((function(e,n){var t=r(f);return o(e,t,n)}))};_||(d=function(e){return function(n){var t=r(f);return null===t?(t=i({key:"css"}),o(f.Provider,{value:t},e(n,t))):e(n,t)}});var p=n({}),E=a((function(e){return a((function(r){return function(e,r){if("function"==typeof r){var o=r(e);if("production"!==process.env.NODE_ENV&&(null==o||"object"!=typeof o||Array.isArray(o)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return o}if("production"!==process.env.NODE_ENV&&(null==r||"object"!=typeof r||Array.isArray(r)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return s({},e,r)}(e,r)}))})),v=function(e){var n=r(p);return e.theme!==n&&(n=E(n)(e.theme)),o(p.Provider,{value:n},e.children)},y=d((function(e,n,i){var s=e.css;"string"==typeof s&&void 0!==n.registered[s]&&(s=n.registered[s]);var a=e.__EMOTION_TYPE_PLEASE_DO_NOT_USE__,f=[s],d="";"string"==typeof e.className?d=m(n.registered,f,e.className):null!=e.className&&(d=e.className+" ");var E=c(f,void 0,"function"==typeof s||Array.isArray(s)?r(p):void 0);if("production"!==process.env.NODE_ENV&&-1===E.name.indexOf("-")){var v=e.__EMOTION_LABEL_PLEASE_DO_NOT_USE__;v&&(E=c([E,"label:"+v+";"]))}var y=u(n,E,"string"==typeof a);d+=n.key+"-"+E.name;var N={};for(var O in e)!l.call(e,O)||"css"===O||"__EMOTION_TYPE_PLEASE_DO_NOT_USE__"===O||"production"!==process.env.NODE_ENV&&"__EMOTION_LABEL_PLEASE_DO_NOT_USE__"===O||(N[O]=e[O]);N.ref=i,N.className=d;var h=o(a,N);if(!_&&void 0!==y){for(var P,T=E.name,A=E.next;void 0!==A;)T+=" "+A.name,A=A.next;return o(t,null,o("style",((P={})["data-emotion"]=n.key+" "+T,P.dangerouslySetInnerHTML={__html:y},P.nonce=n.sheet.nonce,P)),h)}return h}));"production"!==process.env.NODE_ENV&&(y.displayName="EmotionCssPropInternal");export{y as E,p as T,v as a,l as h,_ as i,d as w};
//# sourceMappingURL=emotion-element-fecc36da.esm.js.map
