You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
3.1 KiB

{"ast":null,"code":"import canUseDOM from \"../../../modules/canUseDom\";\nexport default function createCSSStyleSheet(id, rootNode, textContent) {\n if (canUseDOM) {\n var root = rootNode != null ? rootNode : document;\n var element = root.getElementById(id);\n if (element == null) {\n element = document.createElement('style');\n element.setAttribute('id', id);\n if (typeof textContent === 'string') {\n element.appendChild(document.createTextNode(textContent));\n }\n if (root instanceof ShadowRoot) {\n root.insertBefore(element, root.firstChild);\n } else {\n var head = root.head;\n if (head) {\n head.insertBefore(element, head.firstChild);\n }\n }\n }\n return element.sheet;\n } else {\n return null;\n }\n}","map":{"version":3,"names":["canUseDOM","createCSSStyleSheet","id","rootNode","textContent","root","document","element","getElementById","createElement","setAttribute","appendChild","createTextNode","ShadowRoot","insertBefore","firstChild","head","sheet"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/node_modules/react-native-web/dist/exports/StyleSheet/dom/createCSSStyleSheet.js"],"sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport canUseDOM from '../../../modules/canUseDom'; // $FlowFixMe: HTMLStyleElement is incorrectly typed - https://github.com/facebook/flow/issues/2696\n\nexport default function createCSSStyleSheet(id, rootNode, textContent) {\n if (canUseDOM) {\n var root = rootNode != null ? rootNode : document;\n var element = root.getElementById(id);\n\n if (element == null) {\n element = document.createElement('style');\n element.setAttribute('id', id);\n\n if (typeof textContent === 'string') {\n element.appendChild(document.createTextNode(textContent));\n }\n\n if (root instanceof ShadowRoot) {\n root.insertBefore(element, root.firstChild);\n } else {\n var head = root.head;\n\n if (head) {\n head.insertBefore(element, head.firstChild);\n }\n }\n } // $FlowFixMe: HTMLElement is incorrectly typed\n\n\n return element.sheet;\n } else {\n return null;\n }\n}"],"mappings":"AAQA,OAAOA,SAAS;AAEhB,eAAe,SAASC,mBAAmB,CAACC,EAAE,EAAEC,QAAQ,EAAEC,WAAW,EAAE;EACrE,IAAIJ,SAAS,EAAE;IACb,IAAIK,IAAI,GAAGF,QAAQ,IAAI,IAAI,GAAGA,QAAQ,GAAGG,QAAQ;IACjD,IAAIC,OAAO,GAAGF,IAAI,CAACG,cAAc,CAACN,EAAE,CAAC;IAErC,IAAIK,OAAO,IAAI,IAAI,EAAE;MACnBA,OAAO,GAAGD,QAAQ,CAACG,aAAa,CAAC,OAAO,CAAC;MACzCF,OAAO,CAACG,YAAY,CAAC,IAAI,EAAER,EAAE,CAAC;MAE9B,IAAI,OAAOE,WAAW,KAAK,QAAQ,EAAE;QACnCG,OAAO,CAACI,WAAW,CAACL,QAAQ,CAACM,cAAc,CAACR,WAAW,CAAC,CAAC;MAC3D;MAEA,IAAIC,IAAI,YAAYQ,UAAU,EAAE;QAC9BR,IAAI,CAACS,YAAY,CAACP,OAAO,EAAEF,IAAI,CAACU,UAAU,CAAC;MAC7C,CAAC,MAAM;QACL,IAAIC,IAAI,GAAGX,IAAI,CAACW,IAAI;QAEpB,IAAIA,IAAI,EAAE;UACRA,IAAI,CAACF,YAAY,CAACP,OAAO,EAAES,IAAI,CAACD,UAAU,CAAC;QAC7C;MACF;IACF;IAGA,OAAOR,OAAO,CAACU,KAAK;EACtB,CAAC,MAAM;IACL,OAAO,IAAI;EACb;AACF"},"metadata":{},"sourceType":"module"}