react-fela
Advanced tools
Comparing version 11.4.0 to 11.5.0-rc.0
{ | ||
"name": "react-fela", | ||
"version": "11.4.0", | ||
"version": "11.5.0-rc.0", | ||
"description": "React bindings for Fela", | ||
@@ -37,7 +37,7 @@ "typings": "index.d.ts", | ||
"dependencies": { | ||
"fela-bindings": "^11.4.0", | ||
"fela-dom": "^11.4.0", | ||
"fela-bindings": "^11.5.0-rc.0", | ||
"fela-dom": "^11.5.0-rc.0", | ||
"prop-types": "^15.5.8" | ||
}, | ||
"gitHead": "94e23ad2fda221aea52ccb939d90f81eb400b5fb" | ||
"gitHead": "6d457d39e69e1471bddaea8591c50745f95070d9" | ||
} |
@@ -23,3 +23,3 @@ # React Fela | ||
Fela is licensed under the [MIT License](http://opensource.org/licenses/MIT).<br> | ||
Documentation is licensed under [Creative Common License](http://creativecommons.org/licenses/by/4.0/).<br> | ||
Documentation is licensed under [Creative Commons License](http://creativecommons.org/licenses/by/4.0/).<br> | ||
Created with ♥ by [@robinweser](http://weser.io) and all the great contributors. |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("Fela")):"function"==typeof define&&define.amd?define("ReactFela",["React","Fela"],t):"object"==typeof exports?exports.ReactFela=t(require("React"),require("Fela")):e.ReactFela=t(e.React,e.Fela)}(window,(function(e,t){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=16)}([function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){for(var n in e)r=t(r,e[n],n,e);return r}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){for(var n=0,o=e.length;n<o;++n)r=t(r,e[n],n,o,e);return r}},,function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r in e)t(e[r],r,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r=0,n=e.length;r<n;++r)t(e[r],r,n,e)}},function(e,t,r){e.exports=r(14)()},function(e,t,r){"use strict";var n=r(13);e.exports=function(e,t,r){return!n(e.props,t)||!n(e.state,r)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.replace(n,(function(e){return e[1].toUpperCase()})).replace(o,"ms")};var n=/-([a-z])/g,o=/^Ms/g;e.exports=t.default},,,function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var u=0;u<r.length;u++)if(!n.call(t,r[u])||!o(e[r[u]],t[r[u]]))return!1;return!0}},function(e,t,r){"use strict";var n=r(15);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,u){if(u!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(1),i=r.n(o),u=r(6),a=r.n(u),c=r(3),f=r.n(c),s=r(5),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){return"function"==typeof e?e:function(){return e}}function y(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,r){return f()(t,(function(t,n){return l({},t,i()(d(n)(e,r),(function(e,r,n){return l({},e,p({},n,t[n]?Object(s.combineRules)(t[n],d(r)):d(r)))}),{}))}),{})}}var v=r(9),h=r.n(v);function m(e){var t=e.displayName||e.name;return t?"Fela"+t:"ConnectedFelaComponent"}var b=r(7),g=r.n(b),O=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},R={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},x=["contextTypes","defaultProps"],j={childContextTypes:!0,propTypes:!0,getDerivedStateFromProps:!0,contextType:!0};function w(e,t){if("string"==typeof t)return e;var r=Object.getOwnPropertyNames(t).filter((function(e){return!R[e]}));return g()(r,(function(r){if(!e.hasOwnProperty(r)&&!j[r])try{var n=Object.getOwnPropertyDescriptor(t,r);n&&Object.defineProperty(e,r,n)}catch(e){}})),g()(x,(function(r){if(t[r]){var n=e[r]||{};e[r]=O({},t[r],n)}})),e}var A=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),P=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function _(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function T(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var F={pure:!0};const S=Object(n.createContext)(),N=Object(n.createContext)();var k,M,I,L,U=(k=n.Component,M=n.createElement,I=S,L=N,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=P({},F,t);return function(t){var n=function(n){function o(){return C(this,o),E(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return T(o,n),A(o,[{key:"shouldComponentUpdate",value:function(e,t){return!r.pure||h()(this,e,t)}},{key:"render",value:function(){var r=this.props,n=r.extend,o=r._felaRules,u=_(r,["extend","_felaRules"]),a=[e];o&&a.push(o),n&&a.push(n);var c=y.apply(void 0,a);return M(I.Consumer,void 0,(function(e){return M(L.Consumer,void 0,(function(r){var n=c(P({},u,{theme:r}),e);if(t._isFelaComponent)return M(t,P({_felaRules:c},u));var o=i()(n,(function(t,n,o){return t[o]=e.renderRule(n,P({},u,{theme:r})),t}),{}),a=i()(n,(function(t,n,o){return t[o]=function(t){return n(P({theme:r},t),e)},t}),{});return M(t,P({},u,{styles:o,theme:r,rules:a}))}))}))}}]),o}(k);return n.displayName=m(t),n._isFelaComponent=!0,w(n,t)}});function q(e,t){return f()(e,(function(e,r){return t.hasOwnProperty(r)&&(e[r]=t[r]),e}),{})}var z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];if("undefined"==typeof Proxy)return r;var n=function(e){return{get:function(t,r){return"object"===z(t[r])&&t[r],e.push(r),t[r]}}},o=new Proxy({theme:t},n(r));try{return e(o),r}catch(e){return[]}}function D(e,t){return"function"==typeof e?e(t):e}function K(e,t){return i()(t,(function(t,r,n){return-1===e.indexOf(n)&&"innerRef"!==n&&"is"!==n&&t.push(n),t}),[])}var W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function $(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function B(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function H(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return function(i){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"div",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],c=i.name?i.name:"FelaComponent",f=function(c){var f=c.children,l=c._felaRule,p=c.extend,d=c.innerRef,y=c.id,v=c.style,h=c.as,m=c.className,b=c.passThrough,g=void 0===b?[]:b,O=B(c,["children","_felaRule","extend","innerRef","id","style","as","className","passThrough"]);return e(t.Consumer,void 0,(function(t){return e(r,void 0,(function(r){if(!t)throw new Error("createComponent() can't render styles without the renderer in the context. Missing react-fela's <Provider /> at the app root?");var c=n?Y(i,r):[],b=[i];l&&b.push(l),p&&("function"==typeof p?b.push(p):b.push((function(){return p})));var R=s.combineRules.apply(void 0,b),x=[].concat($(o),$(D(a,O)),$(D(g,O)),$(n?K(c,O):[])),j=W({},O,{theme:r,as:h,id:y});if(u._isFelaComponent)return e(u,W({_felaRule:R,passThrough:x,innerRef:d,style:v,className:m,as:h,id:y},O),f);var w=q(x,O);if(t.isNativeRenderer){var A=t.renderRule(R,j);w.style=v?[v,A]:A}else{v&&(w.style=v);var P=m?m+" ":"";w.className=P+t.renderRule(R,j)}return y&&(w.id=y),d&&(w.ref=d),e(h||u,w,f)}))}))};return f.displayName=c,f._isFelaComponent=!0,w(f,u)}}var Q=function(e,t){return function(r){var n=r.children;return e(t.Consumer,void 0,n)}}(n.createElement,N),V=H(n.createElement,S,Q),G=H(n.createElement,S,Q,!0),J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var X=function(e,t,r){return function(n){var o=n.children,i=n.as,u=void 0===i?"div":i,a=n.style,c=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(n,["children","as","style"]);return e(t.Consumer,void 0,(function(t){return t.devMode&&null==a&&console.warn('"FelaComponent" is being rendered without a style prop\nIf all you need is access to theme, try using "FelaTheme" or the "useFela" hook instead'),e(r,void 0,(function(r){var n=t.renderRule(Object(s.combineRules)(a),J({},c,{theme:r}));return o instanceof Function?o({className:!t.isNativeRenderer&&n,style:t.isNativeRenderer&&n,theme:r,as:u}):e(u,{className:!t.isNativeRenderer&&n,style:t.isNativeRenderer&&n},o)}))}))}}(n.createElement,S,Q);function Z(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return 0===e.length||0===t.length?0:e.indexOf(e.find((function(e){return null!==t.match(e)})))+1}function ee(e){return e.split("{")[0].slice(9).trim()}var te=r(10),re=r.n(te);function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";return o+n+r+re()(e)+t}function oe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return r+"."+e+t}function ie(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";return{type:e,className:t,selector:oe(t,o,a),declaration:r+":"+n,pseudo:o,media:i,support:u}}var ue=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function ae(e){return e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}function ce(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=void 0,u=new RegExp(ae(o)+"[.]([0-9a-z_-]+)([^{]+)?{([^:]+):([^}]+)}","gi");i=u.exec(e);){var a=i,c=ue(a,5),f=(c[0],c[1]),s=c[2],l=c[3],p=c[4],d=ne(l,p,s,t,r);n[d]=ie("RULE",f,l,p,s,t,r,o)}return n}var fe=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},se=/@supports[^{]+\{([\s\S]+?})\s*}/gi;function le(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=void 0;o=se.exec(e);){var i=o,u=fe(i,2),a=u[0],c=u[1],f=ee(a);ce(c,t,f,r,n)}return r}function pe(e,t){return e+"{"+t+"}"}function de(e){var t=e.type,r=e.media,n=e.support,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,i=r?'[media="'+r+'"]':":not([media])",u=n?'[data-fela-support="true"]':':not([data-fela-support="true"])';return o.querySelector('[data-fela-type="'+t+'"]'+u+i)}function ye(e,t,r){var n=t.type,o=t.media,i=t.support;switch(n){case"FONT":case"STATIC":case"KEYFRAME":return e[0];case"RULE":var u=e.map((function(e){return e.media})).filter((function(e){return 0!==e.length}));if(o){var a=[].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(u),[o]).sort(r),c=a.indexOf(o)+1,f=a[c];if(f)return f===o&&i?e.find((function(e){return e.media===a[a.indexOf(o)+2]})):e.find((function(e){return e.media===f}))}else{var s=u.sort(r)[0];if(!i){var l=e.find((function(e){return void 0!==e.getAttribute("data-fela-support")&&""===e.media&&"RULE"===e.getAttribute("data-fela-type")}));if(l)return l}if(s)return e.find((function(e){return e.media===s}))}}}var ve,he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function me(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments[2],n=arguments[3],o=t.head||{},i=e.type,u=e.media,a=e.support,c=t.createElement("style");for(var f in c.setAttribute("data-fela-type",i),c.type="text/css",a&&c.setAttribute("data-fela-support","true"),u&&(c.media=u),n)c.setAttribute(f,n[f]);if(void 0!==("undefined"==typeof window?"undefined":he(window))&&window.FelaConfig)for(var s in window.FelaConfig.styleNodeAttributes)c.setAttribute(s,window.FelaConfig.styleNodeAttributes[s]);var l=o.querySelectorAll("[data-fela-type]"),p=ye([].concat(me(l)),e,r);return p?o.insertBefore(c,p):o.appendChild(c),c}function ge(e){var t=e.type,r=e.media,n=void 0===r?"":r,o=e.support;return t+n+(void 0===o?"":o)}function Oe(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n=ge(e);if(!t.nodes[n]){var o=de(e,r)||be(e,r,t.sortMediaQuery,t.styleNodeAttributes);t.nodes[n]=o}return t.nodes[n]}function Re(e,t){return"@supports "+e+"{"+t+"}"}function xe(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function je(e,t){var r=i()(e,(function(r,n,o){var i=function(e,t){for(var r=-1,n=0;n<e.length;n++)if(t(e[n])){r=n;break}return r}(r,(function(r){return t(e[r],r)>t(n,o)}));return-1!==i?function(e,t,r){return[].concat(xe(e.slice(0,r)),[t],xe(e.slice(r,e.length)))}(r,o,i):[].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(r),[o])}),[]);return f()(r,(function(t,r){return t[r]=e[r],t}),{})}function we(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ae=(we(ve={},"RULE",(function(e,t){var r=t.selector,n=t.declaration,o=t.support,i=t.media,u=pe(r,n);o?i?(e.supportMediaRules[i]||(e.supportMediaRules[i]={}),e.supportMediaRules[i][o]||(e.supportMediaRules[i][o]=""),e.supportMediaRules[i][o]+=u):(e.supportRules[o]||(e.supportRules[o]=""),e.supportRules[o]+=u):i?(e.mediaRules[i]||(e.mediaRules[i]=""),e.mediaRules[i]+=u):e.rules+=u})),we(ve,"FONT",(function(e,t){var r=t.fontFace;e.fontFaces+=r})),we(ve,"KEYFRAME",(function(e,t){var r=t.keyframe;e.keyframes+=r})),we(ve,"STATIC",(function(e,t){var r=t.css,n=t.selector;e.statics+=n?pe(n,r):r})),ve);var Pe={fontFaces:"FONT",statics:"STATIC",keyframes:"KEYFRAME",rules:"RULE"};function _e(e){return i()(e,(function(e,t,r){return t.length>0&&(e+=Re(r,t)),e}),"")}var Ce=/^[a-z0-9_-]*$/gi;var Ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Te(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=je(e,(function(e){return Z(t,e.pseudo)}));return i()(r,(function(e,t){var r=Ae[t.type];return r&&r(e,t),e}),{mediaRules:{},supportRules:{},supportMediaRules:{},fontFaces:"",statics:"",keyframes:"",rules:""})}(e.cache,e.ruleOrder),r=function(e){return 0===e.selectorPrefix.length||null!==e.selectorPrefix.match(Ce)?e.uniqueRuleIdentifier:-1}(e),n=i()(Pe,(function(n,o,i){return t[i].length>0&&n.push({css:t[i],rehydration:r,attributes:e.styleNodeAttributes,type:o}),n}),[]),o=_e(t.supportRules);o&&n.push({css:o,type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,support:!0});var u=Object.keys(Ee({},t.supportMediaRules,t.mediaRules)).sort(e.sortMediaQuery);return f()(u,(function(n,o){if(t.mediaRules[o]&&t.mediaRules[o].length>0&&n.push({css:t.mediaRules[o],type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,media:o}),t.supportMediaRules[o]){var i=_e(t.supportMediaRules[o]);i.length>0&&n.push({css:i,type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,support:!0,media:o})}return n}),n)}function Fe(e,t,r){var n=e.selector,o=e.declaration,i=e.support,u=e.media,a=e.pseudo,c=u+i;if(t.devMode)!function(e,t){var r=Te(e),n=t.getAttribute("media")||void 0,o=!!t.getAttribute("data-fela-support")||void 0,i=r.find((function(e){return"RULE"===e.type&&e.media===n&&e.support===o}));i&&(t.textContent=i.css)}(t,r);else try{var f=Z(t.ruleOrder,a),s=r.sheet.cssRules,l=s.length;if(0===f)l=void 0===t.scoreIndex[c]?0:t.scoreIndex[c]+1;else for(var p=t.scoreIndex[c]||0,d=s.length;p<d;++p)if(s[p].score>f){l=p;break}var y=pe(n,o);if(i.length>0){var v=Re(i,y);r.sheet.insertRule(v,l)}else r.sheet.insertRule(y,l);0===f&&(t.scoreIndex[c]=l),s[l].score=f}catch(e){}}function Se(e,t){e.updateSubscription||(e.scoreIndex={},e.nodes={},e.updateSubscription=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return function(r){if("CLEAR"===r.type)return a()(e.nodes,(function(e){return e.parentNode.removeChild(e)})),e.nodes={},void(e.scoreIndex={});var n=Oe(r,e,t);switch(r.type){case"KEYFRAME":-1===n.textContent.indexOf(r.keyframe)&&(n.textContent+=r.keyframe);break;case"FONT":-1===n.textContent.indexOf(r.fontFace)&&(n.textContent+=r.fontFace);break;case"STATIC":var o=r.selector?pe(r.selector,r.css):r.css;-1===n.textContent.indexOf(o)&&(n.textContent+=o);break;case"RULE":Fe(r,e,n)}}}(e,t),e.subscribe(e.updateSubscription),a()(e.cache,e._emitChange))}var Ne=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},ke=/@(-webkit-|-moz-)?keyframes ([a-z_][a-z0-9-_]*)(\{.*?(?=}})}})/gi;function Me(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0;r=ke.exec(e);){var n=r,o=Ne(n,4),i=o[0],u=(o[1],o[2]),a=o[3];t[a]?t[a].keyframe+=i:t[a]={type:"KEYFRAME",keyframe:i,name:u}}return t}var Ie=/[.][a-z0-9_-]*/gi;var Le=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var Ue=r(8),qe=r.n(Ue),ze=function(e,t,r,n,o){var i=function(e){function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t));return r._renderStyle(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,e),Le(o,[{key:"componentDidUpdate",value:function(e){this._renderStyle()}},{key:"_renderStyle",value:function(){var e=this.props,t=e.renderer,r=e.rehydrate,n=e.targetDocument;(function(e,t){if("undefined"==typeof document)return!1;var r=t||document;return e&&!e.isNativeRenderer&&r&&r.createElement})(t,n)&&(r&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.querySelectorAll("[data-fela-type]").length>0}(n)?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;Se(e,t),g()(t.querySelectorAll("[data-fela-type]"),(function(t){var r=t.getAttribute("data-fela-rehydration")||-1,n=e.uniqueRuleIdentifier||parseInt(r,10);if(-1!==n){var o=t.getAttribute("data-fela-type")||"",i=t.getAttribute("media")||"",u=t.getAttribute("data-fela-support")||"",a=t.textContent;e.uniqueRuleIdentifier=n;var c=o+i+u;if(e.nodes[c]=t,"RULE"===o){if(u?le(a,i,e.cache,e.specificityPrefix):ce(a,i,"",e.cache,e.specificityPrefix),t.sheet&&t.sheet.cssRules){var f=i+u;g()(t.sheet.cssRules,(function(t,r){var n=t.conditionText?t.cssRules[0].selectorText:t.selectorText,o=Z(e.ruleOrder,n.split(Ie)[1]);0===o&&(e.scoreIndex[f]=r),t.score=o}))}}else"KEYFRAME"===o&&Me(a,e.cache)}}))}(t,n):Se(t,n))}},{key:"render",value:function(){return r(t.Provider,{value:this.props.renderer},n(this.props.children))}}]),o}(e);return o&&a()(o,(function(e,t){i[t]=e})),i}(n.Component,S,n.createElement,e=>n.Children.only(e),{propTypes:{renderer:qe.a.object.isRequired,rehydrate:qe.a.bool.isRequired},defaultProps:{rehydrate:!0}}),Ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var De=function(e,t,r){return function(n){var o=n.theme,i=void 0===o?{}:o,u=n.overwrite,a=void 0!==u&&u,c=n.children;return t(e.Consumer,null,(function(n){return t(e.Provider,{value:!a&&n?Ye({},n,i):i},r(c))}))}}(N,n.createElement,e=>n.Children.only(e));function Ke(e={}){const t=Object(n.useContext)(S),r=Object(n.useContext)(N)||{};if(!t)throw new Error('The "useFela" hook can only be used inside a "RendererProvider"');const o={...e,theme:r};return{renderer:t,theme:r,css:function(...e){return t.renderRule(Object(s.combineRules)(...e),o)}}}var We=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function $e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Be=function(e,t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"theme",o=function(o){return e(t,void 0,(function(t){return e(r,We({},o,$e({},n,t)))}))};return w(o,r)}}(n.createElement,Q),He=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var Qe=function(e){return function(t){return Te(t).map((function(r){var n=r.type,o=r.media,i=r.rehydration,u=r.support,a=r.css;return e("style",He({key:n+o},t.styleNodeAttributes,{media:o,"data-fela-rehydration":i,"data-fela-type":n,"data-fela-support":u,dangerouslySetInnerHTML:{__html:a}}))}))}}(n.createElement),Ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Ge(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function Je(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var Xe=function(e,t){return function(r){for(var n=arguments.length,o=Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(u){var a=u.css,c=u.key,f=u.ref,s=u.className,l=Je(u,["css","key","ref","className"]);if(a)return e(t,{style:a,key:c,ref:f},(function(t){return e.apply(void 0,[r,Ve({},l,{className:s?s+" "+t.className:t.className})].concat(Ge(o)))}))}return e.apply(void 0,[r,u].concat(Ge(o)))}}(n.createElement,X);r.d(t,"FelaRenderer",(function(){return Ze})),r.d(t,"connect",(function(){return U})),r.d(t,"createComponent",(function(){return V})),r.d(t,"createComponentWithProxy",(function(){return G})),r.d(t,"FelaComponent",(function(){return X})),r.d(t,"FelaTheme",(function(){return Q})),r.d(t,"RendererContext",(function(){return S})),r.d(t,"RendererProvider",(function(){return ze})),r.d(t,"ThemeContext",(function(){return N})),r.d(t,"ThemeProvider",(function(){return De})),r.d(t,"renderToNodeList",(function(){return Qe})),r.d(t,"useFela",(function(){return Ke})),r.d(t,"withTheme",(function(){return Be})),r.d(t,"fe",(function(){return Xe}));const Ze=S.Consumer}])})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("Fela")):"function"==typeof define&&define.amd?define("ReactFela",["React","Fela"],t):"object"==typeof exports?exports.ReactFela=t(require("React"),require("Fela")):e.ReactFela=t(e.React,e.Fela)}(window,(function(e,t){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=15)}([function(t,r){t.exports=e},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){for(var n in e)r=t(r,e[n],n,e);return r}},,function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){for(var n=0,o=e.length;n<o;++n)r=t(r,e[n],n,o,e);return r}},,function(e,r){e.exports=t},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r in e)t(e[r],r,e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var r=0,n=e.length;r<n;++r)t(e[r],r,n,e)}},function(e,t,r){e.exports=r(13)()},function(e,t,r){"use strict";var n=r(12);e.exports=function(e,t,r){return!n(e.props,t)||!n(e.state,r)}},,,function(e,t,r){"use strict";var n=Object.prototype.hasOwnProperty;function o(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}e.exports=function(e,t){if(o(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(var u=0;u<r.length;u++)if(!n.call(t,r[u])||!o(e[r[u]],t[r[u]]))return!1;return!0}},function(e,t,r){"use strict";var n=r(14);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,u){if(u!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";r.r(t),r.d(t,"connect",(function(){return I})),r.d(t,"createComponent",(function(){return H})),r.d(t,"createComponentWithProxy",(function(){return Q})),r.d(t,"FelaComponent",(function(){return G})),r.d(t,"FelaRenderer",(function(){return rt})),r.d(t,"FelaTheme",(function(){return B})),r.d(t,"RendererContext",(function(){return T})),r.d(t,"RendererProvider",(function(){return Ke})),r.d(t,"ThemeContext",(function(){return F})),r.d(t,"ThemeProvider",(function(){return $e})),r.d(t,"renderToNodeList",(function(){return Je})),r.d(t,"useFela",(function(){return Be})),r.d(t,"withTheme",(function(){return Ve})),r.d(t,"fe",(function(){return tt}));var n=r(0),o=r(1),i=r.n(o),u=r(3),a=r.n(u),c=r(5),f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e){return"function"==typeof e?e:function(){return e}}function p(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e,r){return a()(t,(function(t,n){return f({},t,i()(l(n)(e,r),(function(e,r,n){return f({},e,s({},n,t[n]?Object(c.combineRules)(t[n],l(r)):l(r)))}),{}))}),{})}}var d=r(9),y=r.n(d);function v(e){var t=e.displayName||e.name;return t?"Fela"+t:"ConnectedFelaComponent"}var h=r(7),m=r.n(h),b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},g={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},O=["contextTypes","defaultProps"],R={childContextTypes:!0,propTypes:!0,getDerivedStateFromProps:!0,contextType:!0};function w(e,t){if("string"==typeof t)return e;var r=Object.getOwnPropertyNames(t).filter((function(e){return!g[e]}));return m()(r,(function(r){if(!e.hasOwnProperty(r)&&!R[r])try{var n=Object.getOwnPropertyDescriptor(t,r);n&&Object.defineProperty(e,r,n)}catch(e){}})),m()(O,(function(r){if(t[r]){var n=e[r]||{};e[r]=b({},t[r],n)}})),e}var x=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function A(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function C(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var E={pure:!0};const T=Object(n.createContext)(),F=Object(n.createContext)();var S,N,k,M,I=(S=n.Component,N=n.createElement,k=T,M=F,function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=j({},E,t);return function(t){var n=function(n){function o(){return P(this,o),_(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return C(o,n),x(o,[{key:"shouldComponentUpdate",value:function(e,t){return!r.pure||y()(this,e,t)}},{key:"render",value:function(){var r=this.props,n=r.extend,o=r._felaRules,u=A(r,["extend","_felaRules"]),a=[e];o&&a.push(o),n&&a.push(n);var c=p.apply(void 0,a);return N(k.Consumer,void 0,(function(e){return N(M.Consumer,void 0,(function(r){var n=c(j({},u,{theme:r}),e);if(t._isFelaComponent)return N(t,j({_felaRules:c},u));var o=i()(n,(function(t,n,o){return t[o]=e.renderRule(n,j({},u,{theme:r})),t}),{}),a=i()(n,(function(t,n,o){return t[o]=function(t){return n(j({theme:r},t),e)},t}),{});return N(t,j({},u,{styles:o,theme:r,rules:a}))}))}))}}]),o}(S);return n.displayName=v(t),n._isFelaComponent=!0,w(n,t)}});function L(e,t){return a()(e,(function(e,r){return t.hasOwnProperty(r)&&(e[r]=t[r]),e}),{})}var U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];if("undefined"==typeof Proxy)return r;var n=function(e){return{get:function(t,r){return"object"===U(t[r])&&t[r],e.push(r),t[r]}}},o=new Proxy({theme:t},n(r));try{return e(o),r}catch(e){return[]}}function z(e,t){return"function"==typeof e?e(t):e}function Y(e,t){return i()(t,(function(t,r,n){return-1===e.indexOf(n)&&"innerRef"!==n&&"is"!==n&&t.push(n),t}),[])}var D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function K(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function W(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function $(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return function(i){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"div",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],f=i.name?i.name:"FelaComponent",s=function(f){var s=f.children,l=f._felaRule,p=f.extend,d=f.innerRef,y=f.id,v=f.style,h=f.as,m=f.className,b=f.passThrough,g=void 0===b?[]:b,O=W(f,["children","_felaRule","extend","innerRef","id","style","as","className","passThrough"]);return e(t.Consumer,void 0,(function(t){return e(r,void 0,(function(r){if(!t)throw new Error("createComponent() can't render styles without the renderer in the context. Missing react-fela's <Provider /> at the app root?");var f=n?q(i,r):[],b=[i];l&&b.push(l),p&&("function"==typeof p?b.push(p):b.push((function(){return p})));var R=c.combineRules.apply(void 0,b),w=[].concat(K(o),K(z(a,O)),K(z(g,O)),K(n?Y(f,O):[])),x=D({},O,{theme:r,as:h,id:y});if(u._isFelaComponent)return e(u,D({_felaRule:R,passThrough:w,innerRef:d,style:v,className:m,as:h,id:y},O),s);var j=L(w,O);if(t.isNativeRenderer){var A=t.renderRule(R,x);j.style=v?[v,A]:A}else{v&&(j.style=v);var P=m?m+" ":"";j.className=P+t.renderRule(R,x)}return y&&(j.id=y),d&&(j.ref=d),e(h||u,j,s)}))}))};return s.displayName=f,s._isFelaComponent=!0,w(s,u)}}var B=function(e,t){return function(r){var n=r.children;return e(t.Consumer,void 0,n)}}(n.createElement,F),H=$(n.createElement,T,B),Q=$(n.createElement,T,B,!0),V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var G=function(e,t,r){return function(n){var o=n.children,i=n.as,u=void 0===i?"div":i,a=n.style,f=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(n,["children","as","style"]);return e(t.Consumer,void 0,(function(t){return t.devMode&&null==a&&console.warn('"FelaComponent" is being rendered without a style prop\nIf all you need is access to theme, try using "FelaTheme" or the "useFela" hook instead'),e(r,void 0,(function(r){var n=t.renderRule(Object(c.combineRules)(a),V({},f,{theme:r}));return o instanceof Function?o({className:!t.isNativeRenderer&&n,style:t.isNativeRenderer&&n,theme:r,as:u}):e(u,{className:!t.isNativeRenderer&&n,style:t.isNativeRenderer&&n},o)}))}))}}(n.createElement,T,B);function J(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return 0===e.length||0===t.length?0:e.indexOf(e.find((function(e){return null!==t.match(e)})))+1}function X(e){return e.split("{")[0].slice(9).trim()}function Z(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";return o+n+r+e+t}var ee=/-([a-z])/g,te=/^Ms/g,re={};function ne(e){return e[1].toUpperCase()}function oe(e){if(re.hasOwnProperty(e))return re[e];var t=e.replace(ee,ne).replace(te,"ms");return re[e]=t,t}function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return r+"."+e+t}function ue(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"",a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";return{type:e,className:t,selector:ie(t,o,a),declaration:r+":"+n,pseudo:o,media:i,support:u}}var ae=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function ce(e){return e.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&")}function fe(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=void 0,u=new RegExp(ce(o)+"[.]([0-9a-z_-]+)([^{]+)?{([^:]+):([^}]+)}","gi");i=u.exec(e);){var a=i,c=ae(a,5),f=(c[0],c[1]),s=c[2],l=c[3],p=c[4],d=Z(oe(l),p,s,t,r);n[d]=ue("RULE",f,l,p,s,t,r,o)}return n}var se=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},le=/@supports[^{]+\{([\s\S]+?})\s*}/gi;function pe(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=void 0;o=le.exec(e);){var i=o,u=se(i,2),a=u[0],c=u[1],f=X(a);fe(c,t,f,r,n)}return r}var de=r(6),ye=r.n(de);function ve(e,t){return e+"{"+t+"}"}function he(e){var t=e.type,r=e.media,n=e.support,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,i=r?'[media="'+r+'"]':":not([media])",u=n?'[data-fela-support="true"]':':not([data-fela-support="true"])';return o.querySelector('[data-fela-type="'+t+'"]'+u+i)}function me(e,t,r){var n=t.type,o=t.media,i=t.support;switch(n){case"FONT":case"STATIC":case"KEYFRAME":return e[0];case"RULE":var u=e.map((function(e){return e.media})).filter((function(e){return 0!==e.length}));if(o){var a=[].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(u),[o]).sort(r),c=a.indexOf(o)+1,f=a[c];if(f)return f===o&&i?e.find((function(e){return e.media===a[a.indexOf(o)+2]})):e.find((function(e){return e.media===f}))}else{var s=u.sort(r)[0];if(!i){var l=e.find((function(e){return void 0!==e.getAttribute("data-fela-support")&&""===e.media&&"RULE"===e.getAttribute("data-fela-type")}));if(l)return l}if(s)return e.find((function(e){return e.media===s}))}}}var be,ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Oe(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function Re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments[2],n=arguments[3],o=t.head||{},i=e.type,u=e.media,a=e.support,c=t.createElement("style");for(var f in c.setAttribute("data-fela-type",i),c.type="text/css",a&&c.setAttribute("data-fela-support","true"),u&&(c.media=u),n)c.setAttribute(f,n[f]);if(void 0!==("undefined"==typeof window?"undefined":ge(window))&&window.FelaConfig)for(var s in window.FelaConfig.styleNodeAttributes)c.setAttribute(s,window.FelaConfig.styleNodeAttributes[s]);var l=o.querySelectorAll("[data-fela-type]"),p=me([].concat(Oe(l)),e,r);return p?o.insertBefore(c,p):o.appendChild(c),c}function we(e){var t=e.type,r=e.media,n=void 0===r?"":r,o=e.support;return t+n+(void 0===o?"":o)}function xe(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n=we(e);if(!t.nodes[n]){var o=he(e,r)||Re(e,r,t.sortMediaQuery,t.styleNodeAttributes);t.nodes[n]=o}return t.nodes[n]}function je(e,t){return"@supports "+e+"{"+t+"}"}function Ae(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function Pe(e,t){var r=i()(e,(function(r,n,o){var i=function(e,t){for(var r=-1,n=0;n<e.length;n++)if(t(e[n])){r=n;break}return r}(r,(function(r){return t(e[r],r)>t(n,o)}));return-1!==i?function(e,t,r){return[].concat(Ae(e.slice(0,r)),[t],Ae(e.slice(r,e.length)))}(r,o,i):[].concat(function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(r),[o])}),[]);return a()(r,(function(t,r){return t[r]=e[r],t}),{})}function _e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ce=(_e(be={},"RULE",(function(e,t){var r=t.selector,n=t.declaration,o=t.support,i=t.media,u=ve(r,n);o?i?(e.supportMediaRules[i]||(e.supportMediaRules[i]={}),e.supportMediaRules[i][o]||(e.supportMediaRules[i][o]=""),e.supportMediaRules[i][o]+=u):(e.supportRules[o]||(e.supportRules[o]=""),e.supportRules[o]+=u):i?(e.mediaRules[i]||(e.mediaRules[i]=""),e.mediaRules[i]+=u):e.rules+=u})),_e(be,"FONT",(function(e,t){var r=t.fontFace;e.fontFaces+=r})),_e(be,"KEYFRAME",(function(e,t){var r=t.keyframe;e.keyframes+=r})),_e(be,"STATIC",(function(e,t){var r=t.css,n=t.selector;e.statics+=n?ve(n,r):r})),be);var Ee={fontFaces:"FONT",statics:"STATIC",keyframes:"KEYFRAME",rules:"RULE"};function Te(e){return i()(e,(function(e,t,r){return t.length>0&&(e+=je(r,t)),e}),"")}var Fe=/^[a-z0-9_-]*$/gi;var Se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Ne(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Pe(e,(function(e){return J(t,e.pseudo)}));return i()(r,(function(e,t){var r=Ce[t.type];return r&&r(e,t),e}),{mediaRules:{},supportRules:{},supportMediaRules:{},fontFaces:"",statics:"",keyframes:"",rules:""})}(e.cache,e.ruleOrder),r=function(e){return 0===e.selectorPrefix.length||null!==e.selectorPrefix.match(Fe)?e.uniqueRuleIdentifier:-1}(e),n=i()(Ee,(function(n,o,i){return t[i].length>0&&n.push({css:t[i],rehydration:r,attributes:e.styleNodeAttributes,type:o}),n}),[]),o=Te(t.supportRules);o&&n.push({css:o,type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,support:!0});var u=Object.keys(Se({},t.supportMediaRules,t.mediaRules)).sort(e.sortMediaQuery);return a()(u,(function(n,o){if(t.mediaRules[o]&&t.mediaRules[o].length>0&&n.push({css:t.mediaRules[o],type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,media:o}),t.supportMediaRules[o]){var i=Te(t.supportMediaRules[o]);i.length>0&&n.push({css:i,type:"RULE",rehydration:r,attributes:e.styleNodeAttributes,support:!0,media:o})}return n}),n)}function ke(e,t,r){var n=e.selector,o=e.declaration,i=e.support,u=e.media,a=e.pseudo,c=u+i;if(t.devMode)!function(e,t){var r=Ne(e),n=t.getAttribute("media")||void 0,o=!!t.getAttribute("data-fela-support")||void 0,i=r.find((function(e){return"RULE"===e.type&&e.media===n&&e.support===o}));i&&(t.textContent=i.css)}(t,r);else try{var f=J(t.ruleOrder,a),s=r.sheet.cssRules,l=s.length;if(0===f)l=void 0===t.scoreIndex[c]?0:t.scoreIndex[c]+1;else for(var p=t.scoreIndex[c]||0,d=s.length;p<d;++p)if(s[p].score>f){l=p;break}var y=ve(n,o);if(i.length>0){var v=je(i,y);r.sheet.insertRule(v,l)}else r.sheet.insertRule(y,l);0===f&&(t.scoreIndex[c]=l),s[l].score=f}catch(e){}}function Me(e,t){e.updateSubscription||(e.scoreIndex={},e.nodes={},e.updateSubscription=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return function(r){if("CLEAR"===r.type)return ye()(e.nodes,(function(e){return e.parentNode.removeChild(e)})),e.nodes={},void(e.scoreIndex={});var n=xe(r,e,t);switch(r.type){case"KEYFRAME":-1===n.textContent.indexOf(r.keyframe)&&(n.textContent+=r.keyframe);break;case"FONT":-1===n.textContent.indexOf(r.fontFace)&&(n.textContent+=r.fontFace);break;case"STATIC":var o=r.selector?ve(r.selector,r.css):r.css;-1===n.textContent.indexOf(o)&&(n.textContent+=o);break;case"RULE":ke(r,e,n)}}}(e,t),e.subscribe(e.updateSubscription),ye()(e.cache,e._emitChange))}var Ie=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Le=/@(-webkit-|-moz-)?keyframes ([a-z_][a-z0-9-_]*)(\{.*?(?=}})}})/gi;function Ue(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0;r=Le.exec(e);){var n=r,o=Ie(n,4),i=o[0],u=(o[1],o[2]),a=o[3];t[a]?t[a].keyframe+=i:t[a]={type:"KEYFRAME",keyframe:i,name:u}}return t}var qe=/[.][a-z0-9_-]*/gi;var ze=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();var Ye=r(8),De=r.n(Ye),Ke=function(e,t,r,n,o){var i=function(e){function o(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e,t));return r._renderStyle(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,e),ze(o,[{key:"componentDidUpdate",value:function(e){this._renderStyle()}},{key:"_renderStyle",value:function(){var e=this.props,t=e.renderer,r=e.rehydrate,n=e.targetDocument;(function(e,t){if("undefined"==typeof document)return!1;var r=t||document;return e&&!e.isNativeRenderer&&r&&r.createElement})(t,n)&&(r&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return e.querySelectorAll("[data-fela-type]").length>0}(n)?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;Me(e,t),m()(t.querySelectorAll("[data-fela-type]"),(function(t){var r=t.getAttribute("data-fela-rehydration")||-1,n=e.uniqueRuleIdentifier||parseInt(r,10);if(-1!==n){var o=t.getAttribute("data-fela-type")||"",i=t.getAttribute("media")||"",u=t.getAttribute("data-fela-support")||"",a=t.textContent;e.uniqueRuleIdentifier=n;var c=o+i+u;if(e.nodes[c]=t,"RULE"===o){if(u?pe(a,i,e.cache,e.specificityPrefix):fe(a,i,"",e.cache,e.specificityPrefix),t.sheet&&t.sheet.cssRules){var f=i+u;m()(t.sheet.cssRules,(function(t,r){var n=t.conditionText?t.cssRules[0].selectorText:t.selectorText,o=J(e.ruleOrder,n.split(qe)[1]);0===o&&(e.scoreIndex[f]=r),t.score=o}))}}else"KEYFRAME"===o&&Ue(a,e.cache)}}))}(t,n):Me(t,n))}},{key:"render",value:function(){return r(t.Provider,{value:this.props.renderer},n(this.props.children))}}]),o}(e);return o&&ye()(o,(function(e,t){i[t]=e})),i}(n.Component,T,n.createElement,e=>n.Children.only(e),{propTypes:{renderer:De.a.object.isRequired,rehydrate:De.a.bool.isRequired},defaultProps:{rehydrate:!0}}),We=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var $e=function(e,t,r){return function(n){var o=n.theme,i=void 0===o?{}:o,u=n.overwrite,a=void 0!==u&&u,c=n.children;return t(e.Consumer,null,(function(n){return t(e.Provider,{value:!a&&n?We({},n,i):i},r(c))}))}}(F,n.createElement,e=>n.Children.only(e));function Be(e={}){const t=Object(n.useContext)(T),r=Object(n.useContext)(F)||{};if(!t)throw new Error('The "useFela" hook can only be used inside a "RendererProvider"');const o={...e,theme:r};return{renderer:t,theme:r,css:function(...e){return t.renderRule(Object(c.combineRules)(...e),o)}}}var He=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ve=function(e,t){return function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"theme",o=function(o){return e(t,void 0,(function(t){return e(r,He({},o,Qe({},n,t)))}))};return w(o,r)}}(n.createElement,B),Ge=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var Je=function(e){return function(t){return Ne(t).map((function(r){var n=r.type,o=r.media,i=r.rehydration,u=r.support,a=r.css;return e("style",Ge({key:n+o},t.styleNodeAttributes,{media:o,"data-fela-rehydration":i,"data-fela-type":n,"data-fela-support":u,dangerouslySetInnerHTML:{__html:a}}))}))}}(n.createElement),Xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Ze(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function et(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var tt=function(e,t){return function(r){for(var n=arguments.length,o=Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(u){var a=u.css,c=u.key,f=u.ref,s=u.className,l=et(u,["css","key","ref","className"]);if(a)return e(t,{style:a,key:c,ref:f},(function(t){return e.apply(void 0,[r,Xe({},l,{className:s?s+" "+t.className:t.className})].concat(Ze(o)))}))}return e.apply(void 0,[r,u].concat(Ze(o)))}}(n.createElement,G);const rt=T.Consumer}])})); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115935
33
829
3
Updatedfela-bindings@^11.5.0-rc.0
Updatedfela-dom@^11.5.0-rc.0